%define name ffmpeg %define version 0.6 %define svn 22960 %define prerel %svn %define release %mkrel -c %prerel 5 %define major 52 %define libname %mklibname %name %major %define develname %mklibname %name -d %define staticname %mklibname %name -s -d %define avfmajor 52 %define avflibname %mklibname avformats %avfmajor %define postprocmajor 51 %define postproclibname %mklibname postproc %postprocmajor %define avumajor 50 %define avulibname %mklibname avutil %avumajor %define swsmajor 0 %define swslibname %mklibname swscaler %swsmajor %define build_swscaler 1 %define build_plf 0 %{?_with_plf: %{expand: %%global build_plf 1}} %if %build_plf %define distsuffix plf %endif %define build_faac 0 %{?_with_faac: %{expand: %%global build_faac 1}} %{?_without_faac: %{expand: %%global build_faac 0}} Name: %{name} Version: %{version} Release: %{release} Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder Source0: http://ffmpeg.org/releases/%{name}-r%{svn}.tar.xz Patch1: ffmpeg-linkage_fix.diff # (Anssi) fix a regression causing wrong fourcc selection for VP6F remuxing # (ok'd by upstream) Patch2: ffmpeg-move-vp6f-up.patch %if %build_plf License: GPLv3+ %else License: GPLv2+ %endif Group: Video BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: tetex-texi2html BuildRequires: SDL-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel BuildRequires: libjack-devel BuildRequires: libdc1394-devel BuildRequires: libschroedinger-devel %if %{mdkversion} >= 200900 BuildRequires: vdpau-devel %endif URL: http://ffmpeg.org/ %if %build_plf BuildRequires: libfaad2-devel BuildRequires: x264-devel >= 0.83 BuildRequires: liblame-devel BuildRequires: opencore-amr-devel %endif %if %build_faac BuildRequires: libfaac-devel %endif Requires: %postproclibname = %version-%release Requires: %libname = %version-%release Requires: %avflibname = %version-%release Requires: %avulibname = %version-%release %if %build_swscaler Requires: %{swslibname} = %{version}-%release %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. %if %build_plf This package is in PLF as it violates several patents. %endif %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 %{postproclibname} Group: System/Libraries Summary: Shared library part of ffmpeg Conflicts: %mklibname ffmpeg 51 %description -n %{postproclibname} 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 %{swslibname} Group: System/Libraries Summary: Shared library part of ffmpeg Requires: %{avulibname} = %{version}-%release %description -n %{swslibname} 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 %develname Group: Development/C Summary: Header files for the ffmpeg codec library Requires: %{libname} = %{version}-%release Requires: %{avflibname} = %{version}-%release Requires: %{avulibname} = %{version}-%release Requires: %{postproclibname} = %{version}-%release %if %build_swscaler Requires: %{swslibname} = %{version}-%release %endif Provides: libffmpeg-devel = %{version}-%{release} Provides: ffmpeg-devel = %{version}-%{release} Obsoletes: %mklibname -d %name 51 %description -n %develname 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. %package -n %staticname Group: Development/C Summary: Static library for the ffmpeg codec library Requires: %develname = %{version}-%release Provides: libffmpeg-static-devel = %{version}-%{release} Obsoletes: %mklibname -s -d %name 51 %description -n %staticname 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} %if %build_swscaler %endif %patch1 -p0 -b .linkage_fix %patch2 -p1 #find -name Makefile | xargs perl -pi -e "s|\\\$\(prefix\)/lib|\\\$\(libdir\)|g" %build export CFLAGS="%optflags -FPIC" export LDFLAGS="%{ldflags}" ./configure --prefix=%_prefix \ --enable-shared \ --libdir=%{_libdir} \ --shlibdir=%{_libdir} \ --incdir=%{_includedir} \ --disable-stripping \ --enable-postproc \ --enable-gpl \ --enable-pthreads \ --enable-libtheora \ --enable-libvorbis --disable-encoder=vorbis \ --enable-x11grab \ --enable-runtime-cpudetect \ --enable-libdc1394 \ --enable-libschroedinger \ %if %build_plf --enable-libmp3lame \ --enable-libfaad \ --enable-libopencore-amrnb \ --enable-libopencore-amrwb \ --enable-version3 \ --enable-libx264 \ %else --disable-decoder=aac --disable-encoder=aac \ %endif %if %build_faac --enable-nonfree --enable-libfaac %endif make %install rm -rf %{buildroot} %makeinstall_std SRC_PATH=`pwd` # 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 %clean rm -rf %{buildroot} %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{libname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %post -n %{avflibname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{avflibname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %post -n %{avulibname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{avulibname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %post -n %{swslibname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{swslibname} -p /sbin/ldconfig %endif %files %defattr(-,root,root) %doc Changelog INSTALL README doc/*.html doc/*.txt doc/TODO doc/*.conf %{_bindir}/* %_mandir/man1/* %_datadir/ffmpeg %files -n %{libname} %defattr(-,root,root) %{_libdir}/libavcodec.so.%{major}* %files -n %postproclibname %defattr(-,root,root) %{_libdir}/libpostproc.so.%{postprocmajor}* %files -n %{avflibname} %defattr(-,root,root) %{_libdir}/libavformat.so.%{avfmajor}* %{_libdir}/libavdevice.so.%{avfmajor}* %files -n %{avulibname} %defattr(-,root,root) %{_libdir}/libavutil.so.%{avumajor}* %if %build_swscaler %files -n %{swslibname} %defattr(-,root,root) %{_libdir}/libswscale.so.%{swsmajor}* %endif %files -n %develname %defattr(-,root,root) %{_includedir}/libavcodec %{_includedir}/libavdevice %{_includedir}/libavformat %{_includedir}/libavutil %{_includedir}/libpostproc %{_libdir}/libavcodec.so %{_libdir}/libavdevice.so %{_libdir}/libavformat.so %{_libdir}/libavutil.so %{_libdir}/libpostproc.so %if %build_swscaler %{_libdir}/libswscale.so %{_includedir}/libswscale %_libdir/pkgconfig/libswscale.pc %endif %_libdir/pkgconfig/libavcodec.pc %_libdir/pkgconfig/libavdevice.pc %_libdir/pkgconfig/libavformat.pc %_libdir/pkgconfig/libavutil.pc %_libdir/pkgconfig/libpostproc.pc %files -n %staticname %defattr(-,root,root) %{_libdir}/*.a %{_libdir}/libavformat/*a %{_libdir}/libavcodec/*a %changelog * Tue Jun 15 2010 Götz Waschk <waschk@mandriva.org> 0.6-0.22960.5mdv2010.1 + Revision: 548077 - disable internal vorbis encoder (bug #59797) - disable AAC decoder and encoder * Wed May 05 2010 Götz Waschk <waschk@mandriva.org> 0.6-0.22960.4mdv2010.1 + Revision: 542343 - rebuild * Sun May 02 2010 Anssi Hannula <anssi@mandriva.org> 0.6-0.22960.3mdv2010.1 + Revision: 541620 - fix debug packages (stripping happened too early) - fix a regression causing wrong fourcc selection for VP6F remuxing (ffmpeg-move-vp6f-up.patch) * Sun Apr 25 2010 Götz Waschk <waschk@mandriva.org> 0.6-0.22960.2mdv2010.1 + Revision: 538605 - new snapshot - drop patch 2 * Sun Jan 24 2010 Emmanuel Andry <eandry@mandriva.org> 0.6-0.21383.2mdv2010.1 + Revision: 495465 - enable cpu detection at run time - enable schroedinger and firewire support + Götz Waschk <waschk@mandriva.org> - bump x264 dep * Fri Jan 22 2010 Emmanuel Andry <eandry@mandriva.org> 0.6-0.21383.1mdv2010.1 + Revision: 495040 - New svn snapshot * Wed Jan 13 2010 Emmanuel Andry <eandry@mandriva.org> 0.6-0.21185.1mdv2010.1 + Revision: 490732 - New svn snapshot + Anssi Hannula <anssi@mandriva.org> - build with vdpau support on 2009.0+ (BR vdpau-devel) * Sun Jan 03 2010 Emmanuel Andry <eandry@mandriva.org> 0.6-0.21005.1mdv2010.1 + Revision: 485996 - New svn snapshot + Götz Waschk <waschk@mandriva.org> - add more deps to the main package (gc) * Wed Dec 09 2009 Götz Waschk <waschk@mandriva.org> 0.6-0.20785.1mdv2010.1 + Revision: 475702 - new snapshot - fix x264 build - bump x264 dep * Sat Nov 07 2009 Götz Waschk <waschk@mandriva.org> 0.6-0.20469.1mdv2010.1 + Revision: 462295 - new snapshot - drop imgresample patch, the old API is now gone - new major - replace amr by openamr - disable faac support - update build deps - update license + Oden Eriksson <oeriksson@mandriva.com> - new url * Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 0.5-2mdv2010.0 + Revision: 424434 - rebuild + Götz Waschk <waschk@mandriva.org> - fix source URL * Wed Mar 11 2009 Götz Waschk <waschk@mandriva.org> 0.5-1mdv2009.1 + Revision: 353681 - new version + Anssi Hannula <anssi@mandriva.org> - build_amr option (disabled by default) needs --enable-nonfree * Mon Mar 02 2009 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.17730.1mdv2009.1 + Revision: 346936 - new snapshot - rediff patch 0 * Wed Feb 11 2009 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.17149.1mdv2009.1 + Revision: 339358 - new snapshot - rediff patch 0 - drop patch 2 * Thu Jan 29 2009 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.16849.1mdv2009.1 + Revision: 335215 - disable parallel build - rediff the patch again - new snapshot - fix format strings - update file list * Sat Dec 20 2008 Oden Eriksson <oeriksson@mandriva.com> 0.4.9-3.pre1.15623.2mdv2009.1 + Revision: 316743 - rediffed one fuzzy patch - use %%ldflags and fix linkage (P1) * Wed Oct 15 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.15623.1mdv2009.1 + Revision: 293924 - new snapshot - explicit dep on libpostproc to fix upgrades - spec cleanup - bump x264 dep * Sat Oct 11 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.15595.1mdv2009.1 + Revision: 292264 - new snapshot - add conflict with old ffmpeg package to libpostproc * Sat Oct 11 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.15593.1mdv2009.1 + Revision: 291905 - new snapshot - new major - split out libpostproc - changes recommended upstream: * disable external libnut support * drop liba52dec, xvid * Fri Jul 11 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.14161.1mdv2009.0 + Revision: 233641 - new snapshot - remove mpegaudio.h again * Thu Jul 10 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.14158.1mdv2009.0 + Revision: 233512 - new snapshot - update patch 0 - add missing headers requested in bug #41949 + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers + Anssi Hannula <anssi@mandriva.org> - update reenable-imgresample.patch so that duplicate sws_ symbols are omitted from libavcodec (from Debian adaptation of the patch) - drop now unneeded ffplay-uses-xlib.patch (ffplay only uses SDL) * Thu May 15 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.13155.1mdv2009.0 + Revision: 207573 - new snapshot - reenable deprecated libavcodec image scaler for vlc + Anssi Hannula <anssi@mandriva.org> - set --incdir explicitely so that pkg-config files get generated correctly * Fri Apr 25 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.12949.2mdv2009.0 + Revision: 197445 - bump for build system trouble - new snapshot - reenable swscaler * Thu Apr 24 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.12933.2mdv2009.0 + Revision: 197156 - fix header file conflict * Thu Apr 24 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.12933.1mdv2009.0 + Revision: 197142 - new version - drop dirac support - fix build - update file list - update license tag - disable amr_nb and amr_wb in PLF, it would make the build undistributable + Anssi Hannula <anssi@mandriva.org> - use --shlibdir instead of move hack for lib64 * Mon Mar 17 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.11599.2mdv2008.1 + Revision: 188363 - enable vorbis and theora * Wed Jan 23 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.11599.1mdv2008.1 + Revision: 157005 - new version - update dirac deps - update dirac patch - fix pkgconfig file generated by dirac patch * Thu Jan 17 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.11552.1mdv2008.1 + Revision: 154480 - new version - fix versioned deps between the packages, the important part is the release * Wed Jan 02 2008 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.11372.3mdv2008.1 + Revision: 140384 - new version - bump avformat major - add libavdevice - rediff patch 3 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Thu Dec 20 2007 Thierry Vignaud <tv@mandriva.org> 0.4.9-3.pre1.10833.2mdv2008.1 + Revision: 135865 - build with -fPIC (#35955) - kill re-definition of %%buildroot on Pixel's request * Mon Oct 22 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.10833.1mdv2008.1 + Revision: 101075 - new version - drop patch 0 * Fri Oct 12 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.10713.2mdv2008.1 + Revision: 97491 - fix dirac patch to correctly generate the pkgconfig files - new devel name - fix configure options * Fri Oct 12 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.10713.1mdv2008.1 + Revision: 97355 - new version - patch0: build fix - update dirac patch - update deps * Sat May 12 2007 Anssi Hannula <anssi@mandriva.org> 0.4.9-3.pre1.8994.2mdv2008.0 + Revision: 26484 - fix pkgconfig requires for dirac * Fri May 11 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.8994.1mdv2008.0 + Revision: 26250 - new version - patch for dirac support - fix buildrequires - drop merged patch 2 - drop amr source, support using external libamrnb instead * Tue Mar 13 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.7407.10mdv2007.1 + Revision: 142154 - disable swscaler, it was breaking vlc * Sun Mar 11 2007 Giuseppe Ghibò <ghibo@mandriva.com> 0.4.9-3.pre1.7407.9mdv2007.1 + Revision: 141436 - Added swslib into Requires for devel package. * Sun Mar 11 2007 Giuseppe Ghibò <ghibo@mandriva.com> 0.4.9-3.pre1.7407.8mdv2007.1 + Revision: 141435 - Added swscaler library and subpackage. + Götz Waschk <waschk@mandriva.org> - create static devel package as the devel package was getting large * Tue Jan 23 2007 Frederic Crozat <fcrozat@mandriva.com> 0.4.9-3.pre1.7407.7mdv2007.1 + Revision: 112478 - Patch1: fix wrong define in header * Thu Jan 11 2007 Frederic Crozat <fcrozat@mandriva.com> 0.4.9-3.pre1.7407.6mdv2007.1 + Revision: 107507 - Enable x11grab input * Thu Jan 04 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.7407.5mdv2007.1 + Revision: 104228 - fix devel deps * Thu Jan 04 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.7407.4mdv2007.1 + Revision: 104160 - bot rebuild - bot rebuild - enable libnut * Thu Jan 04 2007 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.7407.1mdv2007.1 + Revision: 104009 - new snapshot * Wed Nov 08 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.6941.1mdv2007.1 + Revision: 78118 - new snapshot - fix installation - new version - new snapshot - new libavformat major - bump deps fix description * Thu Oct 19 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.6725.1mdv2007.1 + Revision: 66424 - new release rediff the patch + Oden Eriksson <oeriksson@mandriva.com> - bzip2 cleanup - bunzip patches - Import ffmpeg * Wed Sep 13 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.6122.2mdv2007.0 - fix installaion on x86_64 * Wed Aug 30 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-3.pre1.6122.1mdv2007.0 - update the patch - new snapshot * Sun Aug 13 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.4.9-3.pre1.5435.3 - patch1: link ffplay_g against libX11 since it calls XOpenDisplay * Mon Jul 24 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 * Sun Jun 18 2006 Stefan van der Eijk <stefan@eijk.nu.lurtspam> 0.4.9-1mdv2007.0 - rebuild for sparc * Thu Jun 01 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-2.pre1.5435.1mdv2007.0 - drop patch - new svn snapshot * Tue May 30 2006 Frederic Crozat <fcrozat@mandriva.com> 0.4.9-0.pre1.20060519.1mdv2007.0 - new snapshot (20060515) - Patch0: add support for decoding H264 MBAFF * Mon May 15 2006 Stefan van der Eijk <stefan@eijk.nu> 0.4.9-0.pre1.20060421.2mdk - rebuild for sparc * Sat Apr 22 2006 Götz Waschk <waschk@mandriva.org> 0.4.9-0.pre1.20060421.1mdk - new snapshot * Thu Mar 09 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 09 2005 Götz Waschk <waschk@mandriva.org> 0.4.9-0.pre1.6mdk - mkrel - enable threading - conditionally build with all optional codecs * Thu Sep 08 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 * Fri Sep 10 2004 Warly <warly@mandrakesoft.com> 0.4.8-9mdk - rebuild * Fri Sep 10 2004 Götz Waschk <waschk@linux-mandrake.com> 0.4.8-8mdk - fix build with current gcc aka disable unit-at-a-time * Wed Apr 14 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.8-7mdk - build DSO with PIC - lib64 & 64-bit fixes