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