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