%define majoravcodec 52 %define majoravdevice 52 %define majoravformat 52 %define majoravutil 50 %define majoravfilter 1 %define majorpostproc 51 %define majorswscale 0 Name: ffmpeg Version: 0.9.1 Release: 1 License: LGPL v2 or later and some code GPL v2 or later Group: Productivity/Multimedia/Video/Editors and Convertors Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder URL: http://ffmpeg.mplayerhq.hu Source0: %{name}-%{version}.tar.bz2 Source1: %{name}-%{version}.tar.bz2.asc Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: AIX-rpm >= 5.2.0.0 BuildRequires: coreutils BuildRequires: gcc >= 4.2.3-2 BuildRequires: make >= 3.81 BuildRequires: bzip2 >= 1.0.2-4 BuildRequires: opencore-amr >= 0.1.2-1 BuildRequires: faac >= 1.28-1 BuildRequires: faad2 >= 2.7-1 BuildRequires: lame >= 3.98.4-1 BuildRequires: libtheora >= 1.1.1-1 BuildRequires: libvorbis >= 1.3.1-1 BuildRequires: libvpx >= 0.9.6 BuildRequires: openjpeg >= 1.4-1 BuildRequires: schroedinger >= 1.0.9-1 BuildRequires: speex >= 1.2rc-1 BuildRequires: x264 >= 0.20111004-1 BuildRequires: xvidcore >= 1.2.2-1 BuildRequires: zlib >= 1.2.3-3 Requires: AIX-rpm >= 5.2.0.0 Requires: %{name}-libs = %{version}-%{release} Requires: libgcc >= 4.2.3-2 Conflicts: libav %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 libs Group: System Environment/Libraries Summary: Run-time libraries for the %{name} library Requires: bzip2 >= 1.0.2-4 Requires: opencore-amr >= 0.1.2-1 Requires: faac >= 1.28-1 Requires: faad2 >= 2.7-1 Requires: lame >= 3.98.4-1 Requires: libtheora >= 1.1.1-1 Requires: libvorbis >= 1.3.1-1 Requires: libvpx >= 0.9.6 Requires: openjpeg >= 1.4-1 Requires: schroedinger >= 1.0.9-1 Requires: speex >= 1.2rc-1 Requires: x264 >= 0.20111004-1 Requires: xvidcore >= 1.2.2-1 Requires: zlib >= 1.2.3-3 %description libs 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. This package contains the run-time libraries for %{name}. %package devel Group: Development/Libraries/C and C++ Summary: Header files for the %{name} library Requires: %{name}-libs = %{version}-%{release} Requires: bzip2 >= 1.0.2-4 Requires: opencore-amr-devel >= 0.1.2-1 Requires: faac-devel >= 1.28-1 Requires: faad2-devel >= 2.7-1 Requires: lame-devel >= 3.98.4-1 Requires: libtheora-devel >= 1.1.1-1 Requires: libvorbis-devel >= 1.3.1-1 Requires: libvpx-devel >= 0.9.6 Requires: openjpeg-devel >= 1.4-1 Requires: schroedinger-devel >= 1.0.9-1 Requires: speex-devel >= 1.2rc-1 Requires: x264-devel >= 0.20111004-1 Requires: xvidcore-devel >= 1.2.2-1 Requires: zlib-devel >= 1.2.3-3 %description devel 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 %patch0 %build export OBJECT_MODE=32 export CC="gcc -maix32" export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --shlibdir=%{_libdir} \ --mandir=%{_mandir} \ --disable-shared \ --enable-gpl \ --enable-version3 \ --enable-nonfree \ --enable-postproc \ --enable-avfilter \ --enable-pthreads \ --enable-x11grab \ --enable-memalign-hack \ \ --enable-bzlib \ --enable-libopencore-amrnb --enable-libopencore-amrwb \ --disable-libdirac \ --enable-libfaac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopenjpeg \ --enable-libschroedinger \ --enable-libspeex \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-libxvid \ --enable-zlib \ \ --disable-asm \ --disable-altivec \ --disable-sse \ --enable-pic \ --disable-debug gmake %{?_smp_mflags} # # convert all static libraries into shared ones # rpath="-Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib" build_shlib() { i=$1 cd ${i} CreateExportList -X32 ${i}.exp ${i}.a ${CC} -shared ${i}.a -o ${i}.so.${sorev} -Wl,-bE:${i}.exp ${rpath} ${deplibs} rm -f ${i}.exp rm -f ${i}.a # now create the AIX-style shared library /usr/bin/ar -X32 -rv ${i}.a ${i}.so.${sorev} cd .. } deplibs="-lm" sorev=50 build_shlib libavutil deplibs="-lpthread -lm -L/opt/freeware/lib -lbz2 -lfaac -lfaad -lmp3lame -lopencore-amrnb -lopencore-amrwb -lopenjpeg -lschroedinger-1.0 -lspeex -ltheoraenc -ltheoradec -lvorbis -lvorbisenc -lvpx -lx264 -lxvidcore -lz -lSDL -L../libavutil -lavutil" sorev=52 build_shlib libavcodec deplibs="-lpthread -lm -lbz2 -lfaac -lfaad -lmp3lame -lopencore-amrnb -lopencore-amrwb -lopenjpeg -lschroedinger-1.0 -lspeex -ltheora -lvorbis -lvorbisenc -lvpx -lx264 -lxvidcore -lz -L../libavutil -lavutil -L../libavcodec -lavcodec" sorev=52 build_shlib libavformat deplibs="-lm -L../libavutil -lavutil" sorev=0 build_shlib libswscale deplibs="-L../libavutil -lavutil -L../libavcodec -lavcodec -L../libavformat -lavformat -L../libswscale -lswscale -lfreetype -lm" sorev=1 build_shlib libavfilter deplibs="-lm -lSDL -L../libavutil -lavutil -L../libavcodec -lavcodec -L../libavformat -lavformat -L../libavfilter -lavfilter" sorev=52 build_shlib libavdevice deplibs="-L../libavutil -lavutil" sorev=51 build_shlib libpostproc # redo compile step to link binaries against the new shared libraries gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export PATH=/opt/freeware/bin:$PATH gmake DESTDIR=${RPM_BUILD_ROOT} install # stripping is automatically done by 'gmake install' #/usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc COPYING.* CREDITS INSTALL MAINTAINERS README doc %{_bindir}/* # no working texi2html yet :-( #%{_mandir}/man1/* %{_datadir}/%{name} /usr/bin/* %files libs %defattr(-,root,system) %doc COPYING.* CREDITS INSTALL MAINTAINERS README %{_libdir}/*.a %{_libdir}/*.so* /usr/lib/*.a /usr/lib/*.so* %files devel %defattr(-,root,system) %doc COPYING.* CREDITS INSTALL MAINTAINERS README %{_includedir}/* %{_libdir}/pkgconfig/*.pc /usr/include/* %changelog * Thu Jan 05 2012 Michael Perzl - 0.9.1-1 - updated to version 0.9.1 * Tue Dec 13 2011 Michael Perzl - 0.9-1 - updated to version 0.9 * Tue Nov 22 2011 Michael Perzl - 0.8.7-1 - updated to version 0.8.7 * Sat Nov 05 2011 Michael Perzl - 0.8.6-1 - updated to version 0.8.6 * Tue Oct 04 2011 Michael Perzl - 0.8.5-1 - updated to version 0.8.5 * Thu Sep 29 2011 Michael Perzl - 0.8.4-1 - updated to version 0.8.4 * Thu Sep 08 2011 Michael Perzl - 0.8.3-1 - updated to version 0.8.3 * Thu Sep 08 2011 Michael Perzl - 0.7.4-1 - updated to version 0.7.4 * Thu Jun 23 2011 Michael Perzl - 0.7-1 - updated to version 0.7 * Thu Apr 07 2011 Michael Perzl - 0.6.90-rc0-1 - updated to version 0.6.90-rc0 * Thu Apr 07 2011 Michael Perzl - 0.6.2-1 - updated to version 0.6.2 * Thu Feb 03 2011 Michael Perzl - 0.6.1-1 - first version for AIX V5.1 and higher