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