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