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