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