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