]> git.pld-linux.org Git - packages/ffmpeg.git/blob - ffmpeg.spec
bcce3c3f5462a74f12c361f3297d382d540e1a87
[packages/ffmpeg.git] / ffmpeg.spec
1 #
2 # TODO: only lzo 1.x is supported
3 #       - make (ffmpeg code inside) mplayer play .3gp mobile phone movies 
4 #         (ffplay and vlc plays them fine
5 #
6 # Conditional build:
7 %bcond_without  imlib2          # don't build imlib2 vhook module
8 %bcond_without  autoreqdep      # don't care about package name deps generated by rpm
9 %bcond_without  amr             # don't build 3GPP Adaptive Multi Rate (AMR) speech codec
10 #
11 Summary:        Realtime audio/video encoder and streaming server
12 Summary(pl):    Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
13 Name:           ffmpeg
14 Version:        0.4.9
15 %define         snap    20060129
16 %define         _rel 9
17 Release:        3.%{snap}.%{_rel}
18 # LGPL or GPL, chosen at configure time (GPL version is more featured)
19 #
20 # (BTW. what are the 'more' features mentioned above?)
21 #
22 # Some parts of the code *is* LGPL (for example libavformat amr.c) so 
23 # it is possible to include /and distribute/ external 3GPP AMR codecs 
24 # (some kind of public domain with patent restrictions) to the 
25 # GPL-licensed stuff /and keep GPL license/.
26 %if %{with amr}
27 License:        GPL with LGPL/Public Domain parts
28 %else
29 License:        GPL with LGPL parts
30 %endif
31 Group:          Applications/Multimedia
32 #Source0:       http://dl.sourceforge.net/ffmpeg/%{name}-%{version}-pre1.tar.gz
33 #Source0:       ftp://ftp2.mplayerhq.hu/MPlayer/cvs/FFMpeg-%{snap}.tar.bz2
34 Source0:        %{name}-%{snap}.tar.bz2
35 # Source0-md5:  d8ea09431d6c0c91bfd35e0ca74a67e1
36 Source1:        ffserver.init
37 Source2:        ffserver.sysconfig
38 Source3:        ffserver.conf
39 %if %{with amr}
40 # AMR WB FLOAT 
41 #Source4:       http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26204-600.zip
42 Source4:        http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26204-530.zip
43 # Source4-md5:  988060bdb18b5d64b8bd82c3507d2420
44 # AMR NB FLOAT 
45 #Source6:       http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26104-610.zip
46 Source6:        http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-540.zip
47 # Source6-md5:  4dcbeb2bc28bf86e7131fe4cae3e0dec
48 %endif
49
50 Patch0:         %{name}-libtool.patch
51 Patch1:         %{name}-libdir.patch
52 Patch2:         %{name}-gcc4.patch
53 URL:            http://ffmpeg.sourceforge.net/
54 BuildRequires:  SDL-devel
55 BuildRequires:  faac-devel
56 BuildRequires:  faad2-devel
57 BuildRequires:  freetype-devel
58 %ifarch ppc
59 # require version with altivec support fixed
60 BuildRequires:  gcc >= 5:3.3.2-3
61 %endif
62 %{?with_imlib2:BuildRequires:   imlib2-devel >= 1.1.0-2}
63 BuildRequires:  lame-libs-devel
64 BuildRequires:  libdts-devel
65 BuildRequires:  libgsm-devel
66 BuildRequires:  libtheora-devel
67 BuildRequires:  libtool >= 2:1.4d-3
68 BuildRequires:  libvorbis-devel
69 BuildRequires:  libx264-devel >= 0.1.2-1.20060430_2245.1
70 BuildRequires:  lzo-devel
71 %ifarch %{ix86}
72 %ifnarch i386 i486
73 BuildRequires:  nasm
74 %endif
75 %endif
76 BuildRequires:  perl-tools-pod
77 BuildRequires:  rpmbuild(macros) >= 1.268
78 BuildRequires:  tetex
79 BuildRequires:  texinfo
80 %{?with_amr:BuildRequires:      unzip}
81 BuildRequires:  xvid-devel >= 1:1.1.0
82 BuildRequires:  zlib-devel
83 %{?with_autoreqdep:BuildConflicts:      libpostproc}
84 Requires:       %{name}-libs = %{version}-%{release}
85 Requires:       xvid >= 1:1.1.0
86 Obsoletes:      libpostproc
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
90
91 %define         specflags       -fno-strict-aliasing
92
93 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
94 %define         specflags_ia32  -fomit-frame-pointer
95 # -mmmx is needed to enable <mmintrin.h> code.
96 %define         specflags_i586  -mmmx
97 %define         specflags_i686  -mmmx
98
99 %description
100 ffmpeg is a hyper fast realtime audio/video encoder and streaming
101 server. It can grab from a standard Video4Linux video source and
102 convert it into several file formats based on DCT/motion compensation
103 encoding. Sound is compressed in MPEG audio layer 2 or using an AC3
104 compatible stream.
105
106 %description -l pl
107 ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
108 oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucaæ dane
109 ze standardowego urz±dzenia Video4Linux i przekonwertowaæ je w kilka
110 formatów plików bazuj±cych na kodowaniu DCT/kompensacji ruchu. D¼wiêk
111 jest kompresowany do strumienia MPEG audio layer 2 lub u¿ywaj±c
112 strumienia kompatybilnego z AC3.
113
114 %package libs
115 Summary:        ffmpeg libraries
116 Summary(pl):    Biblioteki ffmpeg
117 Group:          Libraries
118
119 %description libs
120 This package contains ffmpeg shared libraries.
121
122 %description libs -l pl
123 Ten pakiet zawiera biblioteki wspó³dzielone ffmpeg.
124
125 %package devel
126 Summary:        ffmpeg header files
127 Summary(pl):    Pliki nag³ówkowe ffmpeg
128 Group:          Development/Libraries
129 Requires:       %{name}-libs = %{version}-%{release}
130 # for libavcodec:
131 Requires:       faac-devel
132 Requires:       lame-libs-devel
133 Requires:       libdts-devel
134 Requires:       libgsm-devel
135 Requires:       libtheora-devel
136 Requires:       libvorbis-devel
137 Requires:       lzo-devel
138 Requires:       xvid-devel >= 1:1.1.0
139 Requires:       zlib-devel
140 Obsoletes:      libpostproc-devel
141
142 %description devel
143 ffmpeg header files.
144
145 %description devel -l pl
146 Pliki nag³ówkowe ffmpeg.
147
148 %package static
149 Summary:        ffmpeg static libraries
150 Summary(pl):    Statyczne biblioteki ffmpeg
151 Group:          Development/Libraries
152 Requires:       %{name}-devel = %{version}-%{release}
153
154 %description static
155 ffmpeg static libraries (libavcodec and libavformat).
156
157 %description static -l pl
158 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
159
160 %package ffplay
161 Summary:        FFplay - SDL-based media player
162 Summary(pl):    FFplay - odtwarzacz mediów oparty na SDL
163 Group:          Applications/Multimedia
164 Requires:       %{name}-libs = %{version}-%{release}
165
166 %description ffplay
167 FFplay is a very simple and portable media player using the FFmpeg
168 libraries and the SDL library. It is mostly used as a test bench for
169 the various APIs of FFmpeg.
170
171 %description ffplay -l pl
172 FFplay to bardzo prosty i przeno¶ny odtwarzacz mediów u¿ywaj±cy
173 bibliotek FFmpeg oraz biblioteki SDL. Jest u¿ywany g³ównie do
174 testowania ró¿nych API FFmpeg.
175
176 %package vhook-imlib2
177 Summary:        imlib2 based hook
178 Summary(pl):    Modu³ przej¶ciowy oparty o imlib2
179 Group:          Libraries
180 Requires:       %{name}-libs = %{version}-%{release}
181
182 %description vhook-imlib2
183 This module implements a text overlay for a video image. Currently it
184 supports a fixed overlay or reading the text from a file. The string
185 is passed through strftime so that it is easy to imprint the date and
186 time onto the image.
187
188 %description vhook-imlib2 -l pl
189 Ten modu³ implementuje tekstow± nak³adkê dla obrazu. Aktualnie
190 obs³uguje sta³± nak³adkê lub wczytywanie tekstu z pliku. £añcuch jest
191 przepuszczany przez strftime, wiêc ³atwo umie¶ciæ datê i czas na
192 obrazie.
193
194 %package ffserver
195 Summary:        FFserver video server
196 Summary(pl):    FFserver - serwer strumieni obrazu
197 Group:          Daemons
198 Requires(post,preun):   /sbin/chkconfig
199 Requires:       rc-scripts >= 0.4.0.10
200 Requires:       %{name}-libs = %{version}-%{release}
201
202 %description ffserver
203 FFserver is a streaming server for both audio and video. It supports
204 several live feeds, streaming from files and time shifting on live
205 feeds (you can seek to positions in the past on each live feed,
206 provided you specify a big enough feed storage in ffserver.conf).
207
208 %description ffserver -l pl
209 FFserver to serwer strumieni dla d¼wiêku i obrazu. Obs³uguje kilka
210 ¼róde³ na ¿ywo, przekazywanie strumieni z plików i przesuwanie w
211 czasie dla ¼róde³ na ¿ywo (mo¿na przeskakiwaæ na po³o¿enia w
212 przesz³o¶ci dla ka¿dego ¼ród³a na ¿ywo, pod warunkiem odpowiednio
213 du¿ej przestrzeni na dane skonfigurowanej w ffserver.conf).
214
215 %prep
216 %setup -q -n %{name}
217 %patch0 -p1
218 %patch1 -p1
219 %patch2 -p1
220 %if %{with amr}
221 cd libavcodec
222 mkdir amrwb_float
223 mkdir amr
224 mkdir amr_float
225 # put 26204-xxx.zip into libavcodec/amrwb_float
226 cd amrwb_float
227 unzip -j %{SOURCE4}
228 unzip -j 26204-530_ANSI-C_source_code.zip
229 # put 26104-xxx.zip into libavcodec/amr_float
230 cd ../amr_float
231 unzip -j %{SOURCE6}
232 unzip -j 26104-540_ANSI_C_source_code.zip
233 cd ../..
234 %endif
235
236 %build
237 # notes:
238 # - it's not autoconf configure
239 # - --disable-debug, --disable-opts, tune=generic causes not to override our optflags
240 ./configure \
241         --prefix=%{_prefix} \
242         --libdir=%{_libdir} \
243         --mandir=%{_mandir} \
244         --disable-strip \
245         --enable-a52 \
246         --enable-a52bin \
247         --enable-dts \
248         --enable-faac \
249         --enable-faad \
250         --enable-faadbin \
251         --enable-gpl \
252         --enable-libgsm \
253         --enable-libogg \
254         --enable-mp3lame \
255         --enable-pp \
256         --enable-pthreads \
257         --enable-shared \
258         --enable-theora \
259         --enable-vorbis \
260         --enable-x264 \
261         --enable-xvid \
262 %ifnarch %{ix86} %{x8664}
263         --disable-mmx \
264 %endif
265 %ifarch i386 i486
266         --disable-mmx \
267 %endif
268 %if %{with amr}
269         --enable-amr_nb \
270         --enable-amr_wb \
271 %endif
272         --cc="%{__cc}" \
273         --extra-cflags="%{rpmcflags}" \
274         --extra-ldflags="%{rpmldflags}" \
275         --disable-debug \
276         --disable-opts \
277         --tune=generic
278
279 %{__make} \
280         BUILD_DOC=yes
281
282 %install
283 rm -rf $RPM_BUILD_ROOT
284 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
285         $RPM_BUILD_ROOT/var/{cache,log}/ffserver
286
287 %{__make} install \
288         DESTDIR=$RPM_BUILD_ROOT
289
290 install xvmc_render.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
291 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
292 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
293 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
294 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
295
296 %clean
297 rm -rf $RPM_BUILD_ROOT
298
299 %post   -p /sbin/ldconfig
300 %postun -p /sbin/ldconfig
301
302 %pre ffserver
303 %groupadd -g 167 ffserver
304 %useradd -g ffserver -u 167 ffserver
305
306 %post ffserver
307 /sbin/chkconfig --add ffserver
308 %service ffserver restart
309
310 %preun ffserver
311 if [ "$1" = 0 ]; then
312         %service ffserver stop
313         /sbin/chkconfig --del ffserver
314 fi
315
316 %postun ffserver
317 if [ "$1" = 0 ]; then
318         %userremove ffserver
319         %groupremove ffserver
320 fi
321
322 %files
323 %defattr(644,root,root,755)
324 %doc Changelog README doc/*.html doc/TODO
325 %attr(755,root,root) %{_bindir}/ffmpeg
326 %{_mandir}/man1/ffmpeg.1*
327
328 %files libs
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
331 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
332 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
333 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
334 %dir %{_libdir}/vhook
335 %attr(755,root,root) %{_libdir}/vhook/drawtext.so
336 %attr(755,root,root) %{_libdir}/vhook/fish.so
337 %attr(755,root,root) %{_libdir}/vhook/null.so
338 %attr(755,root,root) %{_libdir}/vhook/ppm.so
339 %attr(755,root,root) %{_libdir}/vhook/watermark.so
340
341 %files devel
342 %defattr(644,root,root,755)
343 %doc doc/optimization.txt
344 %attr(755,root,root) %{_libdir}/libavcodec.so
345 %attr(755,root,root) %{_libdir}/libavformat.so
346 %attr(755,root,root) %{_libdir}/libavutil.so
347 %attr(755,root,root) %{_libdir}/libpostproc.so
348 %{_libdir}/lib*.la
349 %{_includedir}/ffmpeg
350 %{_includedir}/postproc
351 %{_pkgconfigdir}/*.pc
352
353 %files static
354 %defattr(644,root,root,755)
355 %{_libdir}/lib*.a
356
357 %files ffplay
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_bindir}/ffplay
360 %{_mandir}/man1/ffplay.1*
361
362 %if %{with imlib2}
363 %files vhook-imlib2
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/vhook/imlib2.so
366 %endif
367
368 %files ffserver
369 %defattr(644,root,root,755)
370 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
371 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
372 %attr(755,root,root) %{_sbindir}/ffserver
373 %attr(754,root,root) /etc/rc.d/init.d/ffserver
374 %{_mandir}/man1/ffserver.1*
375 %dir %attr(770,root,ffserver) /var/cache/ffserver
376 %dir %attr(770,root,ffserver) /var/log/ffserver
This page took 0.57875 seconds and 3 git commands to generate.