]> git.pld-linux.org Git - packages/ffmpeg.git/blob - ffmpeg.spec
- updated to 2007-04-11:
[packages/ffmpeg.git] / ffmpeg.spec
1 # TODO
2 # - libnut enabled   no
3 #
4 # Conditional build:
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
8 #
9 %define         _snap   2007-04-11
10 %define         snap    %(echo %{_snap} | tr -d -)
11 %define         _rel 1
12 Summary:        Realtime audio/video encoder and streaming server
13 Summary(pl.UTF-8):      Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
14 Name:           ffmpeg
15 Version:        0.4.9
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:  f752ea3f480d06a16f64991af913afc0
24 Source1:        ffserver.init
25 Source2:        ffserver.sysconfig
26 Source3:        ffserver.conf
27 Patch0:         %{name}-link.patch
28 Patch2:         %{name}-gcc4.patch
29 Patch3:         %{name}-system-amr.patch
30 Patch4:         %{name}-x264-symbol.patch
31 Patch5:         %{name}-kill-mabi_altivec.patch
32 Patch6:         %{name}-img_convert_symbol.patch
33 URL:            http://ffmpeg.mplayerhq.hu/
34 BuildRequires:  SDL-devel
35 BuildRequires:  a52dec-libs-devel
36 %if %{with amr}
37 BuildRequires:  amrnb-devel
38 BuildRequires:  amrwb-devel >= 5.3.0
39 %endif
40 BuildRequires:  faac-devel
41 BuildRequires:  faad2-devel
42 BuildRequires:  freetype-devel
43 %ifarch ppc
44 # require version with altivec support fixed
45 BuildRequires:  gcc >= 5:3.3.2-3
46 %endif
47 %{?with_imlib2:BuildRequires:   imlib2-devel >= 1.3.0}
48 BuildRequires:  lame-libs-devel
49 BuildRequires:  libdts-devel
50 BuildRequires:  libgsm-devel
51 BuildRequires:  libogg-devel
52 BuildRequires:  libraw1394-devel
53 BuildRequires:  libtheora-devel >= 1.0-0.alpha7
54 BuildRequires:  libtool >= 2:1.4d-3
55 BuildRequires:  libvorbis-devel
56 BuildRequires:  libx264-devel >= 0.1.2-1.20061024_2245.1
57 %ifarch %{ix86}
58 %ifnarch i386 i486
59 BuildRequires:  nasm
60 %endif
61 %endif
62 BuildRequires:  perl-tools-pod
63 BuildRequires:  rpmbuild(macros) >= 1.268
64 BuildRequires:  tetex
65 BuildRequires:  texinfo
66 %{?with_amr:BuildRequires:      unzip}
67 BuildRequires:  xvid-devel >= 1:1.1.0
68 BuildRequires:  zlib-devel
69 %{?with_autoreqdep:BuildConflicts:      libpostproc}
70 Requires:       %{name}-libs = %{version}-%{release}
71 Requires:       xvid >= 1:1.1.0
72 Obsoletes:      libpostproc
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
76
77 %define         specflags       -fno-strict-aliasing
78
79 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
80 %define         specflags_ia32  -fomit-frame-pointer
81 # -mmmx is needed to enable <mmintrin.h> code.
82 %define         specflags_i586  -mmmx
83 %define         specflags_i686  -mmmx
84
85 %description
86 ffmpeg is a hyper fast realtime audio/video encoder and streaming
87 server. It can grab from a standard Video4Linux video source and
88 convert it into several file formats based on DCT/motion compensation
89 encoding. Sound is compressed in MPEG audio layer 2 or using an AC3
90 compatible stream.
91
92 %description -l pl.UTF-8
93 ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
94 oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucać dane
95 ze standardowego urządzenia Video4Linux i przekonwertować je w kilka
96 formatów plików bazujących na kodowaniu DCT/kompensacji ruchu. Dźwięk
97 jest kompresowany do strumienia MPEG audio layer 2 lub używając
98 strumienia kompatybilnego z AC3.
99
100 %package libs
101 Summary:        ffmpeg libraries
102 Summary(pl.UTF-8):      Biblioteki ffmpeg
103 Group:          Libraries
104
105 %description libs
106 This package contains ffmpeg shared libraries.
107
108 %description libs -l pl.UTF-8
109 Ten pakiet zawiera biblioteki współdzielone ffmpeg.
110
111 %package devel
112 Summary:        ffmpeg header files
113 Summary(pl.UTF-8):      Pliki nagłówkowe ffmpeg
114 Group:          Development/Libraries
115 Requires:       %{name}-libs = %{version}-%{release}
116 # for libavcodec:
117 %if %{with amr}
118 Requires:       amrnb-devel
119 Requires:       amrwb-devel >= 5.3.0
120 %endif
121 Requires:       faac-devel
122 Requires:       faad2-devel
123 Requires:       lame-libs-devel
124 Requires:       libdts-devel
125 Requires:       libgsm-devel
126 Requires:       libtheora-devel >= 1.0-0.alpha7
127 Requires:       libvorbis-devel
128 Requires:       libx264-devel >= 0.1.2-1.20060828_2245.1
129 Requires:       xvid-devel >= 1:1.1.0
130 Requires:       zlib-devel
131 Obsoletes:      libpostproc-devel
132
133 %description devel
134 ffmpeg header files.
135
136 %description devel -l pl.UTF-8
137 Pliki nagłówkowe ffmpeg.
138
139 %package static
140 Summary:        ffmpeg static libraries
141 Summary(pl.UTF-8):      Statyczne biblioteki ffmpeg
142 Group:          Development/Libraries
143 Requires:       %{name}-devel = %{version}-%{release}
144
145 %description static
146 ffmpeg static libraries (libavcodec and libavformat).
147
148 %description static -l pl.UTF-8
149 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
150
151 %package ffplay
152 Summary:        FFplay - SDL-based media player
153 Summary(pl.UTF-8):      FFplay - odtwarzacz mediów oparty na SDL
154 Group:          Applications/Multimedia
155 Requires:       %{name}-libs = %{version}-%{release}
156
157 %description ffplay
158 FFplay is a very simple and portable media player using the FFmpeg
159 libraries and the SDL library. It is mostly used as a test bench for
160 the various APIs of FFmpeg.
161
162 %description ffplay -l pl.UTF-8
163 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
164 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
165 testowania różnych API FFmpeg.
166
167 %package vhook-imlib2
168 Summary:        imlib2 based hook
169 Summary(pl.UTF-8):      Moduł przejściowy oparty o imlib2
170 Group:          Libraries
171 Requires:       %{name}-libs = %{version}-%{release}
172
173 %description vhook-imlib2
174 This module implements a text overlay for a video image. Currently it
175 supports a fixed overlay or reading the text from a file. The string
176 is passed through strftime so that it is easy to imprint the date and
177 time onto the image.
178
179 %description vhook-imlib2 -l pl.UTF-8
180 Ten moduł implementuje tekstową nakładkę dla obrazu. Aktualnie
181 obsługuje stałą nakładkę lub wczytywanie tekstu z pliku. Łańcuch jest
182 przepuszczany przez strftime, więc łatwo umieścić datę i czas na
183 obrazie.
184
185 %package ffserver
186 Summary:        FFserver video server
187 Summary(pl.UTF-8):      FFserver - serwer strumieni obrazu
188 Group:          Daemons
189 Requires(post,preun):   /sbin/chkconfig
190 Requires:       %{name}-libs = %{version}-%{release}
191 Requires:       rc-scripts >= 0.4.0.10
192
193 %description ffserver
194 FFserver is a streaming server for both audio and video. It supports
195 several live feeds, streaming from files and time shifting on live
196 feeds (you can seek to positions in the past on each live feed,
197 provided you specify a big enough feed storage in ffserver.conf).
198
199 %description ffserver -l pl.UTF-8
200 FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
201 źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
202 czasie dla źródeł na żywo (można przeskakiwać na położenia w
203 przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
204 dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
205
206 %prep
207 %setup -q -n %{name}-export-%{_snap}
208 %patch0 -p1
209 %patch2 -p1
210 %patch3 -p1
211 %patch4 -p1
212 %patch5 -p1
213 %patch6 -p1
214
215 %build
216 # notes:
217 # - it's not autoconf configure
218 # - --disable-debug, --disable-opts, tune=generic causes not to override our optflags
219 ./configure \
220         --prefix=%{_prefix} \
221         --libdir=%{_libdir} \
222         --shlibdir=%{_libdir} \
223         --mandir=%{_mandir} \
224         --disable-strip \
225         --enable-liba52 \
226         --enable-liba52bin \
227         --enable-libdts \
228         --enable-libfaac \
229         --enable-libfaad \
230         --enable-libfaadbin \
231         --enable-gpl \
232         --enable-libgsm \
233         --enable-libogg \
234         --enable-libtheora \
235         --enable-libmp3lame \
236         --enable-pp \
237         --enable-pthreads \
238         --enable-shared \
239         --enable-swscaler \
240         --enable-libvorbis \
241         --enable-x264 \
242         --enable-xvid \
243 %ifnarch %{ix86} %{x8664}
244         --disable-mmx \
245 %endif
246 %ifarch i386 i486
247         --disable-mmx \
248 %endif
249 %if %{with amr}
250         --enable-amr_nb \
251         --enable-amr_wb \
252 %endif
253         --cc="%{__cc}" \
254         --extra-cflags="%{rpmcflags}" \
255         --extra-ldflags="%{rpmldflags}" \
256         --disable-debug \
257         --disable-opts \
258
259 %{__make}
260
261 %install
262 rm -rf $RPM_BUILD_ROOT
263 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
264         $RPM_BUILD_ROOT/var/{cache,log}/ffserver
265
266 %{__make} install \
267         DESTDIR=$RPM_BUILD_ROOT
268
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
275
276 %clean
277 rm -rf $RPM_BUILD_ROOT
278
279 %post libs      -p /sbin/ldconfig
280 %postun libs    -p /sbin/ldconfig
281
282 %pre ffserver
283 %groupadd -g 167 ffserver
284 %useradd -g ffserver -u 167 ffserver
285
286 %post ffserver
287 /sbin/chkconfig --add ffserver
288 %service ffserver restart
289
290 %preun ffserver
291 if [ "$1" = 0 ]; then
292         %service ffserver stop
293         /sbin/chkconfig --del ffserver
294 fi
295
296 %postun ffserver
297 if [ "$1" = 0 ]; then
298         %userremove ffserver
299         %groupremove ffserver
300 fi
301
302 %files
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*
307
308 %files libs
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
321
322 %files devel
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
333
334 %files static
335 %defattr(644,root,root,755)
336 %{_libdir}/lib*.a
337
338 %files ffplay
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_bindir}/ffplay
341 %{_mandir}/man1/ffplay.1*
342
343 %if %{with imlib2}
344 %files vhook-imlib2
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_libdir}/vhook/imlib2.so
347 %endif
348
349 %files ffserver
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
This page took 0.092089 seconds and 4 git commands to generate.