Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > eca022407369e604d44aac9c8ff2e868 > files > 5

ffmpeg-0.4.9-0.pre1.5mdk.src.rpm

%define name	ffmpeg
%define version	0.4.9
%define pre	pre1
%define release	0.%pre.5mdk
%define major	0

%define libname %mklibname %name %major
%define libnamedev %mklibname %name %major -d


Name: 	 	%{name}
Version: 	%{version}
Release: 	%{release}
Summary: 	Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder
Source0: 	%{name}-%{version}-%pre.tar.bz2
Patch:		ffmpeg-0.4.9-pre1-major0.patch.bz2
Patch1:		ffmpeg-0.4.9-pre1-pic.patch.bz2
Patch2:		ffmpeg-0.4.9-pre1-gcc4.patch.bz2
License: 	GPL
Group: 	 	Video
BuildRoot: 	%{_tmppath}/%{name}-buildroot
Prefix: 	%{_prefix}
BuildRequires:  imlib2-devel
BuildRequires:  tetex-texi2html
URL:		http://ffmpeg.sourceforge.net

%description
ffmpeg is a hyper fast realtime audio/video encoder, a streaming  server
and a generic audio and video file converter.

It can grab from a standard Video4Linux video source and convert it into
several file formats based on DCT/motion compensation encoding. Sound is
compressed in MPEG audio layer 2 or using an AC3 compatible stream.

%package -n %{libname}
Group:          System/Libraries
Summary:        Shared library part of ffmpeg
Provides:       libffmpeg = %{version}-%{release}

%description -n %{libname}
ffmpeg is a hyper fast realtime audio/video encoder, a streaming  server
and a generic audio and video file converter.

It can grab from a standard Video4Linux video source and convert it into
several file formats based on DCT/motion compensation encoding. Sound is
compressed in MPEG audio layer 2 or using an AC3 compatible stream.

Install libffmpeg if you want to encode multimedia streams.

%package -n %{libnamedev}
Group:          Development/C
Summary:        Header files and static library for the ffmpeg codec library
Requires:       %{libname} = %{version}-%{release}
Provides:       libffmpeg-devel = %{version}-%{release}
Provides:	ffmpeg-devel = %{version}-%{release}

%description -n %{libnamedev}
ffmpeg is a hyper fast realtime audio/video encoder, a streaming  server
and a generic audio and video file converter.

It can grab from a standard Video4Linux video source and convert it into
several file formats based on DCT/motion compensation encoding. Sound is
compressed in MPEG audio layer 2 or using an AC3 compatible stream.

Install libffmpeg-devel if you want to compile apps with ffmpeg support.

%prep

%setup -q -n %name-%version-%pre
%patch -p1
%patch1 -p1 -b .pic
%patch2 -p1 -b .gcc4

#don't call ldconfig on install
find -name Makefile | xargs perl -pi -e 's/ldconfig \|\| true//'
find -name Makefile | xargs perl -pi -e "s|\\\$\(prefix\)/lib|\\\$\(libdir\)|g"

%build
export CFLAGS="%optflags -fno-unit-at-a-time"
./configure --prefix=%_prefix --enable-shared --libdir=%{_libdir} --enable-a52 --enable-pp --enable-gpl
%make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall 

# make installlib is broken in 0.4.6
# so doing it by hand.
install -d %buildroot%_libdir

install -m 644 libavcodec/libavcodec.a %buildroot%_libdir
install -m 644 libavformat/libavformat.a %buildroot%_libdir

# compat symlink
install -d %buildroot/%_libdir/libavcodec
pushd %buildroot/%_libdir/libavcodec && ln -sf ../libavcodec.a && popd
install -d %buildroot/%_libdir/libavformat
pushd %buildroot/%_libdir/libavformat && ln -sf ../libavformat.a && popd

# fix doc containing CVS info.
rm -rf doc/CVS

# some apps need this header to build
install -m 644 libavcodec/mpegaudio.h %buildroot/%_includedir/%name

