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