Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 98a12da06368ce9074d2e98cee32553b > files > 5

ffmpeg-0.6.6-0.1.mga1.src.rpm

%define name	ffmpeg
%define version	0.6.6
%define prerel	0
%define subrel  1
%define release %mkrel 0
%define subrel  1
%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
%if "%distro_section" == "tainted"
%global build_plf 1
%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}-%version.tar.bz2
Patch1:		ffmpeg-linkage_fix.diff
# (cjw) support for external libvo-amrwbenc and libvo-aacenc encoding libs, backported from ffmpeg git
# http://git.videolan.org/?p=ffmpeg.git;a=patch;h=f502ff3f61dfdc7c4180b6a24cec6237c38bc148
Patch3:		ffmpeg-git-libvo-002.patch
# original patch taken from ffmpeg git:
# http://git.videolan.org/?p=ffmpeg.git;a=patch;h=979bea13003ef489d95d2538ac2fb1c26c6f103b
# rediffed against ffmpeg 0.6.3
Patch8:	ffmpeg-0.6.3-mga-check_all_svq3_get_ue_golomb_returns.patch

%if %build_plf
License: 	GPLv3+
%else
License: 	GPLv2+
%endif
Group: 	 	Video
#BuildRequires:  tetex-texi2html
BuildRequires:	SDL-devel
BuildRequires:	libtheora-devel
BuildRequires:	libvorbis-devel
BuildRequires:	libjack-devel
BuildRequires:	libdc1394-devel
BuildRequires:	libschroedinger-devel
BuildRequires:	libvpx-devel
BuildRequires:	jpeg-devel
BuildRequires:	libpng-devel
BuildRequires:	bzip2-devel
BuildRequires:	rtmp-devel
BuildRequires:	vdpau-devel
BuildRequires:	libva-devel
URL:		http://ffmpeg.org/
%if %build_plf
BuildRequires: libfaad2-devel
BuildRequires: x264-devel >= 0.83
BuildRequires: liblame-devel
BuildRequires: opencore-amr-devel
BuildRequires: libvo-aacenc-devel
BuildRequires: libvo-amrwbenc-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 the "tainted" section 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
%endif
%patch1 -p0 -b .linkage_fix
%patch3 -p1 -b .libvo-002
%patch8 -p1 -b .check_all_svq3_get_ue_golomb_returns.patch

#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-libvpx \
	--enable-x11grab \
	--enable-runtime-cpudetect \
	--enable-libdc1394 \
	--enable-libschroedinger \
	--enable-librtmp \
%if %build_plf
	--enable-libmp3lame \
	--enable-libfaad \
	--enable-libopencore-amrnb \
	--enable-libopencore-amrwb \
	--enable-version3 \
	--enable-libx264 \
	--enable-libvo-aacenc \
	--enable-libvo-amrwbenc \
%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}

%files
%defattr(-,root,root)
%doc Changelog INSTALL README doc/*.txt doc/TODO doc/*.conf
%{_bindir}/*
%_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 12 2012 fwang <fwang> 0.6.6-0.1.mga1
+ Revision: 259997
- new version 0.6.6
- new version 0.6.5 (fixing CVE-2011-3892, CVE-2011-3893, CVE-2011-3895)
- revert to 0.6.3
- disable x264 support as x264 is too old in mageia 1
- faad support removed
- update file list
- fix str fmt
- br yasm
- drop all upstream merged patches
- new version 0.7.8 (fix SA46888: http://secunia.com/advisories/46888/)

  + dmorgan <dmorgan>
    - Remove P6: Merged
    - Remove P5: Merged
    - Remove P4: Merged
    - Remove P2: Merged
    - New version 0.6.4
      Patches needing rediff: 2,3,4,5,6

  + doktor5000 <doktor5000>
    - fixed CVE-2011-1196, denial of service and possible code execution via
      malformed OGG file (from Ubuntu, cve-2011-1196.patch)
    - fixed CVE-2011-3362, arbitrary code execution via malformed CAVS file
      (from Ubuntu, cve-2011-3362.patch)
    - fix unchecked return values that may cause a crash
      (from upstream, check_all_svq3_get_ue_golomb_returns.patch)

* Sun May 29 2011 pterjan <pterjan> 0.6.3-2.mga1.tainted
+ Revision: 100677
- Fix description of tainted package
- Enable tainted build

  + cjw <cjw>
    - patch2-5: add support for vo-amrwbenc and vo-aacenc (from ffmpeg git)

* Wed Apr 27 2011 colin <colin> 0.6.3-1.mga1
+ Revision: 92150
- New bugfix release

* Fri Jan 14 2011 dmorgan <dmorgan> 0.6.1-2.mga1
+ Revision: 18043
- Get rid of mdv macros

  + ahmad <ahmad>
    - imported package ffmpeg