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