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