]> git.pld-linux.org Git - packages/ffmpeg.git/blame - ffmpeg.spec
- generate versioned gnutls-libs R only when respective gnutls-devel is used
[packages/ffmpeg.git] / ffmpeg.spec
CommitLineData
197f4211 1#
5663f846
JB
2# How to deal with ffmpeg/opencv checken-egg problem:
3# 1. make-request -r --without opencv ffmpeg.spec
192f9f57 4# 2. make-request -r opencv.spec
5# 3. bump release of ffmpeg.spec
6# 4. make-request -r ffmpeg.spec
7#
2b3b2117 8# Conditional build:
38cefaee 9%bcond_with nonfree # non free options of package (currently: faac)
2e585b44 10%bcond_with aacplus # AAC+ encoding via libaacplus (requires nonfree)
5f3dc7d9 11%bcond_with fdk_aac # AAC de/encoding via libfdk_aac (requires nonfree)
1c1d1368 12%bcond_without caca # textual display using libcaca
a584ded4
JB
13%bcond_without flite # flite voice synthesis support
14%bcond_without frei0r # frei0r video filtering
22745365 15%bcond_without gme # Game Music Emu support
cbeed0a5 16%bcond_without ilbc # iLBC de/encoding via WebRTC libilbc
5f3dc7d9
JB
17%bcond_without ladspa # LADSPA audio filtering
18%bcond_without ssh # SFTP protocol support via libssh
a584ded4 19%bcond_without openal # OpenAL 1.1 capture support
143c6eec 20%bcond_with opencl # OpenCL code [OpenCL 1.2, not available in Mesa yet]
a584ded4
JB
21%bcond_without opencv # OpenCV video filtering
22%bcond_without pulseaudio # PulseAudio input support
22745365 23%bcond_without quvi # quvi input support
f56b6dce 24%bcond_without shine # shine fixed-point MP3 encoder
05408820 25%bcond_without soxr # SoX Resampler support
a584ded4
JB
26%bcond_without x264 # x264 encoder
27%bcond_without utvideo # Ut Video decoder
1ef27ea1 28%bcond_without va # VAAPI (Video Acceleration API)
f56b6dce 29%bcond_without vidstab # vid.stab video stabilization support
1ef27ea1 30%bcond_without vpx # VP8, a high-quality video codec
22745365 31%bcond_without wavpack # wavpack encoding support
6a6b11be 32%bcond_without zmq # 0MQ message passing
5f3dc7d9 33%bcond_without zvbi # teletext via libzvbi
1ef27ea1 34%bcond_without doc # don't build docs
314ef0df 35
cbdd2688
JB
36Summary: FFmpeg - a very fast video and audio converter
37Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
9fc4ad22 38Name: ffmpeg
805165c1 39Version: 2.1.1
8b88d457 40Release: 4
9cf4d8a4 41# LGPL or GPL, chosen at configure time (GPL version is more featured)
38cefaee
JB
42# (postprocessing, some filters, x264, xavs, xvid, x11grab)
43# using v3 allows Apache-licensed libs (opencore-amr, libvo-*enc)
0b43f655 44License: GPL v3+ with LGPL v3+ parts
fde29260 45Group: Applications/Multimedia
1ef27ea1 46Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.bz2
805165c1 47# Source0-md5: 2719ab2b3311ac3775b9cdeb66c54849
fde29260
ER
48Source1: ffserver.init
49Source2: ffserver.sysconfig
38cf6de3 50Source3: ffserver.conf
a7e0e69a 51Patch0: %{name}-opencv24.patch
84f92fbf 52Patch1: freetype2.patch
85f7cea1 53URL: http://www.ffmpeg.org/
28673856 54%{?with_openal:BuildRequires: OpenAL-devel >= 1.1}
6a6b11be 55%{?with_opencl:BuildRequires: OpenCL-devel >= 1.2}
3dcb8642 56BuildRequires: SDL-devel >= 1.2.1
cbdd2688 57BuildRequires: alsa-lib-devel
38cefaee 58BuildRequires: bzip2-devel
9f9ba8ac 59BuildRequires: celt-devel >= 0.11.0
38cefaee 60%{?with_nonfree:BuildRequires: faac-devel}
004e5628 61%{?with_fdk_aac:BuildRequires: fdk-aac-devel}
a584ded4 62%{?with_flite:BuildRequires: flite-devel >= 1.4}
3dcb8642 63BuildRequires: fontconfig-devel
0aad4bf2 64BuildRequires: freetype-devel
d7a39558 65%{?with_frei0r:BuildRequires: frei0r-devel}
22745365 66%{?with_gme:BuildRequires: game-music-emu-devel}
4bee03f0
JB
67%ifarch ppc
68# require version with altivec support fixed
69BuildRequires: gcc >= 5:3.3.2-3
70%endif
d5aef92e 71BuildRequires: gnutls-devel
cbdd2688 72BuildRequires: jack-audio-connection-kit-devel
5f3dc7d9 73%{?with_ladspa:BuildRequires: ladspa-devel}
cbdd2688 74BuildRequires: lame-libs-devel >= 3.98.3
2e585b44 75%{?with_aacplus:BuildRequires: libaacplus-devel >= 2.0.0}
d5aef92e 76BuildRequires: libass-devel
1c1d1368 77BuildRequires: libavc1394-devel
3dcb8642 78BuildRequires: libbluray-devel
1c1d1368 79%{?with_caca:BuildRequires: libcaca-devel}
a09e741c 80BuildRequires: libcdio-paranoia-devel >= 0.90-2
9c4296c2 81BuildRequires: libdc1394-devel >= 2
f1669449 82BuildRequires: libgsm-devel
1c1d1368 83BuildRequires: libiec61883-devel
d5aef92e 84BuildRequires: libmodplug-devel
4a927f9d 85BuildRequires: libnut-devel
22745365 86%{?with_quvi:BuildRequires: libquvi-devel}
7571bfa0 87BuildRequires: libraw1394-devel >= 2
cbdd2688 88BuildRequires: librtmp-devel
5f3dc7d9 89%{?with_ssh:BuildRequires: libssh-devel}
9042663c 90BuildRequires: libtheora-devel >= 1.0-0.beta3
4814ac84 91BuildRequires: libtool >= 2:1.4d-3
daf9a670 92BuildRequires: libv4l-devel
64f8f109 93%{?with_va:BuildRequires: libva-devel >= 1.0.3}
9c4296c2 94BuildRequires: libvdpau-devel >= 0.2
e380e18a 95BuildRequires: libvorbis-devel
28673856 96%{?with_vpx:BuildRequires: libvpx-devel >= 0.9.7}
660918c5
AM
97# X264_BUILD >= 118
98%{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245}
e1fe03f7 99%ifarch %{ix86}
100%ifnarch i386 i486
76243dbd
JB
101BuildRequires: nasm
102%endif
e1fe03f7 103%endif
1c1d1368
JB
104BuildRequires: opencore-amr-devel
105%{?with_opencv:BuildRequires: opencv-devel}
106BuildRequires: openjpeg-devel >= 1.5
107BuildRequires: opus-devel
136f0f45 108BuildRequires: perl-Encode
1463656a 109BuildRequires: perl-tools-pod
ef3c0513 110BuildRequires: pkgconfig
1c1d1368 111%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
db8052c8 112BuildRequires: rpmbuild(macros) >= 1.470
126fb805 113BuildRequires: schroedinger-devel
4a11c99e 114%{?with_shine:BuildRequires: shine-devel >= 3.0.0}
05408820 115%{?with_soxr:BuildRequires: soxr-devel}
1c1d1368 116BuildRequires: speex-devel >= 1:1.2-rc1
64f8f109
ER
117%{?with_doc:BuildRequires: tetex}
118%{?with_doc:BuildRequires: texi2html}
119%{?with_doc:BuildRequires: texinfo}
1c1d1368 120BuildRequires: twolame-devel
05408820 121%{?with_utvideo:BuildRequires: utvideo-devel >= 12}
f56b6dce 122%{?with_vidstab:BuildRequires: vid.stab-devel}
5dc039cb
JB
123BuildRequires: vo-aacenc-devel
124BuildRequires: vo-amrwbenc-devel
22745365 125%{?with_wavpack:BuildRequires: wavpack-devel}
cbeed0a5 126%{?with_ilbc:BuildRequires: webrtc-libilbc-devel}
5dc039cb 127BuildRequires: xavs-devel
28673856 128BuildRequires: xorg-lib-libX11-devel
cbdd2688
JB
129BuildRequires: xorg-lib-libXext-devel
130BuildRequires: xorg-lib-libXfixes-devel
46f2a56b 131BuildRequires: xvid-devel >= 1:1.1.0
cbeed0a5 132BuildRequires: yasm
6a6b11be 133%{?with_zmq:BuildRequires: zeromq-devel}
5f3dc7d9 134%{?with_zvbi:BuildRequires: zvbi-devel}
33a1c0f3 135BuildRequires: zlib-devel
57ebb8ad 136%{?with_autoreqdep:BuildConflicts: libpostproc}
9c4296c2
JB
137# overflows maximum hash table size
138BuildConflicts: pdksh < 5.2.14-57
54ec280e 139Requires: %{name}-libs = %{version}-%{release}
05408820 140%{?with_utvideo:Requires: utvideo >= 12}
92a3edff 141%{?with_ilbc:Requires: webrtc-libilbc}
839e806f 142Requires: xvid >= 1:1.1.0
af49d6ab 143Obsoletes: libpostproc
539b540f 144BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
9fc4ad22 145
2a60eebe
JB
146%define _noautoreqdep libGL.so.1 libGLU.so.1
147
c01d7857
PS
148%define specflags -fno-strict-aliasing
149
150# -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
151%define specflags_ia32 -fomit-frame-pointer
152# -mmmx is needed to enable <mmintrin.h> code.
153%define specflags_i586 -mmmx
154%define specflags_i686 -mmmx
1162803a 155%define specflags_ppc -fPIC
c01d7857 156
9fc4ad22 157%description
85f7cea1
ER
158FFmpeg is a complete solution to record, convert and stream audio and
159video. It is a command line tool to convert one video file format to
160another. It also supports grabbing and encoding in real time from a TV
161card.
9fc4ad22 162
cdb7b42e 163%description -l pl.UTF-8
cbdd2688
JB
164FFmpeg to kompletne rozwiązanie nagrywania, konwersji i transmisji
165strumieni dźwięku i obrazu. Jest to działające z linii poleceń
166narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje
167także przechwytywanie i kodowanie w czasie rzeczywistym z karty
168telewizyjnej.
9fc4ad22 169
54ec280e
PG
170%package libs
171Summary: ffmpeg libraries
adcc0f76 172Summary(pl.UTF-8): Biblioteki ffmpeg
143c6eec
JB
173%if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20"
174# uses gnutls_certificate_set_x509_system_trust if >= 3.0.20
f9cce0c9 175Requires: gnutls-libs >= 3.0.20
143c6eec 176%endif
54ec280e
PG
177Group: Libraries
178
179%description libs
cbdd2688
JB
180This package contains the ffmpeg shared libraries:
181- the codec library (libavcodec). It supports most existing encoding
182 formats (MPEG, DivX, MPEG4, AC3, DV...),
183- demuxer library (libavformat). It supports most existing file
184 formats (AVI, MPEG, OGG, Matroska, ASF...),
185- video postprocessing library (libpostproc).
54ec280e 186
cdb7b42e 187%description libs -l pl.UTF-8
cbdd2688
JB
188Ten pakiet zawiera biblioteki współdzielone ffmpeg:
189- bibliotekę kodeków (libavcodec); obsługuje większość istniejących
190 formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...),
191- bibliotekę demuksera (libavformat); obsługuje większość istniejących
192 formatów plików (AVI, MPEG, OGG, Matroska, ASF...),
193- bibliotekę postprocessingu (libpostproc).
54ec280e 194
af49d6ab
JB
195%package devel
196Summary: ffmpeg header files
adcc0f76 197Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
af49d6ab 198Group: Development/Libraries
54ec280e 199Requires: %{name}-libs = %{version}-%{release}
38cefaee 200# Libs.private from *.pc (unreasonably they are all the same)
6a6b11be 201%{?with_opencl:Requires: OpenCL-devel >= 1.2}
3dcb8642 202Requires: SDL-devel >= 1.2.1
38cefaee
JB
203Requires: alsa-lib-devel
204Requires: bzip2-devel
9c4296c2 205Requires: celt-devel >= 0.11.0
38cefaee 206%{?with_nonfree:Requires: faac-devel}
004e5628 207%{?with_fdk_aac:Requires: fdk-aac-devel}
4b05ede1 208%{?with_flite:Requires: flite-devel >= 1.4}
3dcb8642 209Requires: fontconfig-devel
0aad4bf2 210Requires: freetype-devel
22745365 211%{?with_gme:Requires: game-music-emu-devel}
38cefaee
JB
212Requires: jack-audio-connection-kit-devel
213Requires: lame-libs-devel >= 3.98.3
1c1d1368
JB
214%{?with_aacplus:Requires: libaacplus-devel >= 2.0.0}
215Requires: libass-devel
216Requires: libavc1394-devel
3dcb8642 217Requires: libbluray-devel
28673856 218%{?with_caca:Requires: libcaca-devel}
a09e741c 219Requires: libcdio-paranoia-devel >= 0.90-2
9c4296c2 220Requires: libdc1394-devel >= 2
bf479bc6 221Requires: libgsm-devel
1c1d1368
JB
222Requires: libiec61883-devel
223Requires: libmodplug-devel
4a927f9d 224Requires: libnut-devel
22745365 225%{?with_quvi:Requires: libquvi-devel}
7571bfa0 226Requires: libraw1394-devel >= 2
38cefaee
JB
227Requires: librtmp-devel
228Requires: libtheora-devel >= 1.0-0.beta3
229%{?with_va:Requires: libva-devel >= 1.0.3}
33a1c0f3 230Requires: libvorbis-devel
28673856 231%{?with_vpx:Requires: libvpx-devel >= 0.9.7}
ea09f25d 232%{?with_x264:Requires: libx264-devel >= 0.1.3-1.20110625_2245}
38cefaee 233Requires: opencore-amr-devel
fc1d9619 234%{?with_opencv:Requires: opencv-devel}
ae5be86b 235Requires: openjpeg-devel >= 1.5
38cefaee 236Requires: schroedinger-devel
4a11c99e 237%{?with_shine:Requires: shine-devel >= 3.0.0}
05408820 238%{?with_soxr:Requires: soxr-devel}
38cefaee 239Requires: speex-devel >= 1:1.2-rc1
1c1d1368 240Requires: twolame-devel
05408820 241%{?with_utvideo:Requires: utvideo-devel >= 12}
f56b6dce 242%{?with_vidstab:Requires: vid.stab-devel}
38cefaee
JB
243Requires: vo-aacenc-devel
244Requires: vo-amrwbenc-devel
22745365 245%{?with_wavpack:Requires: wavpack-devel}
cbeed0a5 246%{?with_ilbc:Requires: webrtc-libilbc-devel}
38cefaee
JB
247Requires: xavs-devel
248Requires: xorg-lib-libXext-devel
249Requires: xorg-lib-libXfixes-devel
46f2a56b 250Requires: xvid-devel >= 1:1.1.0
6a6b11be 251%{?with_zmq:Requires: zeromq-devel}
33a1c0f3 252Requires: zlib-devel
8152d6a2 253Obsoletes: libpostproc-devel
af49d6ab
JB
254
255%description devel
256ffmpeg header files.
257
cdb7b42e
JR
258%description devel -l pl.UTF-8
259Pliki nagłówkowe ffmpeg.
af49d6ab
JB
260
261%package static
262Summary: ffmpeg static libraries
adcc0f76 263Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
af49d6ab
JB
264Group: Development/Libraries
265Requires: %{name}-devel = %{version}-%{release}
266
267%description static
268ffmpeg static libraries (libavcodec and libavformat).
269
cdb7b42e 270%description static -l pl.UTF-8
af49d6ab
JB
271Statyczne biblioteki ffmpeg (libavcodec i libavformat).
272
2a60eebe
JB
273%package ffplay
274Summary: FFplay - SDL-based media player
adcc0f76 275Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
2a60eebe 276Group: Applications/Multimedia
54ec280e 277Requires: %{name}-libs = %{version}-%{release}
2a60eebe
JB
278
279%description ffplay
280FFplay is a very simple and portable media player using the FFmpeg
281libraries and the SDL library. It is mostly used as a test bench for
282the various APIs of FFmpeg.
283
cdb7b42e
JR
284%description ffplay -l pl.UTF-8
285FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
286bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
287testowania różnych API FFmpeg.
2a60eebe 288
fde29260
ER
289%package ffserver
290Summary: FFserver video server
adcc0f76 291Summary(pl.UTF-8): FFserver - serwer strumieni obrazu
fde29260 292Group: Daemons
593d3a64 293Requires(post,preun): /sbin/chkconfig
67103923 294Requires: %{name}-libs = %{version}-%{release}
2305d791 295Requires: rc-scripts >= 0.4.0.10
fde29260
ER
296
297%description ffserver
298FFserver is a streaming server for both audio and video. It supports
299several live feeds, streaming from files and time shifting on live
300feeds (you can seek to positions in the past on each live feed,
301provided you specify a big enough feed storage in ffserver.conf).
302
cdb7b42e
JR
303%description ffserver -l pl.UTF-8
304FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
305źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
306czasie dla źródeł na żywo (można przeskakiwać na położenia w
307przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
308dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
4e0bd1da 309
4b05ede1 310%package doc
143c6eec
JB
311Summary: FFmpeg documentation in HTML format
312Summary(pl.UTF-8): Dokumentacja pakietu FFmpeg w formacie HTML
4b05ede1
ER
313Group: Documentation
314%if "%{_rpmversion}" >= "5"
315BuildArch: noarch
316%endif
317
318%description doc
143c6eec 319FFmpeg documentation in HTML format.
4b05ede1
ER
320
321%description doc -l pl.UTF-8
143c6eec 322Dokumentacja pakietu FFmpeg w formacie HTML.
4b05ede1 323
9fc4ad22 324%prep
aed8e8c9 325%setup -q
f1669449 326%patch0 -p1
84f92fbf 327%patch1 -p1
9fc4ad22 328
9d4f8977
ER
329# package the grep result for mplayer, the result formatted as ./mplayer/configure
330cat <<EOF > ffmpeg-avconfig
2b2445b7 331#! /bin/sh
16803cdb
ER
332libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
333libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
334libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
335libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
336libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
337libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
338libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
339libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
340libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
2b2445b7 341EOF
9d4f8977 342cat <<'EOF' >> ffmpeg-avconfig
2b2445b7
ER
343
344case "$1" in
345--decoders)
16803cdb 346 echo $libavdecoders_all
2b2445b7
ER
347 ;;
348--encoders)
16803cdb 349 echo $libavencoders_all
2b2445b7
ER
350 ;;
351--parsers)
16803cdb 352 echo $libavparsers_all
2b2445b7
ER
353 ;;
354--bsfs)
16803cdb 355 echo $libavbsfs_all
2b2445b7
ER
356 ;;
357--demuxers)
16803cdb 358 echo $libavdemuxers_all
2b2445b7
ER
359 ;;
360--muxers)
16803cdb 361 echo $libavmuxers_all
2b2445b7
ER
362 ;;
363--protocols)
16803cdb
ER
364 echo $libavprotocols_all
365 ;;
366--hwaccels)
367 echo $libavhwaccels_all
368 ;;
369--filters)
370 echo $libavfilters_all
2b2445b7
ER
371 ;;
372*)
373 cat <<USAGE
374Usage: $0 [OPTION]
375Options:
376 --decoders
377 --encoders
378 --parsers
379 --bsfs
380 --demuxers
381 --muxers
382 --protocols
16803cdb
ER
383 --hwaccels
384 --filters
2b2445b7
ER
385USAGE
386 exit 1;;
387esac
388
389exit 0
390EOF
391
9fc4ad22 392%build
05e1eb2f
JB
393# notes:
394# - it's not autoconf configure
d0a0ec26 395# - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
2080d1d3 396./configure \
b4680d0b 397 --arch=%{_target_base_arch} \
539b540f 398 --prefix=%{_prefix} \
9cf4d8a4 399 --libdir=%{_libdir} \
d81dfa95 400 --shlibdir=%{_libdir} \
2a60eebe 401 --mandir=%{_mandir} \
84f92fbf 402 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
1162803a 403 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
3eef5ddf 404 --cc="%{__cc}" \
126fb805
JB
405 --disable-debug \
406 --disable-optimizations \
6382c99d 407 --disable-stripping \
314ef0df 408 --enable-avfilter \
0797daec 409 --enable-avresample \
d5aef92e 410 --enable-gnutls \
126fb805 411 --enable-gpl \
0b43f655 412 --enable-version3 \
3dcb8642 413 --enable-fontconfig \
d7a39558 414 %{?with_frei0r:--enable-frei0r} \
5f3dc7d9 415 %{?with_ladspa:--enable-ladspa} \
2e585b44 416 %{?with_aacplus:--enable-libaacplus} \
d5aef92e 417 --enable-libass \
3dcb8642 418 --enable-libbluray \
2362253d 419 %{?with_caca:--enable-libcaca} \
cbdd2688 420 --enable-libcelt \
d5aef92e
JB
421 --enable-libcdio \
422 --enable-libdc1394 \
004e5628 423 %{?with_fdk_aac:--enable-libfdk-aac} \
1c1d1368 424 %{?with_flite:--enable-libflite} \
3dcb8642 425 --enable-libfreetype \
22745365 426 %{?with_gme:--enable-libgme} \
f3692243 427 --enable-libgsm \
1c1d1368 428 --enable-libiec61883 \
004e5628 429 %{?with_ilbc:--enable-libilbc} \
d5aef92e 430 --enable-libmodplug \
15c15700 431 --enable-libmp3lame \
4a927f9d 432 --enable-libnut \
cbdd2688
JB
433 --enable-libopencore-amrnb \
434 --enable-libopencore-amrwb \
192f9f57 435 %{?with_opencv:--enable-libopencv} \
cbdd2688 436 --enable-libopenjpeg \
1c1d1368 437 --enable-libopus \
d5aef92e 438 %{?with_pulseaudio:--enable-libpulse} \
22745365 439 %{?with_quvi:--enable-libquvi} \
cbdd2688 440 --enable-librtmp \
126fb805 441 --enable-libschroedinger \
f56b6dce 442 %{?with_shine:--enable-libshine} \
05408820 443 %{?with_soxr:--enable-libsoxr} \
da99dcf2 444 --enable-libspeex \
5f3dc7d9 445 %{?with_ssh:--enable-libssh} \
126fb805 446 --enable-libtheora \
1c1d1368 447 --enable-libtwolame \
daf9a670 448 %{?with_utvideo:--enable-libutvideo} \
d5aef92e 449 --enable-libv4l2 \
f56b6dce 450 %{?with_vidstab:--enable-libvidstab} \
5dc039cb
JB
451 --enable-libvo-aacenc \
452 --enable-libvo-amrwbenc \
126fb805 453 --enable-libvorbis \
64f8f109 454 %{?with_vpx:--enable-libvpx} \
22745365 455 %{?with_wavpack:--enable-libwavpack} \
ea09f25d 456 %{?with_x264:--enable-libx264} \
5dc039cb 457 --enable-libxavs \
126fb805 458 --enable-libxvid \
6a6b11be 459 %{?with_zmq:--enable-libzmq} \
5f3dc7d9 460 %{?with_zvbi:--enable-libzvbi} \
d5aef92e 461 %{?with_openal:--enable-openal} \
f56b6dce 462 %{?with_opencl:--enable-opencl} \
6382c99d 463 --enable-postproc \
d7493de8 464 --enable-pthreads \
9cf4d8a4 465 --enable-shared \
6382c99d 466 --enable-swscale \
22745365 467 %{!?with_va:--disable-vaapi} \
75231f25 468 --enable-x11grab \
7a286645 469%ifnarch %{ix86} %{x8664}
e1fe03f7 470 --disable-mmx \
471%endif
472%ifarch i386 i486
05e1eb2f 473 --disable-mmx \
b524cd99 474%endif
0b43f655 475%if %{with nonfree}
48610c64 476 --enable-nonfree \
0b43f655 477 --enable-libfaac \
76243dbd 478%endif
75231f25 479 --enable-runtime-cpudetect
2305d791 480
1ef27ea1
JB
481%{__make} \
482 V=1
9fc4ad22 483
b8c60172
ER
484# CC_O to add -c to commandline. makefile should be patched
485%{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
486
9fc4ad22
AM
487%install
488rm -rf $RPM_BUILD_ROOT
38cf6de3 489install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
38baa0f1 490 $RPM_BUILD_ROOT%{_includedir}/ffmpeg \
38cf6de3 491 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
9fc4ad22 492
a831ce58 493%{__make} install install-headers \
1ef27ea1
JB
494 DESTDIR=$RPM_BUILD_ROOT \
495 V=1
539b540f 496
a831ce58 497# install nonstandard, non-public headers manually
544421b2 498cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
544421b2 499for a in libavutil/*/bswap.h; do
a831ce58 500 install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
544421b2 501done
9d4f8977 502cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
980e7aa8
JB
503# for lim-omx ffmpeg components
504cp -a libavcodec/audioconvert.h $RPM_BUILD_ROOT%{_includedir}/libavcodec
544421b2 505
b8c60172
ER
506install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
507cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
508cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
539b540f 509mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
b8c60172 510install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
9fc4ad22 511
2b2445b7
ER
512# install as ffmpeg-avconfig to avoid with possible programs looking for
513# ffmpeg-config and expecting --libs output from it which is not implemented
514# simple to do (by querying pkgconfig), but why?
b8c60172 515install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
2b2445b7 516
9fc4ad22
AM
517%clean
518rm -rf $RPM_BUILD_ROOT
519
1ef27ea1
JB
520%post libs -p /sbin/ldconfig
521%postun libs -p /sbin/ldconfig
539b540f 522
38cf6de3
ER
523%pre ffserver
524%groupadd -g 167 ffserver
525%useradd -g ffserver -u 167 ffserver
526
593d3a64
ER
527%post ffserver
528/sbin/chkconfig --add ffserver
529%service ffserver restart
530
38cf6de3 531%preun ffserver
593d3a64
ER
532if [ "$1" = 0 ]; then
533 %service ffserver stop
534 /sbin/chkconfig --del ffserver
535fi
536
38cf6de3
ER
537%postun ffserver
538if [ "$1" = 0 ]; then
539 %userremove ffserver
540 %groupremove ffserver
541fi
542
9fc4ad22
AM
543%files
544%defattr(644,root,root,755)
4b05ede1 545%doc CREDITS LICENSE MAINTAINERS README doc/{APIchanges,RELEASE_NOTES}
2a60eebe 546%attr(755,root,root) %{_bindir}/ffmpeg
3a7b84be 547%attr(755,root,root) %{_bindir}/ffprobe
b7313442 548%attr(755,root,root) %{_bindir}/qt-faststart
da99dcf2
AM
549%dir %{_datadir}/ffmpeg
550%{_datadir}/ffmpeg/*.ffpreset
714dcf83 551%{_datadir}/ffmpeg/ffprobe.xsd
28673856
JB
552%if %{with doc}
553%{_mandir}/man1/ffmpeg.1*
22745365 554%{_mandir}/man1/ffmpeg-all.1*
28673856
JB
555%{_mandir}/man1/ffmpeg-bitstream-filters.1*
556%{_mandir}/man1/ffmpeg-codecs.1*
557%{_mandir}/man1/ffmpeg-devices.1*
558%{_mandir}/man1/ffmpeg-filters.1*
559%{_mandir}/man1/ffmpeg-formats.1*
560%{_mandir}/man1/ffmpeg-protocols.1*
561%{_mandir}/man1/ffmpeg-resampler.1*
562%{_mandir}/man1/ffmpeg-scaler.1*
563%{_mandir}/man1/ffmpeg-utils.1*
564%{_mandir}/man1/ffprobe.1*
22745365 565%{_mandir}/man1/ffprobe-all.1*
28673856 566%endif
54ec280e
PG
567
568%files libs
569%defattr(644,root,root,755)
f50f7d7c 570%attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
22745365 571%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.55
d0a0ec26 572%attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
22745365 573%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.55
314ef0df 574%attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
1c1d1368 575%attr(755,root,root) %ghost %{_libdir}/libavfilter.so.3
f50f7d7c 576%attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
22745365 577%attr(755,root,root) %ghost %{_libdir}/libavformat.so.55
5663f846 578%attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
28673856 579%attr(755,root,root) %ghost %{_libdir}/libavresample.so.1
f50f7d7c 580%attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
28673856 581%attr(755,root,root) %ghost %{_libdir}/libavutil.so.52
d7493de8 582%attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
714dcf83 583%attr(755,root,root) %ghost %{_libdir}/libpostproc.so.52
660918c5
AM
584%attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
585%attr(755,root,root) %ghost %{_libdir}/libswresample.so.0
ee032235 586%attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
cbdd2688 587%attr(755,root,root) %ghost %{_libdir}/libswscale.so.2
314ef0df 588
539b540f
JB
589%files devel
590%defattr(644,root,root,755)
54ec280e 591%doc doc/optimization.txt
1ef27ea1 592%attr(755,root,root) %{_bindir}/ffmpeg-avconfig
539b540f 593%attr(755,root,root) %{_libdir}/libavcodec.so
d0a0ec26 594%attr(755,root,root) %{_libdir}/libavdevice.so
314ef0df 595%attr(755,root,root) %{_libdir}/libavfilter.so
539b540f 596%attr(755,root,root) %{_libdir}/libavformat.so
5663f846 597%attr(755,root,root) %{_libdir}/libavresample.so
d7493de8 598%attr(755,root,root) %{_libdir}/libavutil.so
d2af4612 599%attr(755,root,root) %{_libdir}/libpostproc.so
660918c5 600%attr(755,root,root) %{_libdir}/libswresample.so
ee032235 601%attr(755,root,root) %{_libdir}/libswscale.so
539b540f 602%{_includedir}/ffmpeg
6382c99d
AM
603%{_includedir}/libavcodec
604%{_includedir}/libavdevice
314ef0df 605%{_includedir}/libavfilter
6382c99d 606%{_includedir}/libavformat
5663f846 607%{_includedir}/libavresample
6382c99d
AM
608%{_includedir}/libavutil
609%{_includedir}/libpostproc
660918c5 610%{_includedir}/libswresample
6382c99d 611%{_includedir}/libswscale
1ef27ea1
JB
612%{_pkgconfigdir}/libavcodec.pc
613%{_pkgconfigdir}/libavdevice.pc
614%{_pkgconfigdir}/libavfilter.pc
615%{_pkgconfigdir}/libavformat.pc
5663f846 616%{_pkgconfigdir}/libavresample.pc
1ef27ea1
JB
617%{_pkgconfigdir}/libavutil.pc
618%{_pkgconfigdir}/libpostproc.pc
660918c5 619%{_pkgconfigdir}/libswresample.pc
1ef27ea1 620%{_pkgconfigdir}/libswscale.pc
28673856
JB
621%if %{with doc}
622%{_mandir}/man3/libavcodec.3*
623%{_mandir}/man3/libavdevice.3*
624%{_mandir}/man3/libavfilter.3*
625%{_mandir}/man3/libavformat.3*
626%{_mandir}/man3/libavutil.3*
627%{_mandir}/man3/libswresample.3*
628%{_mandir}/man3/libswscale.3*
629%endif
539b540f 630
9cf4d8a4
JB
631%files static
632%defattr(644,root,root,755)
1ef27ea1
JB
633%{_libdir}/libavcodec.a
634%{_libdir}/libavdevice.a
635%{_libdir}/libavfilter.a
636%{_libdir}/libavformat.a
5663f846 637%{_libdir}/libavresample.a
1ef27ea1
JB
638%{_libdir}/libavutil.a
639%{_libdir}/libpostproc.a
660918c5 640%{_libdir}/libswresample.a
1ef27ea1 641%{_libdir}/libswscale.a
af49d6ab
JB
642
643%files ffplay
644%defattr(644,root,root,755)
645%attr(755,root,root) %{_bindir}/ffplay
22745365
JB
646%if %{with doc}
647%{_mandir}/man1/ffplay.1*
648%{_mandir}/man1/ffplay-all.1*
649%endif
af49d6ab 650
fde29260
ER
651%files ffserver
652%defattr(644,root,root,755)
653%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
654%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
655%attr(755,root,root) %{_sbindir}/ffserver
656%attr(754,root,root) /etc/rc.d/init.d/ffserver
22745365
JB
657%if %{with doc}
658%{_mandir}/man1/ffserver.1*
659%{_mandir}/man1/ffserver-all.1*
660%endif
38cf6de3
ER
661%dir %attr(770,root,ffserver) /var/cache/ffserver
662%dir %attr(770,root,ffserver) /var/log/ffserver
4b05ede1
ER
663
664%if %{with doc}
665%files doc
666%defattr(644,root,root,755)
667%doc doc/*.html
668%endif
This page took 0.42462 seconds and 4 git commands to generate.