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