2 # TODO: update for lzo 2.x (currently only lzo 1.x is supported)
5 %bcond_without amr # don't 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
8 %bcond_with lzo # build with LZO support
10 Summary: Realtime audio/video encoder and streaming server
11 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: ftp://ftp2.mplayerhq.hu/MPlayer/cvs/FFMpeg-%{snap}.tar.bz2
23 Source0: %{name}-%{snap}.tar.bz2
24 # Source0-md5: d8ea09431d6c0c91bfd35e0ca74a67e1
25 Source1: ffserver.init
26 Source2: ffserver.sysconfig
27 Source3: ffserver.conf
28 Patch0: %{name}-libtool.patch
29 Patch1: %{name}-libdir.patch
30 Patch2: %{name}-gcc4.patch
31 Patch3: %{name}-system-amr.patch
32 URL: http://ffmpeg.mplayerhq.hu/
33 BuildRequires: SDL-devel
35 BuildRequires: amrnb-devel
36 BuildRequires: amrwb-devel >= 5.3.0
38 BuildRequires: faac-devel
39 BuildRequires: faad2-devel
40 BuildRequires: freetype-devel
42 # require version with altivec support fixed
43 BuildRequires: gcc >= 5:3.3.2-3
45 %{?with_imlib2:BuildRequires: imlib2-devel >= 1.1.0-2}
46 BuildRequires: lame-libs-devel
47 BuildRequires: libdts-devel
48 BuildRequires: libgsm-devel
49 BuildRequires: libtheora-devel
50 BuildRequires: libtool >= 2:1.4d-3
51 BuildRequires: libvorbis-devel
52 BuildRequires: libx264-devel >= 0.1.2-1.20060430_2245.1
53 %{?with_lzo:BuildRequires: lzo-devel < 2.0}
59 BuildRequires: perl-tools-pod
60 BuildRequires: rpmbuild(macros) >= 1.268
62 BuildRequires: texinfo
63 %{?with_amr:BuildRequires: unzip}
64 BuildRequires: xvid-devel >= 1:1.1.0
65 BuildRequires: zlib-devel
66 %{?with_autoreqdep:BuildConflicts: libpostproc}
67 Requires: %{name}-libs = %{version}-%{release}
68 Requires: xvid >= 1:1.1.0
69 Obsoletes: libpostproc
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 %define _noautoreqdep libGL.so.1 libGLU.so.1
74 %define specflags -fno-strict-aliasing
76 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
77 %define specflags_ia32 -fomit-frame-pointer
78 # -mmmx is needed to enable <mmintrin.h> code.
79 %define specflags_i586 -mmmx
80 %define specflags_i686 -mmmx
83 ffmpeg is a hyper fast realtime audio/video encoder and streaming
84 server. It can grab from a standard Video4Linux video source and
85 convert it into several file formats based on DCT/motion compensation
86 encoding. Sound is compressed in MPEG audio layer 2 or using an AC3
90 ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
91 oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucaæ dane
92 ze standardowego urz±dzenia Video4Linux i przekonwertowaæ je w kilka
93 formatów plików bazuj±cych na kodowaniu DCT/kompensacji ruchu. D¼wiêk
94 jest kompresowany do strumienia MPEG audio layer 2 lub u¿ywaj±c
95 strumienia kompatybilnego z AC3.
98 Summary: ffmpeg libraries
99 Summary(pl): Biblioteki ffmpeg
103 This package contains ffmpeg shared libraries.
105 %description libs -l pl
106 Ten pakiet zawiera biblioteki wspó³dzielone ffmpeg.
109 Summary: ffmpeg header files
110 Summary(pl): Pliki nag³ówkowe ffmpeg
111 Group: Development/Libraries
112 Requires: %{name}-libs = %{version}-%{release}
115 Requires: amrnb-devel
116 Requires: amrwb-devel >= 5.3.0
119 Requires: faad2-devel
120 Requires: lame-libs-devel
121 Requires: libdts-devel
122 Requires: libgsm-devel
123 Requires: libtheora-devel
124 Requires: libvorbis-devel
125 %{?with_lzo:Requires: lzo-devel < 2.0}
126 Requires: libx264-devel >= 0.1.2-1.20060430_2245.1
127 Requires: xvid-devel >= 1:1.1.0
129 Obsoletes: libpostproc-devel
134 %description devel -l pl
135 Pliki nag³ówkowe ffmpeg.
138 Summary: ffmpeg static libraries
139 Summary(pl): Statyczne biblioteki ffmpeg
140 Group: Development/Libraries
141 Requires: %{name}-devel = %{version}-%{release}
144 ffmpeg static libraries (libavcodec and libavformat).
146 %description static -l pl
147 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
150 Summary: FFplay - SDL-based media player
151 Summary(pl): FFplay - odtwarzacz mediów oparty na SDL
152 Group: Applications/Multimedia
153 Requires: %{name}-libs = %{version}-%{release}
156 FFplay is a very simple and portable media player using the FFmpeg
157 libraries and the SDL library. It is mostly used as a test bench for
158 the various APIs of FFmpeg.
160 %description ffplay -l pl
161 FFplay to bardzo prosty i przeno¶ny odtwarzacz mediów u¿ywaj±cy
162 bibliotek FFmpeg oraz biblioteki SDL. Jest u¿ywany g³ównie do
163 testowania ró¿nych API FFmpeg.
165 %package vhook-imlib2
166 Summary: imlib2 based hook
167 Summary(pl): Modu³ przej¶ciowy oparty o imlib2
169 Requires: %{name}-libs = %{version}-%{release}
171 %description vhook-imlib2
172 This module implements a text overlay for a video image. Currently it
173 supports a fixed overlay or reading the text from a file. The string
174 is passed through strftime so that it is easy to imprint the date and
177 %description vhook-imlib2 -l pl
178 Ten modu³ implementuje tekstow± nak³adkê dla obrazu. Aktualnie
179 obs³uguje sta³± nak³adkê lub wczytywanie tekstu z pliku. £añcuch jest
180 przepuszczany przez strftime, wiêc ³atwo umie¶ciæ datê i czas na
184 Summary: FFserver video server
185 Summary(pl): FFserver - serwer strumieni obrazu
187 Requires(post,preun): /sbin/chkconfig
188 Requires: rc-scripts >= 0.4.0.10
189 Requires: %{name}-libs = %{version}-%{release}
191 %description ffserver
192 FFserver is a streaming server for both audio and video. It supports
193 several live feeds, streaming from files and time shifting on live
194 feeds (you can seek to positions in the past on each live feed,
195 provided you specify a big enough feed storage in ffserver.conf).
197 %description ffserver -l pl
198 FFserver to serwer strumieni dla d¼wiêku i obrazu. Obs³uguje kilka
199 ¼róde³ na ¿ywo, przekazywanie strumieni z plików i przesuwanie w
200 czasie dla ¼róde³ na ¿ywo (mo¿na przeskakiwaæ na po³o¿enia w
201 przesz³o¶ci dla ka¿dego ¼ród³a na ¿ywo, pod warunkiem odpowiednio
202 du¿ej przestrzeni na dane skonfigurowanej w ffserver.conf).
213 # - it's not autoconf configure
214 # - --disable-debug, --disable-opts, tune=generic causes not to override our optflags
216 --prefix=%{_prefix} \
217 --libdir=%{_libdir} \
218 --mandir=%{_mandir} \
219 %{!?with_lzo:--disable-lzo} \
238 %ifnarch %{ix86} %{x8664}
249 --extra-cflags="%{rpmcflags}" \
250 --extra-ldflags="%{rpmldflags}" \
259 rm -rf $RPM_BUILD_ROOT
260 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
261 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
264 DESTDIR=$RPM_BUILD_ROOT
266 install xvmc_render.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
267 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
268 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
269 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
270 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
273 rm -rf $RPM_BUILD_ROOT
275 %post libs -p /sbin/ldconfig
276 %postun libs -p /sbin/ldconfig
279 %groupadd -g 167 ffserver
280 %useradd -g ffserver -u 167 ffserver
283 /sbin/chkconfig --add ffserver
284 %service ffserver restart
287 if [ "$1" = 0 ]; then
288 %service ffserver stop
289 /sbin/chkconfig --del ffserver
293 if [ "$1" = 0 ]; then
295 %groupremove ffserver
299 %defattr(644,root,root,755)
300 %doc Changelog README doc/*.html doc/TODO
301 %attr(755,root,root) %{_bindir}/ffmpeg
302 %{_mandir}/man1/ffmpeg.1*
305 %defattr(644,root,root,755)
306 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
307 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
308 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
309 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
310 %dir %{_libdir}/vhook
311 %attr(755,root,root) %{_libdir}/vhook/drawtext.so
312 %attr(755,root,root) %{_libdir}/vhook/fish.so
313 %attr(755,root,root) %{_libdir}/vhook/null.so
314 %attr(755,root,root) %{_libdir}/vhook/ppm.so
315 %attr(755,root,root) %{_libdir}/vhook/watermark.so
318 %defattr(644,root,root,755)
319 %doc doc/optimization.txt
320 %attr(755,root,root) %{_libdir}/libavcodec.so
321 %attr(755,root,root) %{_libdir}/libavformat.so
322 %attr(755,root,root) %{_libdir}/libavutil.so
323 %attr(755,root,root) %{_libdir}/libpostproc.so
325 %{_includedir}/ffmpeg
326 %{_includedir}/postproc
327 %{_pkgconfigdir}/*.pc
330 %defattr(644,root,root,755)
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_bindir}/ffplay
336 %{_mandir}/man1/ffplay.1*
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/vhook/imlib2.so
345 %defattr(644,root,root,755)
346 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
347 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
348 %attr(755,root,root) %{_sbindir}/ffserver
349 %attr(754,root,root) /etc/rc.d/init.d/ffserver
350 %{_mandir}/man1/ffserver.1*
351 %dir %attr(770,root,ffserver) /var/cache/ffserver
352 %dir %attr(770,root,ffserver) /var/log/ffserver