]> git.pld-linux.org Git - packages/ffmpeg.git/blame - ffmpeg.spec
- rel 2
[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
d23f74a5 37Version: 2.0.1
d40b728c 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
d23f74a5 45# Source0-md5: dd71a1baedb2daa3e4d21e0651daa918
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
f56b6dce 85%{?with_shine:BuildRequires: shine-devel}
9042663c 86BuildRequires: libtheora-devel >= 1.0-0.beta3
4814ac84 87BuildRequires: libtool >= 2:1.4d-3
daf9a670 88BuildRequires: libv4l-devel
64f8f109 89%{?with_va:BuildRequires: libva-devel >= 1.0.3}
9c4296c2 90BuildRequires: libvdpau-devel >= 0.2
e380e18a 91BuildRequires: libvorbis-devel
28673856 92%{?with_vpx:BuildRequires: libvpx-devel >= 0.9.7}
660918c5
AM
93# X264_BUILD >= 118
94%{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245}
e1fe03f7 95%ifarch %{ix86}
96%ifnarch i386 i486
76243dbd
JB
97BuildRequires: nasm
98%endif
e1fe03f7 99%endif
1c1d1368
JB
100BuildRequires: opencore-amr-devel
101%{?with_opencv:BuildRequires: opencv-devel}
102BuildRequires: openjpeg-devel >= 1.5
103BuildRequires: opus-devel
136f0f45 104BuildRequires: perl-Encode
1463656a 105BuildRequires: perl-tools-pod
ef3c0513 106BuildRequires: pkgconfig
1c1d1368 107%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
db8052c8 108BuildRequires: rpmbuild(macros) >= 1.470
126fb805 109BuildRequires: schroedinger-devel
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}
3dcb8642
JB
198Requires: fontconfig-devel
199Requires: freetype-devel
22745365 200%{?with_gme:Requires: game-music-emu-devel}
38cefaee 201Requires: jack-audio-connection-kit-devel
a584ded4 202%{?with_flite:Requires: flite-devel >= 1.4}
38cefaee 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
f56b6dce 227%{?with_shine:Requires: shine-devel}
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
9fc4ad22 300%prep
aed8e8c9 301%setup -q
f1669449 302%patch0 -p1
9fc4ad22 303
9d4f8977
ER
304# package the grep result for mplayer, the result formatted as ./mplayer/configure
305cat <<EOF > ffmpeg-avconfig
2b2445b7 306#! /bin/sh
16803cdb
ER
307libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
308libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
309libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
310libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
311libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
312libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
313libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
314libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
315libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
2b2445b7 316EOF
9d4f8977 317cat <<'EOF' >> ffmpeg-avconfig
2b2445b7
ER
318
319case "$1" in
320--decoders)
16803cdb 321 echo $libavdecoders_all
2b2445b7
ER
322 ;;
323--encoders)
16803cdb 324 echo $libavencoders_all
2b2445b7
ER
325 ;;
326--parsers)
16803cdb 327 echo $libavparsers_all
2b2445b7
ER
328 ;;
329--bsfs)
16803cdb 330 echo $libavbsfs_all
2b2445b7
ER
331 ;;
332--demuxers)
16803cdb 333 echo $libavdemuxers_all
2b2445b7
ER
334 ;;
335--muxers)
16803cdb 336 echo $libavmuxers_all
2b2445b7
ER
337 ;;
338--protocols)
16803cdb
ER
339 echo $libavprotocols_all
340 ;;
341--hwaccels)
342 echo $libavhwaccels_all
343 ;;
344--filters)
345 echo $libavfilters_all
2b2445b7
ER
346 ;;
347*)
348 cat <<USAGE
349Usage: $0 [OPTION]
350Options:
351 --decoders
352 --encoders
353 --parsers
354 --bsfs
355 --demuxers
356 --muxers
357 --protocols
16803cdb
ER
358 --hwaccels
359 --filters
2b2445b7
ER
360USAGE
361 exit 1;;
362esac
363
364exit 0
365EOF
366
9fc4ad22 367%build
05e1eb2f
JB
368# notes:
369# - it's not autoconf configure
d0a0ec26 370# - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
2080d1d3 371./configure \
b4680d0b 372 --arch=%{_target_base_arch} \
539b540f 373 --prefix=%{_prefix} \
9cf4d8a4 374 --libdir=%{_libdir} \
d81dfa95 375 --shlibdir=%{_libdir} \
2a60eebe 376 --mandir=%{_mandir} \
314ef0df 377 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
1162803a 378 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
3eef5ddf 379 --cc="%{__cc}" \
126fb805
JB
380 --disable-debug \
381 --disable-optimizations \
6382c99d 382 --disable-stripping \
314ef0df 383 --enable-avfilter \
0797daec 384 --enable-avresample \
d5aef92e 385 --enable-gnutls \
126fb805 386 --enable-gpl \
0b43f655 387 --enable-version3 \
3dcb8642 388 --enable-fontconfig \
d7a39558 389 %{?with_frei0r:--enable-frei0r} \
2e585b44 390 %{?with_aacplus:--enable-libaacplus} \
d5aef92e 391 --enable-libass \
3dcb8642 392 --enable-libbluray \
2362253d 393 %{?with_caca:--enable-libcaca} \
cbdd2688 394 --enable-libcelt \
d5aef92e
JB
395 --enable-libcdio \
396 --enable-libdc1394 \
004e5628 397 %{?with_fdk_aac:--enable-libfdk-aac} \
1c1d1368 398 %{?with_flite:--enable-libflite} \
3dcb8642 399 --enable-libfreetype \
22745365 400 %{?with_gme:--enable-libgme} \
f3692243 401 --enable-libgsm \
1c1d1368 402 --enable-libiec61883 \
004e5628 403 %{?with_ilbc:--enable-libilbc} \
d5aef92e 404 --enable-libmodplug \
15c15700 405 --enable-libmp3lame \
4a927f9d 406 --enable-libnut \
cbdd2688
JB
407 --enable-libopencore-amrnb \
408 --enable-libopencore-amrwb \
192f9f57 409 %{?with_opencv:--enable-libopencv} \
cbdd2688 410 --enable-libopenjpeg \
1c1d1368 411 --enable-libopus \
d5aef92e 412 %{?with_pulseaudio:--enable-libpulse} \
22745365 413 %{?with_quvi:--enable-libquvi} \
cbdd2688 414 --enable-librtmp \
126fb805 415 --enable-libschroedinger \
f56b6dce 416 %{?with_shine:--enable-libshine} \
05408820 417 %{?with_soxr:--enable-libsoxr} \
da99dcf2 418 --enable-libspeex \
126fb805 419 --enable-libtheora \
1c1d1368 420 --enable-libtwolame \
daf9a670 421 %{?with_utvideo:--enable-libutvideo} \
d5aef92e 422 --enable-libv4l2 \
f56b6dce 423 %{?with_vidstab:--enable-libvidstab} \
5dc039cb
JB
424 --enable-libvo-aacenc \
425 --enable-libvo-amrwbenc \
126fb805 426 --enable-libvorbis \
64f8f109 427 %{?with_vpx:--enable-libvpx} \
22745365 428 %{?with_wavpack:--enable-libwavpack} \
ea09f25d 429 %{?with_x264:--enable-libx264} \
5dc039cb 430 --enable-libxavs \
126fb805 431 --enable-libxvid \
6a6b11be 432 %{?with_zmq:--enable-libzmq} \
d5aef92e 433 %{?with_openal:--enable-openal} \
f56b6dce 434 %{?with_opencl:--enable-opencl} \
6382c99d 435 --enable-postproc \
d7493de8 436 --enable-pthreads \
9cf4d8a4 437 --enable-shared \
6382c99d 438 --enable-swscale \
22745365 439 %{!?with_va:--disable-vaapi} \
75231f25 440 --enable-x11grab \
7a286645 441%ifnarch %{ix86} %{x8664}
e1fe03f7 442 --disable-mmx \
443%endif
444%ifarch i386 i486
05e1eb2f 445 --disable-mmx \
b524cd99 446%endif
0b43f655 447%if %{with nonfree}
48610c64 448 --enable-nonfree \
0b43f655 449 --enable-libfaac \
76243dbd 450%endif
75231f25 451 --enable-runtime-cpudetect
2305d791 452
da99dcf2 453# force oldscaler build
b8c60172 454%{__sed} -i -e 's|#define.*CONFIG_OLDSCALER.*0|#define CONFIG_OLDSCALER 1|g' config.h
da99dcf2 455
1ef27ea1
JB
456%{__make} \
457 V=1
9fc4ad22 458
b8c60172
ER
459# CC_O to add -c to commandline. makefile should be patched
460%{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
461
9fc4ad22
AM
462%install
463rm -rf $RPM_BUILD_ROOT
38cf6de3 464install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
38baa0f1 465 $RPM_BUILD_ROOT%{_includedir}/ffmpeg \
38cf6de3 466 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
9fc4ad22 467
a831ce58 468%{__make} install install-headers \
1ef27ea1
JB
469 DESTDIR=$RPM_BUILD_ROOT \
470 V=1
539b540f 471
a831ce58 472# install nonstandard, non-public headers manually
544421b2 473cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
544421b2 474for a in libavutil/*/bswap.h; do
a831ce58 475 install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
544421b2 476done
9d4f8977 477cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
980e7aa8
JB
478# for lim-omx ffmpeg components
479cp -a libavcodec/audioconvert.h $RPM_BUILD_ROOT%{_includedir}/libavcodec
544421b2 480
b8c60172
ER
481install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
482cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
483cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
539b540f 484mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
b8c60172 485install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
9fc4ad22 486
2b2445b7
ER
487# install as ffmpeg-avconfig to avoid with possible programs looking for
488# ffmpeg-config and expecting --libs output from it which is not implemented
489# simple to do (by querying pkgconfig), but why?
b8c60172 490install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
2b2445b7 491
9fc4ad22
AM
492%clean
493rm -rf $RPM_BUILD_ROOT
494
1ef27ea1
JB
495%post libs -p /sbin/ldconfig
496%postun libs -p /sbin/ldconfig
539b540f 497
38cf6de3
ER
498%pre ffserver
499%groupadd -g 167 ffserver
500%useradd -g ffserver -u 167 ffserver
501
593d3a64
ER
502%post ffserver
503/sbin/chkconfig --add ffserver
504%service ffserver restart
505
38cf6de3 506%preun ffserver
593d3a64
ER
507if [ "$1" = 0 ]; then
508 %service ffserver stop
509 /sbin/chkconfig --del ffserver
510fi
511
38cf6de3
ER
512%postun ffserver
513if [ "$1" = 0 ]; then
514 %userremove ffserver
515 %groupremove ffserver
516fi
517
9fc4ad22
AM
518%files
519%defattr(644,root,root,755)
660918c5 520%doc CREDITS LICENSE MAINTAINERS README doc/{APIchanges,RELEASE_NOTES} %{?with_doc:doc/*.html}
2a60eebe 521%attr(755,root,root) %{_bindir}/ffmpeg
3a7b84be 522%attr(755,root,root) %{_bindir}/ffprobe
b7313442 523%attr(755,root,root) %{_bindir}/qt-faststart
da99dcf2
AM
524%dir %{_datadir}/ffmpeg
525%{_datadir}/ffmpeg/*.ffpreset
714dcf83 526%{_datadir}/ffmpeg/ffprobe.xsd
28673856
JB
527%if %{with doc}
528%{_mandir}/man1/ffmpeg.1*
22745365 529%{_mandir}/man1/ffmpeg-all.1*
28673856
JB
530%{_mandir}/man1/ffmpeg-bitstream-filters.1*
531%{_mandir}/man1/ffmpeg-codecs.1*
532%{_mandir}/man1/ffmpeg-devices.1*
533%{_mandir}/man1/ffmpeg-filters.1*
534%{_mandir}/man1/ffmpeg-formats.1*
535%{_mandir}/man1/ffmpeg-protocols.1*
536%{_mandir}/man1/ffmpeg-resampler.1*
537%{_mandir}/man1/ffmpeg-scaler.1*
538%{_mandir}/man1/ffmpeg-utils.1*
539%{_mandir}/man1/ffprobe.1*
22745365 540%{_mandir}/man1/ffprobe-all.1*
28673856 541%endif
54ec280e
PG
542
543%files libs
544%defattr(644,root,root,755)
f50f7d7c 545%attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
22745365 546%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.55
d0a0ec26 547%attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
22745365 548%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.55
314ef0df 549%attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
1c1d1368 550%attr(755,root,root) %ghost %{_libdir}/libavfilter.so.3
f50f7d7c 551%attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
22745365 552%attr(755,root,root) %ghost %{_libdir}/libavformat.so.55
5663f846 553%attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
28673856 554%attr(755,root,root) %ghost %{_libdir}/libavresample.so.1
f50f7d7c 555%attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
28673856 556%attr(755,root,root) %ghost %{_libdir}/libavutil.so.52
d7493de8 557%attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
714dcf83 558%attr(755,root,root) %ghost %{_libdir}/libpostproc.so.52
660918c5
AM
559%attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
560%attr(755,root,root) %ghost %{_libdir}/libswresample.so.0
ee032235 561%attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
cbdd2688 562%attr(755,root,root) %ghost %{_libdir}/libswscale.so.2
314ef0df 563
539b540f
JB
564%files devel
565%defattr(644,root,root,755)
54ec280e 566%doc doc/optimization.txt
1ef27ea1 567%attr(755,root,root) %{_bindir}/ffmpeg-avconfig
539b540f 568%attr(755,root,root) %{_libdir}/libavcodec.so
d0a0ec26 569%attr(755,root,root) %{_libdir}/libavdevice.so
314ef0df 570%attr(755,root,root) %{_libdir}/libavfilter.so
539b540f 571%attr(755,root,root) %{_libdir}/libavformat.so
5663f846 572%attr(755,root,root) %{_libdir}/libavresample.so
d7493de8 573%attr(755,root,root) %{_libdir}/libavutil.so
d2af4612 574%attr(755,root,root) %{_libdir}/libpostproc.so
660918c5 575%attr(755,root,root) %{_libdir}/libswresample.so
ee032235 576%attr(755,root,root) %{_libdir}/libswscale.so
539b540f 577%{_includedir}/ffmpeg
6382c99d
AM
578%{_includedir}/libavcodec
579%{_includedir}/libavdevice
314ef0df 580%{_includedir}/libavfilter
6382c99d 581%{_includedir}/libavformat
5663f846 582%{_includedir}/libavresample
6382c99d
AM
583%{_includedir}/libavutil
584%{_includedir}/libpostproc
660918c5 585%{_includedir}/libswresample
6382c99d 586%{_includedir}/libswscale
1ef27ea1
JB
587%{_pkgconfigdir}/libavcodec.pc
588%{_pkgconfigdir}/libavdevice.pc
589%{_pkgconfigdir}/libavfilter.pc
590%{_pkgconfigdir}/libavformat.pc
5663f846 591%{_pkgconfigdir}/libavresample.pc
1ef27ea1
JB
592%{_pkgconfigdir}/libavutil.pc
593%{_pkgconfigdir}/libpostproc.pc
660918c5 594%{_pkgconfigdir}/libswresample.pc
1ef27ea1 595%{_pkgconfigdir}/libswscale.pc
28673856
JB
596%if %{with doc}
597%{_mandir}/man3/libavcodec.3*
598%{_mandir}/man3/libavdevice.3*
599%{_mandir}/man3/libavfilter.3*
600%{_mandir}/man3/libavformat.3*
601%{_mandir}/man3/libavutil.3*
602%{_mandir}/man3/libswresample.3*
603%{_mandir}/man3/libswscale.3*
604%endif
539b540f 605
9cf4d8a4
JB
606%files static
607%defattr(644,root,root,755)
1ef27ea1
JB
608%{_libdir}/libavcodec.a
609%{_libdir}/libavdevice.a
610%{_libdir}/libavfilter.a
611%{_libdir}/libavformat.a
5663f846 612%{_libdir}/libavresample.a
1ef27ea1
JB
613%{_libdir}/libavutil.a
614%{_libdir}/libpostproc.a
660918c5 615%{_libdir}/libswresample.a
1ef27ea1 616%{_libdir}/libswscale.a
af49d6ab
JB
617
618%files ffplay
619%defattr(644,root,root,755)
620%attr(755,root,root) %{_bindir}/ffplay
22745365
JB
621%if %{with doc}
622%{_mandir}/man1/ffplay.1*
623%{_mandir}/man1/ffplay-all.1*
624%endif
af49d6ab 625
fde29260
ER
626%files ffserver
627%defattr(644,root,root,755)
628%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
629%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
630%attr(755,root,root) %{_sbindir}/ffserver
631%attr(754,root,root) /etc/rc.d/init.d/ffserver
22745365
JB
632%if %{with doc}
633%{_mandir}/man1/ffserver.1*
634%{_mandir}/man1/ffserver-all.1*
635%endif
38cf6de3
ER
636%dir %attr(770,root,ffserver) /var/cache/ffserver
637%dir %attr(770,root,ffserver) /var/log/ffserver
This page took 0.208106 seconds and 4 git commands to generate.