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