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