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