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