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