%define name ffmpeg %define version 0.4.9 %define svn 6122 %define pre pre1.%svn %define rel 2 %define release %mkrel 3.%pre.%rel %define major 51 %define amrver 540 %define libname %mklibname %name %major %define libnamedev %mklibname %name %major -d %define avfmajor 50 %define avflibname %mklibname avformats %avfmajor %define avumajor 49 %define avulibname %mklibname avutil %avumajor %define build_plf 0 %{?_with_plf: %{expand: %%global build_plf 1}} %if %build_plf %define distsuffix plf %endif Name: %{name} Version: %{version} Release: %{release} Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder Source0: %{name}-%{svn}.tar.bz2 Source1: http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-%{amrver}.zip Patch1: ffmpeg-ffplay-uses-xlib.patch.bz2 License: GPL Group: Video BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: imlib2-devel BuildRequires: tetex-texi2html BuildRequires: SDL-devel URL: http://ffmpeg.sourceforge.net %if %build_plf BuildRequires: libfaac-devel libfaad2-devel xvid-devel x264-devel liblame-devel %endif %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 %{avflibname} Group: System/Libraries Summary: Shared library part of ffmpeg %description -n %{avflibname} 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 %{avulibname} Group: System/Libraries Summary: Shared library part of ffmpeg %description -n %{avulibname} 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} Requires: %{avflibname} = %{version} Requires: %{avulibname} = %{version} 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} -a 1 %patch1 -p1 -b .ffplay-uses-xlib %if %build_plf unzip -qq 26104-%{amrver}_ANSI_C_source_code.zip mv c-code libavcodec/amr_float %endif #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" ./configure --prefix=%_prefix --enable-shared --libdir=%{_libdir} --enable-a52 --enable-pp --enable-gpl --enable-pthreads \ %if %build_plf --enable-mp3lame --enable-faad --enable-faac --enable-x264 --enable-xvid --enable-amr_nb %endif %make %install rm -rf $RPM_BUILD_ROOT %makeinstall_std mkdir -p %buildroot%_mandir/ mv %buildroot%_prefix/man/* %buildroot%_mandir/ %if %_lib != lib mv %buildroot%_prefix/lib/* %buildroot%_libdir/ %endif # 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 %clean rm -rf $RPM_BUILD_ROOT %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %post -n %{avflibname} -p /sbin/ldconfig %postun -n %{avflibname} -p /sbin/ldconfig %post -n %{avulibname} -p /sbin/ldconfig %postun -n %{avulibname} -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}/libpostproc.so.%{major}* %files -n %{avflibname} %defattr(-,root,root) %{_libdir}/libavformat.so.%{avfmajor}* %files -n %{avulibname} %defattr(-,root,root) %{_libdir}/libavutil.so.%{avumajor}* %files -n %{libnamedev} %defattr(-,root,root) %{_includedir}/%{name} %{_includedir}/postproc/ %{_libdir}/*.a %{_libdir}/libavcodec.so %{_libdir}/libavformat.so %{_libdir}/libavutil.so %{_libdir}/libpostproc.so %{_libdir}/libavformat/*a %{_libdir}/libavcodec/*a %_libdir/pkgconfig/*.pc %changelog * Tue Sep 12 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.6122.2mdv2007.0 - fix installaion on x86_64 * Tue Aug 29 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.6122.1mdv2007.0 - update the patch - new snapshot * Sat Aug 12 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.4.9-3.pre1.5435.3 - patch1: link ffplay_g against libX11 since it calls XOpenDisplay * Sun Jul 23 2006 Anssi Hannula <anssi@mandriva.org> 0.4.9-3.pre1.5435.2mdv2007.0 - drop -fno-unit-at-a-time, isn't required anymore and breaks x86_64 build - rpmbuildupdate-friendly %%rel - fix buildrequires * Sat Jun 17 2006 Stefan van der Eijk <stefan@eijk.nu.lurtspam> 0.4.9-1mdv2007.0 - rebuild for sparc * Wed May 31 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-2.pre1.5435.1mdv2007.0 - drop patch - new svn snapshot * Mon May 29 2006 Frederic Crozat <fcrozat@mandriva.com> 0.4.9-0.pre1.20060519.1mdv2007.0 - new snapshot (20060515) - Patch0: add support for decoding H264 MBAFF * Sun May 14 2006 Stefan van der Eijk <stefan@eijk.nu> 0.4.9-0.pre1.20060421.2mdk - rebuild for sparc * Fri Apr 21 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-0.pre1.20060421.1mdk - new snapshot * Thu Mar 9 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-0.pre1.20060309.1mdk - add amr_nb support - drop patches - new snapshot * Wed Dec 14 2005 Götz Waschk <waschk@mandriva.org> 0.4.9-0.pre1.7mdk - security update for CVE-2005-3048 (P3) * Wed Nov 9 2005 Götz Waschk <waschk@mandriva.org> 0.4.9-0.pre1.6mdk - mkrel - enable threading - conditionally build with all optional codecs * 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