#gw we've changed the major, so we rename the libraries:
cd %buildroot%_libdir
mv libavcodec-%version-%pre.so libavcodec.so.%major.0
ln -sf libavcodec.so.%major.0 libavcodec.so.%major
ln -sf libavcodec.so.%major.0 libavcodec.so
mv libavformat-%version-%pre.so libavformat.so.%major.0
ln -sf libavformat.so.%major.0 libavformat.so.%major
ln -sf libavformat.so.%major.0 libavformat.so

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc Changelog INSTALL README doc/*.html doc/*.txt doc/TODO doc/*.conf
%{_bindir}/*
%_libdir/vhook/*
%_mandir/man1/*

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libavcodec.so.%{major}*
%{_libdir}/libavformat.so.%{major}*
%files -n %{libnamedev}
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/*.a
%{_libdir}/libavformat.so
%{_libdir}/libavcodec.so
%{_libdir}/libavformat/*a
%{_libdir}/libavcodec/*a

%changelog
* Wed Sep  7 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.4.9-0.pre1.5mdk
- gcc4 fixes

* Fri Dec 10 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.4.9-0.pre1.4mdk
- added an obvious lib64 fix

* Mon Nov 22 2004 Götz Waschk <waschk@linux-mandrake.com> 0.4.9-0.pre1.3mdk
- fix patch 0

* Thu Nov 18 2004 Götz Waschk <waschk@linux-mandrake.com> 0.4.9-0.pre1.2mdk
- fix doc file listing
- fix buildrequires

* Thu Nov 18 2004 Götz Waschk <waschk@linux-mandrake.com> 0.4.9-0.pre1.1mdk
- enable gpl
- drop patch 3 (merged)
- drop patch 2 (needs an update)
- update patches 0,1
- new version

* Thu Sep 09 2004 Warly <warly@mandrakesoft.com> 0.4.8-9mdk
- rebuild

* Thu Sep  9 2004 Götz Waschk <waschk@linux-mandrake.com> 0.4.8-8mdk
- fix build with current gcc aka disable unit-at-a-time

* Tue Apr 13 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.8-7mdk
- build DSO with PIC
- lib64 & 64-bit fixes

* Fri Jan 30 2004 Franck Villaume <fvill@freesurf.fr> 0.4.8-6mdk
- add missing libavformat.a

* Wed Jan 14 2004 Lenny Cartier <lenny@mandrakesoft.com> 0.4.8-5mdk
- provides ffmpeg-devel

* Fri Jan  9 2004 Götz Waschk <waschk@linux-mandrake.com> 0.4.8-4mdk
- enable postprocessing
- patch a major number into the shared libraries

* Sun Dec 14 2003 Austin Acton <austin@linux.ca> 0.4.8-3mdk
- enable a52 support
- add an extra header

* Thu Nov 27 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 0.4.8-2mdk
- moved unversioned symlinks belongs to devel package

* Tue Nov 18 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.4.8-1mdk
- 0.4.8
- use mklibname

* Thu Jan 16 2003 Yves Duret <yves@zarb.org> 0.4.6-2mdk
- put back %%_libdir/libavcodec/libavcodec.a compat symlink.
- add commentary about make installlib broken for the moment.

* Sat Jan  4 2003 Götz Waschk <waschk@linux-mandrake.com> 0.4.6-1mdk
- fix installation
- new version

* Sun Dec 15 2002 Yves Duret <yves@zarb.org> 0.4.6-0.20021209.2mdk
- use make installlib instead of doing it by hand.
- added a symlink %_libdir/libavcodec/libavcodec.a to .. for some soft that
  search libavcodec.a here.

* Mon Dec  9 2002 Götz Waschk <waschk@linux-mandrake.com> 0.4.6-0.20021209.1mdk
- add avformat stuff for gstreamer
- add vhook plugins
- build with imlib2 support
- new snapshot

* Mon Oct 28 2002 Götz Waschk <waschk@linux-mandrake.com> 0.4.6-0.20021028.1mdk
- latest CVS snapshot

* Mon Aug 19 2002 Han Boetes <han@linux-mandrake.com> 0.4.6-0.20020819.1mdk
- update a bit
- Minor cleanups

* Wed Jul 10 2002 Götz Waschk <waschk@linux-mandrake.com> 0.4.6-0.20020710.1mdk
- change the major to 0.4.6 
- new cvs snapshot

* Thu Jun 06 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.4.6-0.20020605.2mdk
- enabled mmx again, there is runtime detection (Götz Waschk <waschk@linux-mandrake.com>)

* Thu Jun 06 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.4.6-0.20020605.1mdk
- updated snapshot
- fixed build
- disabled mmx :-(
- documentation for main package only
- added missing binaries

* Sat May 18 2002 Yves Duret <yduret@mandrakesoft.com> 0.4.6-0.20020417.4mdk
- include libavcodec.a (no official release with a stable API -> static linking).
- fix FAQ missing (now in doc/FAQ).

* Wed May 15 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.4.6-0.20020417.3mdk
- fixed wrong release

* Wed May 08 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.4.6-0.20020417.2mdk
- added missing provides

* Wed Apr 17 2002 Götz Waschk <waschk@linux-mandrake.com> 0.4.6-0.20020417.1mdk
- update to CVS snapshot
- build shared library
- split package
- don't use %%configure, it's not an autoconf script
- add header files

* Mon Sep 10 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.4.5-1mdk
- added in contribs by Götz Waschk <waschk@linux-mandrake.com> :
        - removed ffserver, because it doesn't work according to the FAQ
        - initial package


# end of file