]> git.pld-linux.org Git - packages/ffmpeg.git/blame - ffmpeg.spec
- rel 2; img_convert is back again
[packages/ffmpeg.git] / ffmpeg.spec
CommitLineData
94447fde 1# TODO
328d1431 2# - libnut enabled no (http://www.nut-container.org/)
197f4211 3#
2b3b2117 4# Conditional build:
48610c64 5%bcond_with amr # 3GPP Adaptive Multi Rate (AMR) codec support; makes package non-distributable
294c9b1e
JB
6%bcond_without autoreqdep # don't care about package name deps generated by rpm
7%bcond_without imlib2 # don't build imlib2 vhook module
874f67c9 8#
6382c99d 9%define _snap 2008-08-22
2305d791 10%define snap %(echo %{_snap} | tr -d -)
3ad50542 11%define _rel 2
76243dbd 12Summary: Realtime audio/video encoder and streaming server
adcc0f76 13Summary(pl.UTF-8): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
9fc4ad22 14Name: ffmpeg
c32b589f 15Version: 0.4.9
72c23aa0 16Release: 4.%{snap}.%{_rel}
9cf4d8a4 17# LGPL or GPL, chosen at configure time (GPL version is more featured)
48610c64 18# (postprocessing, ac3, xvid, x264, faad)
be868f35 19License: GPL v2+ with LGPL v2.1+ parts
fde29260 20Group: Applications/Multimedia
d7493de8 21#Source0: http://dl.sourceforge.net/ffmpeg/%{name}-%{version}-pre1.tar.gz
2305d791 22Source0: http://ffmpeg.mplayerhq.hu/%{name}-export-snapshot.tar.bz2
6382c99d 23# Source0-md5: 573ff56bb619391fbc13ecde23389b45
fde29260
ER
24Source1: ffserver.init
25Source2: ffserver.sysconfig
38cf6de3 26Source3: ffserver.conf
d2fa6a1d 27URL: http://ffmpeg.mplayerhq.hu/
2a60eebe 28BuildRequires: SDL-devel
fc8de229 29%if %{with amr}
7e9547bc
JB
30BuildRequires: amrnb-devel >= 6.1.0.4
31BuildRequires: amrwb-devel >= 7.0.0.1
fc8de229 32%endif
6382c99d 33BuildRequires: dirac-devel
e380e18a 34BuildRequires: faac-devel
b959c224 35BuildRequires: faad2-devel
2a60eebe 36BuildRequires: freetype-devel
4bee03f0
JB
37%ifarch ppc
38# require version with altivec support fixed
39BuildRequires: gcc >= 5:3.3.2-3
40%endif
15c15700 41%{?with_imlib2:BuildRequires: imlib2-devel >= 1.3.0}
e380e18a 42BuildRequires: lame-libs-devel
6382c99d 43BuildRequires: a52dec-libs-devel
f3692243 44BuildRequires: libgsm-devel
6382c99d 45BuildRequires: libdc1394-devel
94447fde 46BuildRequires: libraw1394-devel
6bbd46a6 47BuildRequires: libtheora-devel >= 1.0-0.alpha7
4814ac84 48BuildRequires: libtool >= 2:1.4d-3
e380e18a 49BuildRequires: libvorbis-devel
6382c99d 50BuildRequires: libx264-devel >= 0.1.2-1.20080801
e1fe03f7 51%ifarch %{ix86}
52%ifnarch i386 i486
76243dbd
JB
53BuildRequires: nasm
54%endif
e1fe03f7 55%endif
1463656a 56BuildRequires: perl-tools-pod
593d3a64 57BuildRequires: rpmbuild(macros) >= 1.268
1463656a 58BuildRequires: tetex
9cf4d8a4 59BuildRequires: texinfo
872de59d 60%{?with_amr:BuildRequires: unzip}
46f2a56b 61BuildRequires: xvid-devel >= 1:1.1.0
33a1c0f3 62BuildRequires: zlib-devel
57ebb8ad 63%{?with_autoreqdep:BuildConflicts: libpostproc}
54ec280e 64Requires: %{name}-libs = %{version}-%{release}
839e806f 65Requires: xvid >= 1:1.1.0
af49d6ab 66Obsoletes: libpostproc
539b540f 67BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
9fc4ad22 68
2a60eebe
JB
69%define _noautoreqdep libGL.so.1 libGLU.so.1
70
c01d7857
PS
71%define specflags -fno-strict-aliasing
72
73# -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
74%define specflags_ia32 -fomit-frame-pointer
75# -mmmx is needed to enable <mmintrin.h> code.
76%define specflags_i586 -mmmx
77%define specflags_i686 -mmmx
78
9fc4ad22
AM
79%description
80ffmpeg is a hyper fast realtime audio/video encoder and streaming
81server. It can grab from a standard Video4Linux video source and
82convert it into several file formats based on DCT/motion compensation
83encoding. Sound is compressed in MPEG audio layer 2 or using an AC3
fda3e16d 84compatible stream.
9fc4ad22 85
cdb7b42e 86%description -l pl.UTF-8
fda3e16d 87ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
cdb7b42e
JR
88oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucać dane
89ze standardowego urządzenia Video4Linux i przekonwertować je w kilka
90formatów plików bazujących na kodowaniu DCT/kompensacji ruchu. Dźwięk
91jest kompresowany do strumienia MPEG audio layer 2 lub używając
fda3e16d 92strumienia kompatybilnego z AC3.
9fc4ad22 93
54ec280e
PG
94%package libs
95Summary: ffmpeg libraries
adcc0f76 96Summary(pl.UTF-8): Biblioteki ffmpeg
54ec280e
PG
97Group: Libraries
98
99%description libs
5e173375 100This package contains ffmpeg shared libraries.
54ec280e 101
cdb7b42e
JR
102%description libs -l pl.UTF-8
103Ten pakiet zawiera biblioteki współdzielone ffmpeg.
54ec280e 104
af49d6ab
JB
105%package devel
106Summary: ffmpeg header files
adcc0f76 107Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
af49d6ab 108Group: Development/Libraries
54ec280e 109Requires: %{name}-libs = %{version}-%{release}
33a1c0f3 110# for libavcodec:
fc8de229
JB
111%if %{with amr}
112Requires: amrnb-devel
113Requires: amrwb-devel >= 5.3.0
114%endif
33a1c0f3 115Requires: faac-devel
96182eea 116Requires: faad2-devel
33a1c0f3 117Requires: lame-libs-devel
bf479bc6 118Requires: libgsm-devel
3e95d354 119Requires: libtheora-devel >= 1.0-0.alpha7
33a1c0f3 120Requires: libvorbis-devel
7bf6921d 121Requires: libx264-devel >= 0.1.2-1.20060828_2245.1
46f2a56b 122Requires: xvid-devel >= 1:1.1.0
33a1c0f3 123Requires: zlib-devel
8152d6a2 124Obsoletes: libpostproc-devel
af49d6ab
JB
125
126%description devel
127ffmpeg header files.
128
cdb7b42e
JR
129%description devel -l pl.UTF-8
130Pliki nagłówkowe ffmpeg.
af49d6ab
JB
131
132%package static
133Summary: ffmpeg static libraries
adcc0f76 134Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
af49d6ab
JB
135Group: Development/Libraries
136Requires: %{name}-devel = %{version}-%{release}
137
138%description static
139ffmpeg static libraries (libavcodec and libavformat).
140
cdb7b42e 141%description static -l pl.UTF-8
af49d6ab
JB
142Statyczne biblioteki ffmpeg (libavcodec i libavformat).
143
2a60eebe
JB
144%package ffplay
145Summary: FFplay - SDL-based media player
adcc0f76 146Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
2a60eebe 147Group: Applications/Multimedia
54ec280e 148Requires: %{name}-libs = %{version}-%{release}
2a60eebe
JB
149
150%description ffplay
151FFplay is a very simple and portable media player using the FFmpeg
152libraries and the SDL library. It is mostly used as a test bench for
153the various APIs of FFmpeg.
154
cdb7b42e
JR
155%description ffplay -l pl.UTF-8
156FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
157bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
158testowania różnych API FFmpeg.
2a60eebe 159
539b540f
JB
160%package vhook-imlib2
161Summary: imlib2 based hook
adcc0f76 162Summary(pl.UTF-8): Moduł przejściowy oparty o imlib2
539b540f 163Group: Libraries
54ec280e 164Requires: %{name}-libs = %{version}-%{release}
539b540f
JB
165
166%description vhook-imlib2
167This module implements a text overlay for a video image. Currently it
168supports a fixed overlay or reading the text from a file. The string
169is passed through strftime so that it is easy to imprint the date and
170time onto the image.
171
cdb7b42e
JR
172%description vhook-imlib2 -l pl.UTF-8
173Ten moduł implementuje tekstową nakładkę dla obrazu. Aktualnie
174obsługuje stałą nakładkę lub wczytywanie tekstu z pliku. Łańcuch jest
175przepuszczany przez strftime, więc łatwo umieścić datę i czas na
539b540f
JB
176obrazie.
177
fde29260
ER
178%package ffserver
179Summary: FFserver video server
adcc0f76 180Summary(pl.UTF-8): FFserver - serwer strumieni obrazu
fde29260 181Group: Daemons
593d3a64 182Requires(post,preun): /sbin/chkconfig
67103923 183Requires: %{name}-libs = %{version}-%{release}
2305d791 184Requires: rc-scripts >= 0.4.0.10
fde29260
ER
185
186%description ffserver
187FFserver is a streaming server for both audio and video. It supports
188several live feeds, streaming from files and time shifting on live
189feeds (you can seek to positions in the past on each live feed,
190provided you specify a big enough feed storage in ffserver.conf).
191
cdb7b42e
JR
192%description ffserver -l pl.UTF-8
193FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
194źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
195czasie dla źródeł na żywo (można przeskakiwać na położenia w
196przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
197dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
4e0bd1da 198
9fc4ad22 199%prep
2305d791 200%setup -q -n %{name}-export-%{_snap}
9fc4ad22 201
2b2445b7
ER
202# package the grep result for mplayer, the result formatted as mplayer/configure
203cat <<EOF > ffmpeg-config
204#! /bin/sh
205_libavdecoders_all="`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
206_libavencoders_all="`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
207_libavparsers_all="`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
208_libavbsfs_all="`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
209_libavdemuxers_all="`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
210_libavmuxers_all="`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
211_libavprotocols_all="`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
212EOF
213cat <<'EOF' >> ffmpeg-config
214
215case "$1" in
216--decoders)
217 echo $_libavdecoders_all
218 ;;
219--encoders)
220 echo $_libavencoders_all
221 ;;
222--parsers)
223 echo $_libavparsers_all
224 ;;
225--bsfs)
226 echo $_libavbsfs_all
227 ;;
228--demuxers)
229 echo $_libavdemuxers_all
230 ;;
231--muxers)
232 echo $_libavmuxers_all
233 ;;
234--protocols)
235 echo $_libavprotocols_all
236 ;;
237*)
238 cat <<USAGE
239Usage: $0 [OPTION]
240Options:
241 --decoders
242 --encoders
243 --parsers
244 --bsfs
245 --demuxers
246 --muxers
247 --protocols
248USAGE
249 exit 1;;
250esac
251
252exit 0
253EOF
254
9fc4ad22 255%build
05e1eb2f
JB
256# notes:
257# - it's not autoconf configure
d0a0ec26 258# - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
2080d1d3 259./configure \
b4680d0b 260 --arch=%{_target_base_arch} \
539b540f 261 --prefix=%{_prefix} \
9cf4d8a4 262 --libdir=%{_libdir} \
d81dfa95 263 --shlibdir=%{_libdir} \
2a60eebe 264 --mandir=%{_mandir} \
6382c99d
AM
265 --disable-stripping \
266 --enable-liba52 \
267 --enable-liba52bin \
15c15700
ER
268 --enable-libfaac \
269 --enable-libfaad \
270 --enable-libfaadbin \
6382c99d
AM
271 --enable-libdc1394 \
272 --enable-libdirac \
9cf4d8a4 273 --enable-gpl \
f3692243 274 --enable-libgsm \
3e95d354 275 --enable-libtheora \
15c15700 276 --enable-libmp3lame \
6382c99d 277 --enable-postproc \
d7493de8 278 --enable-pthreads \
9cf4d8a4 279 --enable-shared \
6382c99d 280 --enable-swscale \
15c15700 281 --enable-libvorbis \
9ce23f21
AM
282 --enable-libx264 \
283 --enable-libxvid \
7a286645 284%ifnarch %{ix86} %{x8664}
e1fe03f7 285 --disable-mmx \
286%endif
287%ifarch i386 i486
05e1eb2f 288 --disable-mmx \
b524cd99 289%endif
290%if %{with amr}
48610c64 291 --enable-nonfree \
2c00d607
JB
292 --enable-libamr-nb \
293 --enable-libamr-wb \
76243dbd 294%endif
05e1eb2f 295 --cc="%{__cc}" \
6382c99d 296 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
05e1eb2f
JB
297 --extra-ldflags="%{rpmldflags}" \
298 --disable-debug \
d0a0ec26 299 --disable-optimizations \
2305d791 300
873cd1c3 301%{__make}
9fc4ad22
AM
302
303%install
304rm -rf $RPM_BUILD_ROOT
38cf6de3
ER
305install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
306 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
9fc4ad22 307
539b540f 308%{__make} install \
9cf4d8a4 309 DESTDIR=$RPM_BUILD_ROOT
539b540f 310
ece24152 311install config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
075d3a6a 312install libavutil/intreadwrite.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
fde29260
ER
313install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
314install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
38cf6de3 315install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
539b540f 316mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
9fc4ad22 317
2b2445b7
ER
318# install as ffmpeg-avconfig to avoid with possible programs looking for
319# ffmpeg-config and expecting --libs output from it which is not implemented
320# simple to do (by querying pkgconfig), but why?
321install ffmpeg-config $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
322
9fc4ad22
AM
323%clean
324rm -rf $RPM_BUILD_ROOT
325
3146af55
KK
326%post libs -p /sbin/ldconfig
327%postun libs -p /sbin/ldconfig
539b540f 328
38cf6de3
ER
329%pre ffserver
330%groupadd -g 167 ffserver
331%useradd -g ffserver -u 167 ffserver
332
593d3a64
ER
333%post ffserver
334/sbin/chkconfig --add ffserver
335%service ffserver restart
336
38cf6de3 337%preun ffserver
593d3a64
ER
338if [ "$1" = 0 ]; then
339 %service ffserver stop
340 /sbin/chkconfig --del ffserver
341fi
342
38cf6de3
ER
343%postun ffserver
344if [ "$1" = 0 ]; then
345 %userremove ffserver
346 %groupremove ffserver
347fi
348
9fc4ad22
AM
349%files
350%defattr(644,root,root,755)
54ec280e 351%doc Changelog README doc/*.html doc/TODO
2a60eebe 352%attr(755,root,root) %{_bindir}/ffmpeg
54ec280e 353%{_mandir}/man1/ffmpeg.1*
54ec280e
PG
354
355%files libs
356%defattr(644,root,root,755)
f50f7d7c 357%attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
d0a0ec26 358%attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
f50f7d7c
JB
359%attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
360%attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
d7493de8 361%attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
ee032235 362%attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
d0a0ec26
ER
363%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.51
364%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.52
365%attr(755,root,root) %ghost %{_libdir}/libavformat.so.52
366%attr(755,root,root) %ghost %{_libdir}/libavutil.so.49
367%attr(755,root,root) %ghost %{_libdir}/libpostproc.so.51
368%attr(755,root,root) %ghost %{_libdir}/libswscale.so.0
539b540f 369%dir %{_libdir}/vhook
2a60eebe 370%attr(755,root,root) %{_libdir}/vhook/drawtext.so
539b540f 371%attr(755,root,root) %{_libdir}/vhook/fish.so
2a60eebe 372%attr(755,root,root) %{_libdir}/vhook/null.so
d2af4612 373%attr(755,root,root) %{_libdir}/vhook/ppm.so
d7493de8 374%attr(755,root,root) %{_libdir}/vhook/watermark.so
2a60eebe 375
539b540f
JB
376%files devel
377%defattr(644,root,root,755)
54ec280e 378%doc doc/optimization.txt
539b540f 379%attr(755,root,root) %{_libdir}/libavcodec.so
d0a0ec26 380%attr(755,root,root) %{_libdir}/libavdevice.so
539b540f 381%attr(755,root,root) %{_libdir}/libavformat.so
d7493de8 382%attr(755,root,root) %{_libdir}/libavutil.so
d2af4612 383%attr(755,root,root) %{_libdir}/libpostproc.so
ee032235 384%attr(755,root,root) %{_libdir}/libswscale.so
2b2445b7 385%attr(755,root,root) %{_bindir}/ffmpeg-avconfig
539b540f 386%{_includedir}/ffmpeg
6382c99d
AM
387%{_includedir}/libavcodec
388%{_includedir}/libavdevice
389%{_includedir}/libavformat
390%{_includedir}/libavutil
391%{_includedir}/libpostproc
392%{_includedir}/libswscale
d7493de8 393%{_pkgconfigdir}/*.pc
539b540f 394
9cf4d8a4
JB
395%files static
396%defattr(644,root,root,755)
397%{_libdir}/lib*.a
af49d6ab
JB
398
399%files ffplay
400%defattr(644,root,root,755)
401%attr(755,root,root) %{_bindir}/ffplay
402%{_mandir}/man1/ffplay.1*
403
404%if %{with imlib2}
405%files vhook-imlib2
406%defattr(644,root,root,755)
407%attr(755,root,root) %{_libdir}/vhook/imlib2.so
408%endif
fde29260
ER
409
410%files ffserver
411%defattr(644,root,root,755)
412%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
413%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
414%attr(755,root,root) %{_sbindir}/ffserver
415%attr(754,root,root) /etc/rc.d/init.d/ffserver
416%{_mandir}/man1/ffserver.1*
38cf6de3
ER
417%dir %attr(770,root,ffserver) /var/cache/ffserver
418%dir %attr(770,root,ffserver) /var/log/ffserver
This page took 0.14735 seconds and 4 git commands to generate.