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