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