Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 4d746752f559d8185f1bc8c558422131 > files > 3

ffmpeg-0.4.9-3.pre1.8994.2mdv2008.0.src.rpm

%define name	ffmpeg
%define version	0.4.9
%define svn 8994
%define pre	pre1.%svn
%define rel	2
%define release %mkrel 3.%pre.%rel
%define major	51

%define libname %mklibname %name %major
%define libnamedev %mklibname %name %major -d
%define avfmajor 51
%define avflibname %mklibname avformats %avfmajor
%define avumajor 49
%define avulibname %mklibname avutil %avumajor
%define swsmajor 0
%define swslibname %mklibname swscaler %swsmajor

%define build_swscaler 0
%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
Patch1:		ffmpeg-ffplay-uses-xlib.patch
# gw add experimental Dirac support, drop this if it doesn't apply anymore
# http://downloads.sourceforge.net/dirac/ffmpegsvn_trunk_revision_8950-dirac-0.7.x.patch.tgz
Patch3:	ffmpegsvn_trunk_revision_8950-dirac-0.7.x.patch
License: 	GPL
Group: 	 	Video
BuildRoot: 	%{_tmppath}/%{name}-buildroot
BuildRequires:  imlib2-devel
BuildRequires:  tetex-texi2html
BuildRequires:	SDL-devel
BuildRequires:	libnut-devel
URL:		http://ffmpeg.sourceforge.net
BuildRequires: libdirac-devel >= 0.7.0
BuildRequires: liba52dec-devel
%if %build_plf
BuildRequires: libfaac-devel libfaad2-devel xvid-devel 
BuildRequires: libamrnb-devel
BuildRequires: x264-devel >= 0.54
BuildRequires: 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.

%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 %{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}

%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 %{libnamedev}
Group:          Development/C
Summary:        Header files for the ffmpeg codec library
Requires:       %{libname} = %{version}
Requires:       %{avflibname} = %{version}
Requires:       %{avulibname} = %{version}
%if %build_swscaler
Requires:       %{swslibname} = %{version}
%endif
Requires:	libnut-devel
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.

%package -n %{libname}-static-devel
Group:          Development/C
Summary:        Static library for the ffmpeg codec library
Requires:       %{libname}-devel = %{version}
Provides:       libffmpeg-static-devel = %{version}-%{release}

%description -n %{libname}-static-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 -n %{name}
%patch1 -p1 -b .ffplay-uses-xlib
%patch3 -p1 -b .dirac

#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-liba52 \
	--enable-pp \
	--enable-gpl \
	--enable-pthreads \
	--enable-libnut \
	--enable-x11grab \
	--enable-dirac \
%if %build_plf
	--enable-libmp3lame \
	--enable-libfaad \
	--enable-libfaac \
	--enable-x264 \
	--enable-xvid \
	--enable-libamr_nb
%endif


%make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall_std SRC_PATH=`pwd`
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
%post -n %{swslibname} -p /sbin/ldconfig
%postun -n %{swslibname} -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}*

%if %build_swscaler
%files -n %{swslibname}
%defattr(-,root,root)
%{_libdir}/libswscale.so.0
%{_libdir}/libswscale.so.%{swsmajor}*
%endif

%files -n %{libnamedev}
%defattr(-,root,root)
%{_includedir}/%{name}
%{_includedir}/postproc/
%{_libdir}/libavcodec.so
%{_libdir}/libavformat.so
%{_libdir}/libavutil.so
%{_libdir}/libpostproc.so
%if %build_swscaler
%{_libdir}/libswscale.so
%endif
%_libdir/pkgconfig/*.pc

%files -n %{libname}-static-devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/libavformat/*a
%{_libdir}/libavcodec/*a




%changelog
* 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