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