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