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