%define name ffmpeg %define version 0.5 %define svn 17730 %define pre 0.%svn %define rel 2 %define release %mkrel %rel %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 49 %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_amr 0 %{?_with_amr: %{expand: %%global build_amr 1}} %{?_without_amr: %{expand: %%global build_amr 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}-%{version}.tar.bz2 #gw WARNING: reenabling libavcodec's deprecated image resampler #anssi discussion and debian patch: # http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/69238 # http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/015_reenable-img_convert.diff?op=file Patch0: ffmpeg-reenable-imgresample.patch Patch1: ffmpeg-linkage_fix.diff License: GPLv2+ Group: Video BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: imlib2-devel BuildRequires: tetex-texi2html BuildRequires: SDL-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel URL: http://ffmpeg.sourceforge.net %if %build_plf BuildRequires: libfaac-devel libfaad2-devel BuildRequires: x264-devel >= 0.65 BuildRequires: liblame-devel %endif %if %build_amr BuildRequires: libamrnb-devel BuildRequires: libamrwb-devel %endif Requires: %postproclibname = %version-%release %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}-%version %if %build_swscaler %patch0 -p1 -b .reenable-imgresample %endif %patch1 -p0 -b .linkage_fix #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} \ --enable-postproc \ --enable-gpl \ --enable-pthreads \ --enable-libtheora \ --enable-libvorbis \ --enable-x11grab \ %if %build_swscaler --enable-swscale \ %endif %if %build_plf --enable-libmp3lame \ --enable-libfaad \ --enable-libfaac \ --enable-libx264 \ %endif %if %build_amr --enable-nonfree --enable-libamr_nb --enable-libamr_wb %endif make %install rm -rf $RPM_BUILD_ROOT %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 $RPM_BUILD_ROOT %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}/* %_libdir/vhook/* %_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 * Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 0.5-2mdv2010.0 + Revision: 424434 - rebuild * 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 <tvignaud@mandriva.com> 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