5 %bcond_with amr # build 3GPP Adaptive Multi Rate (AMR) speech codec
6 %bcond_without autoreqdep # don't care about package name deps generated by rpm
7 %bcond_without imlib2 # don't build imlib2 vhook module
9 %define _snap 2006-12-04
10 %define snap %(echo %{_snap} | tr -d -)
12 Summary: Realtime audio/video encoder and streaming server
13 Summary(pl): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
16 Release: 3.%{snap}.%{_rel}
17 # LGPL or GPL, chosen at configure time (GPL version is more featured)
18 # (postprocessing, a52, xvid, x264, dts, faad)
19 License: GPL with LGPL parts
20 Group: Applications/Multimedia
21 #Source0: http://dl.sourceforge.net/ffmpeg/%{name}-%{version}-pre1.tar.gz
22 Source0: http://ffmpeg.mplayerhq.hu/%{name}-export-snapshot.tar.bz2
23 # Source0-md5: 5be2e4d1e326bb7809205a3401204621
24 Source1: ffserver.init
25 Source2: ffserver.sysconfig
26 Source3: ffserver.conf
27 Patch0: %{name}-link.patch
28 Patch1: %{name}-libdir.patch
29 Patch2: %{name}-gcc4.patch
30 Patch3: %{name}-system-amr.patch
31 Patch4: %{name}-x264-symbol.patch
32 Patch5: %{name}-kill-mabi_altivec.patch
33 Patch6: %{name}-altivec_fix.patch
34 URL: http://ffmpeg.mplayerhq.hu/
35 BuildRequires: SDL-devel
37 BuildRequires: amrnb-devel
38 BuildRequires: amrwb-devel >= 5.3.0
40 BuildRequires: faac-devel
41 BuildRequires: faad2-devel
42 BuildRequires: freetype-devel
44 # require version with altivec support fixed
45 BuildRequires: gcc >= 5:3.3.2-3
47 %{?with_imlib2:BuildRequires: imlib2-devel >= 1.1.0-2}
48 BuildRequires: lame-libs-devel
49 BuildRequires: libdts-devel
50 BuildRequires: libgsm-devel
51 BuildRequires: libogg-devel
52 BuildRequires: libraw1394-devel
53 BuildRequires: libtool >= 2:1.4d-3
54 BuildRequires: libvorbis-devel
55 BuildRequires: libx264-devel >= 0.1.2-1.20061024_2245.1
61 BuildRequires: perl-tools-pod
62 BuildRequires: rpmbuild(macros) >= 1.268
64 BuildRequires: texinfo
65 %{?with_amr:BuildRequires: unzip}
66 BuildRequires: xvid-devel >= 1:1.1.0
67 BuildRequires: zlib-devel
68 %{?with_autoreqdep:BuildConflicts: libpostproc}
69 Requires: %{name}-libs = %{version}-%{release}
70 Requires: xvid >= 1:1.1.0
71 Obsoletes: libpostproc
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 %define _noautoreqdep libGL.so.1 libGLU.so.1
76 %define specflags -fno-strict-aliasing
78 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
79 %define specflags_ia32 -fomit-frame-pointer
80 # -mmmx is needed to enable <mmintrin.h> code.
81 %define specflags_i586 -mmmx
82 %define specflags_i686 -mmmx
85 ffmpeg is a hyper fast realtime audio/video encoder and streaming
86 server. It can grab from a standard Video4Linux video source and
87 convert it into several file formats based on DCT/motion compensation
88 encoding. Sound is compressed in MPEG audio layer 2 or using an AC3
92 ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
93 oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucaæ dane
94 ze standardowego urz±dzenia Video4Linux i przekonwertowaæ je w kilka
95 formatów plików bazuj±cych na kodowaniu DCT/kompensacji ruchu. D¼wiêk
96 jest kompresowany do strumienia MPEG audio layer 2 lub u¿ywaj±c
97 strumienia kompatybilnego z AC3.
100 Summary: ffmpeg libraries
101 Summary(pl): Biblioteki ffmpeg
105 This package contains ffmpeg shared libraries.
107 %description libs -l pl
108 Ten pakiet zawiera biblioteki wspó³dzielone ffmpeg.
111 Summary: ffmpeg header files
112 Summary(pl): Pliki nag³ówkowe ffmpeg
113 Group: Development/Libraries
114 Requires: %{name}-libs = %{version}-%{release}
117 Requires: amrnb-devel
118 Requires: amrwb-devel >= 5.3.0
121 Requires: faad2-devel
122 Requires: lame-libs-devel
123 Requires: libdts-devel
124 Requires: libgsm-devel
125 Requires: libtheora-devel
126 Requires: libvorbis-devel
127 Requires: libx264-devel >= 0.1.2-1.20060828_2245.1
128 Requires: xvid-devel >= 1:1.1.0
130 Obsoletes: libpostproc-devel
135 %description devel -l pl
136 Pliki nag³ówkowe ffmpeg.
139 Summary: ffmpeg static libraries
140 Summary(pl): Statyczne biblioteki ffmpeg
141 Group: Development/Libraries
142 Requires: %{name}-devel = %{version}-%{release}
145 ffmpeg static libraries (libavcodec and libavformat).
147 %description static -l pl
148 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
151 Summary: FFplay - SDL-based media player
152 Summary(pl): FFplay - odtwarzacz mediów oparty na SDL
153 Group: Applications/Multimedia
154 Requires: %{name}-libs = %{version}-%{release}
157 FFplay is a very simple and portable media player using the FFmpeg
158 libraries and the SDL library. It is mostly used as a test bench for
159 the various APIs of FFmpeg.
161 %description ffplay -l pl
162 FFplay to bardzo prosty i przeno¶ny odtwarzacz mediów u¿ywaj±cy
163 bibliotek FFmpeg oraz biblioteki SDL. Jest u¿ywany g³ównie do
164 testowania ró¿nych API FFmpeg.
166 %package vhook-imlib2
167 Summary: imlib2 based hook
168 Summary(pl): Modu³ przej¶ciowy oparty o imlib2
170 Requires: %{name}-libs = %{version}-%{release}
172 %description vhook-imlib2
173 This module implements a text overlay for a video image. Currently it
174 supports a fixed overlay or reading the text from a file. The string
175 is passed through strftime so that it is easy to imprint the date and
178 %description vhook-imlib2 -l pl
179 Ten modu³ implementuje tekstow± nak³adkê dla obrazu. Aktualnie
180 obs³uguje sta³± nak³adkê lub wczytywanie tekstu z pliku. £añcuch jest
181 przepuszczany przez strftime, wiêc ³atwo umie¶ciæ datê i czas na
185 Summary: FFserver video server
186 Summary(pl): FFserver - serwer strumieni obrazu
188 Requires(post,preun): /sbin/chkconfig
189 Requires: %{name}-libs = %{version}-%{release}
190 Requires: rc-scripts >= 0.4.0.10
192 %description ffserver
193 FFserver is a streaming server for both audio and video. It supports
194 several live feeds, streaming from files and time shifting on live
195 feeds (you can seek to positions in the past on each live feed,
196 provided you specify a big enough feed storage in ffserver.conf).
198 %description ffserver -l pl
199 FFserver to serwer strumieni dla d¼wiêku i obrazu. Obs³uguje kilka
200 ¼róde³ na ¿ywo, przekazywanie strumieni z plików i przesuwanie w
201 czasie dla ¼róde³ na ¿ywo (mo¿na przeskakiwaæ na po³o¿enia w
202 przesz³o¶ci dla ka¿dego ¼ród³a na ¿ywo, pod warunkiem odpowiednio
203 du¿ej przestrzeni na dane skonfigurowanej w ffserver.conf).
206 %setup -q -n %{name}-export-%{_snap}
217 # - it's not autoconf configure
218 # - --disable-debug, --disable-opts, tune=generic causes not to override our optflags
220 --prefix=%{_prefix} \
221 --libdir=%{_libdir} \
222 --shlibdir=%{_libdir} \
223 --mandir=%{_mandir} \
242 %ifnarch %{ix86} %{x8664}
253 --extra-cflags="%{rpmcflags}" \
254 --extra-ldflags="%{rpmldflags}" \
261 rm -rf $RPM_BUILD_ROOT
262 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
263 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
266 DESTDIR=$RPM_BUILD_ROOT
268 install xvmc_render.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
269 install config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
270 install libavformat/allformats.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
271 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
272 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
273 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
274 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
277 rm -rf $RPM_BUILD_ROOT
279 %post libs -p /sbin/ldconfig
280 %postun libs -p /sbin/ldconfig
283 %groupadd -g 167 ffserver
284 %useradd -g ffserver -u 167 ffserver
287 /sbin/chkconfig --add ffserver
288 %service ffserver restart
291 if [ "$1" = 0 ]; then
292 %service ffserver stop
293 /sbin/chkconfig --del ffserver
297 if [ "$1" = 0 ]; then
299 %groupremove ffserver
303 %defattr(644,root,root,755)
304 %doc Changelog README doc/*.html doc/TODO
305 %attr(755,root,root) %{_bindir}/ffmpeg
306 %{_mandir}/man1/ffmpeg.1*
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
311 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
312 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
313 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
314 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
315 %dir %{_libdir}/vhook
316 %attr(755,root,root) %{_libdir}/vhook/drawtext.so
317 %attr(755,root,root) %{_libdir}/vhook/fish.so
318 %attr(755,root,root) %{_libdir}/vhook/null.so
319 %attr(755,root,root) %{_libdir}/vhook/ppm.so
320 %attr(755,root,root) %{_libdir}/vhook/watermark.so
323 %defattr(644,root,root,755)
324 %doc doc/optimization.txt
325 %attr(755,root,root) %{_libdir}/libavcodec.so
326 %attr(755,root,root) %{_libdir}/libavformat.so
327 %attr(755,root,root) %{_libdir}/libavutil.so
328 %attr(755,root,root) %{_libdir}/libpostproc.so
329 %attr(755,root,root) %{_libdir}/libswscale.so
330 %{_includedir}/ffmpeg
331 %{_includedir}/postproc
332 %{_pkgconfigdir}/*.pc
335 %defattr(644,root,root,755)
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_bindir}/ffplay
341 %{_mandir}/man1/ffplay.1*
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_libdir}/vhook/imlib2.so
350 %defattr(644,root,root,755)
351 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
352 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
353 %attr(755,root,root) %{_sbindir}/ffserver
354 %attr(754,root,root) /etc/rc.d/init.d/ffserver
355 %{_mandir}/man1/ffserver.1*
356 %dir %attr(770,root,ffserver) /var/cache/ffserver
357 %dir %attr(770,root,ffserver) /var/log/ffserver