2 # How to deal with ffmpeg/opencv/chromaprint checken-egg problem:
3 # 1. make-request -r --with bootstrap ffmpeg.spec
4 # 2 bump release of opencv.spec and chromaprint.spec
5 # 3. make-request -r opencv.spec chromaprint.spec
6 # 4. bump release of ffmpeg.spec
7 # 5. make-request -r ffmpeg.spec
10 %bcond_with bootstrap # disable features to able to build without installed ffmpeg
11 %bcond_with nonfree # non free options of package (currently: decklib, fdk_aac, openssl)
12 %bcond_without bs2b # BS2B audio filter support
13 %bcond_without caca # textual display using libcaca
14 %bcond_without chromaprint # audio fingerprinting with chromaprint
15 %bcond_with cuda # NVIDIA CUDA code [BR: cuda.h]
16 %bcond_with cuvid # NVIDIA CUVID support
17 %bcond_with decklink # Blackmagic DeskLink output support (requires nonfree)
18 %bcond_with fdk_aac # AAC de/encoding via libfdk_aac (requires nonfree)
19 %bcond_without flite # flite voice synthesis support
20 %bcond_without frei0r # frei0r video filtering
21 %bcond_without fribidi # fribidi support
22 %bcond_without gme # Game Music Emu support
23 %bcond_without ilbc # iLBC de/encoding via WebRTC libilbc
24 %bcond_without kvazaar # Kvazaar HEVC encoder support
25 %bcond_without ladspa # LADSPA audio filtering
26 %bcond_with mfx # MFX hardware acceleration support
27 %bcond_with npp # NVIDIA Performance Primitives-based code (requires nonfree) [BR: libnppc+libnppi, npp.h]
28 %bcond_with nvenc # NVIDIA NVENC support
29 %bcond_without omx # OpenMAX IL support
30 %bcond_without openal # OpenAL 1.1 capture support
31 %bcond_without opencl # OpenCL 1.2 code
32 %bcond_without opencv # OpenCV video filtering
33 %bcond_without opengl # OpenGL rendering support
34 %bcond_with openh264 # OpenH264 H.264 encoder
35 %bcond_without openmpt # OpenMPT module decoder
36 %bcond_without pulseaudio # PulseAudio input support
37 %bcond_without rubberband # rubberband filter
38 %bcond_without shine # shine fixed-point MP3 encoder
39 %bcond_without snappy # Snappy compression support (needed for hap encoding)
40 %bcond_without ssh # SFTP protocol support via libssh
41 %bcond_with smb # SMB support via libsmbclient
42 %bcond_without soxr # SoX Resampler support
43 %bcond_with tesseract # OCR filter based on Tesseract
44 %bcond_without x264 # H.264 x264 encoder
45 %bcond_without x265 # H.265/HEVC x265 encoder
46 %bcond_without va # VAAPI (Video Acceleration API)
47 %bcond_without vidstab # vid.stab video stabilization support
48 %bcond_without vpx # VP8, a high-quality video codec
49 %bcond_without wavpack # wavpack encoding support
50 %bcond_without webp # WebP encoding support
51 %bcond_without zimg # zscale filter based on z.lib
52 %bcond_without zmq # 0MQ message passing
53 %bcond_without zvbi # teletext via libzvbi
54 %bcond_without doc # don't build docs
55 %bcond_with tests # "make check" (some tests fail as of 2.5)
59 %undefine with_chromaprint
62 %ifnarch %{ix86} %{x8664} %{arm}
68 Summary: FFmpeg - a very fast video and audio converter
69 Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
73 # LGPL or GPL, chosen at configure time (GPL version is more featured)
74 # (postprocessing, some filters, x264, x265, xavs, xvid, xcbgrab)
75 # using v3 allows Apache-licensed libs (opencore-amr, libvo-*enc)
76 License: GPL v3+ with LGPL v3+ parts
77 Group: Applications/Multimedia
78 Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.xz
79 # Source0-md5: c64ba7247bb91e516f6a5789348fd5b5
80 Source1: ffserver.init
81 Source2: ffserver.sysconfig
82 Source3: ffserver.conf
83 Patch0: %{name}-omx-libnames.patch
84 URL: http://www.ffmpeg.org/
85 %{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.6.1}
86 %{?with_openal:BuildRequires: OpenAL-devel >= 1.1}
87 %{?with_opencl:BuildRequires: OpenCL-devel >= 1.2}
88 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
89 # libomxil-bellagio-devel or limoi-core-devel (just headers, library is dlopened at runtime)
90 %{?with_omx:BuildRequires: OpenMAX-IL-devel}
91 BuildRequires: SDL2-devel >= 2.0.1
92 BuildRequires: alsa-lib-devel
93 BuildRequires: bzip2-devel
94 BuildRequires: celt-devel >= 0.11.0
95 %{?with_fdk_aac:BuildRequires: fdk-aac-devel}
96 %{?with_flite:BuildRequires: flite-devel >= 1.4}
97 BuildRequires: fontconfig-devel
98 BuildRequires: freetype-devel
99 %{?with_frei0r:BuildRequires: frei0r-devel}
100 %{?with_fribidi:BuildRequires: fribidi-devel}
101 %{?with_gme:BuildRequires: game-music-emu-devel}
103 # require version with altivec support fixed
104 BuildRequires: gcc >= 5:3.3.2-3
106 BuildRequires: gmp-devel
107 BuildRequires: gnutls-devel
108 BuildRequires: jack-audio-connection-kit-devel
109 %{?with_kvazaar:BuildRequires: kvazaar-devel >= 0.8.1}
110 %{?with_ladspa:BuildRequires: ladspa-devel}
111 BuildRequires: lame-libs-devel >= 3.98.3
112 BuildRequires: libass-devel
113 BuildRequires: libavc1394-devel
114 %{?with_bs2b:BuildRequires: libbs2b-devel}
115 BuildRequires: libbluray-devel
116 %{?with_caca:BuildRequires: libcaca-devel}
117 BuildRequires: libcdio-paranoia-devel >= 0.90-2
118 %{?with_chromaprint:BuildRequires: libchromaprint-devel}
119 BuildRequires: libdc1394-devel >= 2
120 BuildRequires: libgsm-devel
121 BuildRequires: libiec61883-devel
122 BuildRequires: libmodplug-devel
123 %{?with_openmpt:BuildRequires: libopenmpt-devel >= 0.2.6557}
124 BuildRequires: libraw1394-devel >= 2
125 BuildRequires: librtmp-devel
126 %{?with_ssh:BuildRequires: libssh-devel}
127 %{?with_smb:BuildRequires: libsmbclient-devel}
128 BuildRequires: libtheora-devel >= 1.0-0.beta3
129 BuildRequires: libtool >= 2:1.4d-3
130 BuildRequires: libv4l-devel
132 BuildRequires: libva-devel >= 1.0.3
133 BuildRequires: libva-drm-devel >= 1.0.3
134 BuildRequires: libva-x11-devel >= 1.0.3
136 BuildRequires: libvdpau-devel >= 0.2
137 BuildRequires: libvorbis-devel
138 %{?with_vpx:BuildRequires: libvpx-devel >= 1.3.0}
139 %{?with_webp:BuildRequires: libwebp-devel >= 0.4.0}
141 %{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245}
143 %{?with_x265:BuildRequires: libx265-devel >= 1.3-0.20150610.1}
144 # libxcb xcb-shm xcb-xfixes xcb-shape
145 BuildRequires: libxcb-devel >= 1.4
146 %{?with_mfx:BuildRequires: mfx_dispatch-devel}
153 #%{?with_nvenc:BuildRequires: NVIDIA-NVENC-API} compat/nvenc/nvEncodeAPI.h
154 BuildRequires: opencore-amr-devel
155 %{?with_opencv:BuildRequires: opencv-devel}
156 %{?with_openh264:BuildRequires: openh264-devel >= 1.3}
157 BuildRequires: openjpeg2-devel >= 2.1
158 BuildRequires: opus-devel
159 BuildRequires: perl-Encode
160 BuildRequires: perl-tools-pod
161 BuildRequires: pkgconfig
162 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
163 BuildRequires: rpmbuild(macros) >= 1.470
164 %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.1}
165 %{?with_shine:BuildRequires: shine-devel >= 3.0.0}
166 %{?with_snappy:BuildRequires: snappy-devel}
167 %{?with_soxr:BuildRequires: soxr-devel}
168 BuildRequires: speex-devel >= 1:1.2-rc1
169 %{?with_tesseract:BuildRequires: tesseract-devel}
170 %{?with_doc:BuildRequires: tetex}
171 %{?with_doc:BuildRequires: texi2html}
172 %{?with_doc:BuildRequires: texinfo}
173 BuildRequires: twolame-devel
174 %{?with_vidstab:BuildRequires: vid.stab-devel >= 0.98}
175 BuildRequires: vo-amrwbenc-devel
176 %{?with_wavpack:BuildRequires: wavpack-devel}
177 %{?with_ilbc:BuildRequires: webrtc-libilbc-devel}
178 BuildRequires: xavs-devel
179 BuildRequires: xorg-lib-libX11-devel
180 BuildRequires: xorg-lib-libXext-devel
181 BuildRequires: xorg-lib-libXfixes-devel
182 BuildRequires: xvid-devel >= 1:1.1.0
183 BuildRequires: xz-devel
185 %{?with_zmq:BuildRequires: zeromq-devel}
186 %{?with_zimg:BuildRequires: zimg-devel >= 2.3.0}
187 BuildRequires: zlib-devel
188 %{?with_zvbi:BuildRequires: zvbi-devel}
189 %{?with_autoreqdep:BuildConflicts: libpostproc}
190 # overflows maximum hash table size
191 BuildConflicts: pdksh < 5.2.14-57
192 Requires: %{name}-libs = %{version}-%{release}
193 %{?with_ilbc:Requires: webrtc-libilbc}
194 Requires: xvid >= 1:1.1.0
195 Obsoletes: libpostproc
196 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
198 %define specflags -fno-strict-aliasing
200 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
201 %define specflags_ia32 -fomit-frame-pointer
202 # -mmmx is needed to enable <mmintrin.h> code.
203 %define specflags_i586 -mmmx
204 %define specflags_i686 -mmmx
205 %define specflags_ppc -fPIC
208 FFmpeg is a complete solution to record, convert and stream audio and
209 video. It is a command line tool to convert one video file format to
210 another. It also supports grabbing and encoding in real time from a TV
213 %description -l pl.UTF-8
214 FFmpeg to kompletne rozwiązanie nagrywania, konwersji i transmisji
215 strumieni dźwięku i obrazu. Jest to działające z linii poleceń
216 narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje
217 także przechwytywanie i kodowanie w czasie rzeczywistym z karty
221 Summary: ffmpeg libraries
222 Summary(pl.UTF-8): Biblioteki ffmpeg
224 Requires: SDL2 >= 2.0.1
225 %if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20"
226 # uses gnutls_certificate_set_x509_system_trust if >= 3.0.20
227 Requires: gnutls-libs >= 3.0.20
229 %{?with_openmpt:Requires: libopenmpt >= 0.2.6557}
230 %{?with_vpx:Requires: libvpx >= 1.3.0}
231 %{?with_rubberband:Requires: rubberband-libs >= 1.8.1}
232 %{?with_zimg:Requires: zimg >= 2.3.0}
235 This package contains the ffmpeg shared libraries:
236 - the codec library (libavcodec). It supports most existing encoding
237 formats (MPEG, DivX, MPEG4, AC3, DV...),
238 - demuxer library (libavformat). It supports most existing file
239 formats (AVI, MPEG, OGG, Matroska, ASF...),
240 - video postprocessing library (libpostproc).
242 %description libs -l pl.UTF-8
243 Ten pakiet zawiera biblioteki współdzielone ffmpeg:
244 - bibliotekę kodeków (libavcodec); obsługuje większość istniejących
245 formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...),
246 - bibliotekę demuksera (libavformat); obsługuje większość istniejących
247 formatów plików (AVI, MPEG, OGG, Matroska, ASF...),
248 - bibliotekę postprocessingu (libpostproc).
251 Summary: ffmpeg header files
252 Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
253 Group: Development/Libraries
254 Requires: %{name}-libs = %{version}-%{release}
255 # Libs.private from *.pc (unreasonably they are all the same)
256 %{?with_opencl:Requires: OpenCL-devel >= 1.2}
257 %{?with_opengl:Requires: OpenGL-devel}
258 Requires: SDL2-devel >= 2.0.1
259 Requires: alsa-lib-devel
260 Requires: bzip2-devel
261 Requires: celt-devel >= 0.11.0
262 %{?with_fdk_aac:Requires: fdk-aac-devel}
263 %{?with_flite:Requires: flite-devel >= 1.4}
264 Requires: fontconfig-devel
265 Requires: freetype-devel
266 %{?with_fribidi:Requires: fribidi-devel}
267 %{?with_gme:Requires: game-music-emu-devel}
268 Requires: jack-audio-connection-kit-devel
269 %{?with_kvazaar:Requires: kvazaar-devel >= 0.8.1}
270 Requires: lame-libs-devel >= 3.98.3
271 Requires: libass-devel
272 Requires: libavc1394-devel
273 Requires: libbluray-devel
274 %{?with_bs2b:Requires: libbs2b-devel}
275 %{?with_caca:Requires: libcaca-devel}
276 Requires: libcdio-paranoia-devel >= 0.90-2
277 %{?with_chromaprint:Requires: libchromaprint-devel}
278 Requires: libdc1394-devel >= 2
279 Requires: libgsm-devel
280 Requires: libiec61883-devel
281 Requires: libmodplug-devel
282 %{?with_openmpt:Requires: libopenmpt-devel >= 0.2.6557}
283 Requires: libraw1394-devel >= 2
284 Requires: librtmp-devel
285 %{?with_smb:Requires: libsmbclient-devel}
286 Requires: libtheora-devel >= 1.0-0.beta3
287 %{?with_va:Requires: libva-devel >= 1.0.3}
288 Requires: libvorbis-devel
289 %{?with_vpx:Requires: libvpx-devel >= 1.3.0}
290 %{?with_webp:Requires: libwebp-devel >= 0.4.0}
291 %{?with_x264:Requires: libx264-devel >= 0.1.3-1.20110625_2245}
292 %{?with_x265:Requires: libx265-devel >= 1.3-0.20150610.1}
293 %{?with_mfx:Requires: mfx_dispatch-devel}
294 Requires: opencore-amr-devel
295 %{?with_opencv:Requires: opencv-devel}
296 %{?with_openh264:Requires: openh264-devel >= 1.3}
297 Requires: openjpeg2-devel >= 2.1
298 %{?with_rubberband:Requires: rubberband-devel >= 1.8.1}
299 %{?with_shine:Requires: shine-devel >= 3.0.0}
300 %{?with_snappy:Requires: snappy-devel}
301 %{?with_soxr:Requires: soxr-devel}
302 Requires: speex-devel >= 1:1.2-rc1
303 %{?with_tesseract:Requires: tesseract-devel}
304 Requires: twolame-devel
305 %{?with_vidstab:Requires: vid.stab-devel >= 0.98}
306 Requires: vo-amrwbenc-devel
307 %{?with_wavpack:Requires: wavpack-devel}
308 %{?with_ilbc:Requires: webrtc-libilbc-devel}
310 Requires: xorg-lib-libXext-devel
311 Requires: xorg-lib-libXfixes-devel
312 Requires: xvid-devel >= 1:1.1.0
313 %{?with_zmq:Requires: zeromq-devel}
314 %{?with_zimg:Requires: zimg-devel >= 2.3.0}
316 Obsoletes: libpostproc-devel
321 %description devel -l pl.UTF-8
322 Pliki nagłówkowe ffmpeg.
325 Summary: ffmpeg static libraries
326 Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
327 Group: Development/Libraries
328 Requires: %{name}-devel = %{version}-%{release}
331 ffmpeg static libraries (libavcodec and libavformat).
333 %description static -l pl.UTF-8
334 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
337 Summary: FFplay - SDL-based media player
338 Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
339 Group: Applications/Multimedia
340 Requires: %{name}-libs = %{version}-%{release}
343 FFplay is a very simple and portable media player using the FFmpeg
344 libraries and the SDL library. It is mostly used as a test bench for
345 the various APIs of FFmpeg.
347 %description ffplay -l pl.UTF-8
348 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
349 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
350 testowania różnych API FFmpeg.
353 Summary: FFserver video server
354 Summary(pl.UTF-8): FFserver - serwer strumieni obrazu
356 Requires(post,preun): /sbin/chkconfig
357 Requires: %{name}-libs = %{version}-%{release}
358 Requires: rc-scripts >= 0.4.0.10
360 %description ffserver
361 FFserver is a streaming server for both audio and video. It supports
362 several live feeds, streaming from files and time shifting on live
363 feeds (you can seek to positions in the past on each live feed,
364 provided you specify a big enough feed storage in ffserver.conf).
366 %description ffserver -l pl.UTF-8
367 FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
368 źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
369 czasie dla źródeł na żywo (można przeskakiwać na położenia w
370 przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
371 dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
374 Summary: FFmpeg documentation in HTML format
375 Summary(pl.UTF-8): Dokumentacja pakietu FFmpeg w formacie HTML
377 %if "%{_rpmversion}" >= "5"
382 FFmpeg documentation in HTML format.
384 %description doc -l pl.UTF-8
385 Dokumentacja pakietu FFmpeg w formacie HTML.
391 # package the grep result for mplayer, the result formatted as ./mplayer/configure
392 cat <<EOF > ffmpeg-avconfig
394 libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
395 libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
396 libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
397 libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
398 libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
399 libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
400 libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
401 libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
402 libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
404 cat <<'EOF' >> ffmpeg-avconfig
408 echo $libavdecoders_all
411 echo $libavencoders_all
414 echo $libavparsers_all
420 echo $libavdemuxers_all
423 echo $libavmuxers_all
426 echo $libavprotocols_all
429 echo $libavhwaccels_all
432 echo $libavfilters_all
456 # - it's not autoconf configure
457 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
459 --arch=%{_target_base_arch} \
460 --prefix=%{_prefix} \
461 --libdir=%{_libdir} \
462 --shlibdir=%{_libdir} \
463 --mandir=%{_mandir} \
464 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}" \
465 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
468 --disable-optimizations \
469 --disable-stripping \
470 %{!?with_doc:--disable-doc} \
472 --enable-avresample \
473 %{?with_chromaprint:--enable-chromaprint} \
474 %{!?with_cuda:--disable-cuda} \
475 %{!?with_cuvid:--disable-cuvid} \
476 %{?with_decklink:--enable-decklink} \
480 %{?with_frei0r:--enable-frei0r} \
481 %{?with_ladspa:--enable-ladspa} \
484 %{?with_bs2b:--enable-libbs2b} \
485 %{?with_caca:--enable-libcaca} \
489 %{?with_flite:--enable-libflite} \
490 --enable-libfontconfig \
491 --enable-libfreetype \
492 %{?with_fribidi:--enable-libfribidi} \
493 %{?with_gme:--enable-libgme} \
495 --enable-libiec61883 \
496 %{?with_ilbc:--enable-libilbc} \
497 %{?with_kvazaar:--enable-libkvazaar} \
498 %{?with_mfx:--enable-libmfx} \
499 --enable-libmodplug \
500 --enable-libmp3lame \
501 --enable-libopencore-amrnb \
502 --enable-libopencore-amrwb \
503 %{?with_opencv:--enable-libopencv} \
504 %{?with_openh264:--enable-libopenh264} \
505 --enable-libopenjpeg \
506 %{?with_openmpt:--enable-libopenmpt} \
508 %{?with_pulseaudio:--enable-libpulse} \
510 %{?with_rubberband:--enable-librubberband} \
511 %{?with_shine:--enable-libshine} \
512 %{?with_smb:--enable-libsmbclient} \
513 %{?with_snappy:--enable-libsnappy} \
514 %{?with_soxr:--enable-libsoxr} \
516 %{?with_ssh:--enable-libssh} \
517 %{?with_tesseract:--enable-libtesseract} \
519 --enable-libtwolame \
521 %{?with_vidstab:--enable-libvidstab} \
522 --enable-libvo-amrwbenc \
524 %{?with_vpx:--enable-libvpx} \
525 %{?with_wavpack:--enable-libwavpack} \
526 %{?with_webp:--enable-libwebp} \
527 %{?with_x264:--enable-libx264} \
528 %{?with_x265:--enable-libx265} \
532 %{?with_zimg:--enable-libzimg} \
533 %{?with_zmq:--enable-libzmq} \
534 %{?with_zvbi:--enable-libzvbi} \
535 %{!?with_nvenc:--disable-nvenc} \
536 %{?with_omx:--enable-omx} \
537 %{?with_openal:--enable-openal} \
538 %{?with_opencl:--enable-opencl} \
539 %{?with_opengl:--enable-opengl} \
544 %{!?with_va:--disable-vaapi} \
545 %ifnarch %{ix86} %{x8664}
556 %{?with_fdk_aac:--enable-libfdk-aac} \
557 %{?with_npp:--enable-libnpp} \
559 --enable-runtime-cpudetect
564 # CC_O to add -c to commandline. makefile should be patched
565 %{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
567 %{?with_tests:%{__make} check V=1}
570 rm -rf $RPM_BUILD_ROOT
571 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
572 $RPM_BUILD_ROOT%{_includedir}/ffmpeg \
573 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
575 %{__make} install install-headers \
576 DESTDIR=$RPM_BUILD_ROOT \
579 # install nonstandard, non-public headers manually
580 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
581 for a in libavutil/*/{asm,bswap}.h; do
582 install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
584 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
585 # for lim-omx ffmpeg components
586 cp -a libavcodec/audioconvert.h $RPM_BUILD_ROOT%{_includedir}/libavcodec
588 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
589 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
590 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
591 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
592 install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
594 # install as ffmpeg-avconfig to avoid with possible programs looking for
595 # ffmpeg-config and expecting --libs output from it which is not implemented
596 # simple to do (by querying pkgconfig), but why?
597 install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
599 # packaged as %doc in -doc
601 %{__rm} $RPM_BUILD_ROOT%{_docdir}/ffmpeg/*.html
604 install -d $RPM_BUILD_ROOT%{_examplesdir}
605 %{__mv} $RPM_BUILD_ROOT%{_datadir}/ffmpeg/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
608 rm -rf $RPM_BUILD_ROOT
610 %post libs -p /sbin/ldconfig
611 %postun libs -p /sbin/ldconfig
614 %groupadd -g 167 ffserver
615 %useradd -g ffserver -u 167 ffserver
618 /sbin/chkconfig --add ffserver
619 %service ffserver restart
622 if [ "$1" = 0 ]; then
623 %service ffserver stop
624 /sbin/chkconfig --del ffserver
628 if [ "$1" = 0 ]; then
630 %groupremove ffserver
634 %defattr(644,root,root,755)
635 %doc CREDITS LICENSE.md MAINTAINERS README.md RELEASE_NOTES doc/APIchanges
636 %attr(755,root,root) %{_bindir}/ffmpeg
637 %attr(755,root,root) %{_bindir}/ffprobe
638 %attr(755,root,root) %{_bindir}/qt-faststart
639 %dir %{_datadir}/ffmpeg
640 %{_datadir}/ffmpeg/*.ffpreset
641 %{_datadir}/ffmpeg/ffprobe.xsd
643 %{_mandir}/man1/ffmpeg.1*
644 %{_mandir}/man1/ffmpeg-all.1*
645 %{_mandir}/man1/ffmpeg-bitstream-filters.1*
646 %{_mandir}/man1/ffmpeg-codecs.1*
647 %{_mandir}/man1/ffmpeg-devices.1*
648 %{_mandir}/man1/ffmpeg-filters.1*
649 %{_mandir}/man1/ffmpeg-formats.1*
650 %{_mandir}/man1/ffmpeg-protocols.1*
651 %{_mandir}/man1/ffmpeg-resampler.1*
652 %{_mandir}/man1/ffmpeg-scaler.1*
653 %{_mandir}/man1/ffmpeg-utils.1*
654 %{_mandir}/man1/ffprobe.1*
655 %{_mandir}/man1/ffprobe-all.1*
659 %defattr(644,root,root,755)
660 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
661 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.57
662 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
663 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.57
664 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
665 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.6
666 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
667 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.57
668 %attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
669 %attr(755,root,root) %ghost %{_libdir}/libavresample.so.3
670 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
671 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.55
672 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
673 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.54
674 %attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
675 %attr(755,root,root) %ghost %{_libdir}/libswresample.so.2
676 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
677 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.4
680 %defattr(644,root,root,755)
681 %doc doc/optimization.txt
682 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
683 %attr(755,root,root) %{_libdir}/libavcodec.so
684 %attr(755,root,root) %{_libdir}/libavdevice.so
685 %attr(755,root,root) %{_libdir}/libavfilter.so
686 %attr(755,root,root) %{_libdir}/libavformat.so
687 %attr(755,root,root) %{_libdir}/libavresample.so
688 %attr(755,root,root) %{_libdir}/libavutil.so
689 %attr(755,root,root) %{_libdir}/libpostproc.so
690 %attr(755,root,root) %{_libdir}/libswresample.so
691 %attr(755,root,root) %{_libdir}/libswscale.so
692 %{_includedir}/ffmpeg
693 %{_includedir}/libavcodec
694 %{_includedir}/libavdevice
695 %{_includedir}/libavfilter
696 %{_includedir}/libavformat
697 %{_includedir}/libavresample
698 %{_includedir}/libavutil
699 %{_includedir}/libpostproc
700 %{_includedir}/libswresample
701 %{_includedir}/libswscale
702 %{_pkgconfigdir}/libavcodec.pc
703 %{_pkgconfigdir}/libavdevice.pc
704 %{_pkgconfigdir}/libavfilter.pc
705 %{_pkgconfigdir}/libavformat.pc
706 %{_pkgconfigdir}/libavresample.pc
707 %{_pkgconfigdir}/libavutil.pc
708 %{_pkgconfigdir}/libpostproc.pc
709 %{_pkgconfigdir}/libswresample.pc
710 %{_pkgconfigdir}/libswscale.pc
712 %{_mandir}/man3/libavcodec.3*
713 %{_mandir}/man3/libavdevice.3*
714 %{_mandir}/man3/libavfilter.3*
715 %{_mandir}/man3/libavformat.3*
716 %{_mandir}/man3/libavutil.3*
717 %{_mandir}/man3/libswresample.3*
718 %{_mandir}/man3/libswscale.3*
720 %{_examplesdir}/%{name}-%{version}
723 %defattr(644,root,root,755)
724 %{_libdir}/libavcodec.a
725 %{_libdir}/libavdevice.a
726 %{_libdir}/libavfilter.a
727 %{_libdir}/libavformat.a
728 %{_libdir}/libavresample.a
729 %{_libdir}/libavutil.a
730 %{_libdir}/libpostproc.a
731 %{_libdir}/libswresample.a
732 %{_libdir}/libswscale.a
735 %defattr(644,root,root,755)
736 %attr(755,root,root) %{_bindir}/ffplay
738 %{_mandir}/man1/ffplay.1*
739 %{_mandir}/man1/ffplay-all.1*
743 %defattr(644,root,root,755)
744 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
745 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
746 %attr(755,root,root) %{_sbindir}/ffserver
747 %attr(754,root,root) /etc/rc.d/init.d/ffserver
749 %{_mandir}/man1/ffserver.1*
750 %{_mandir}/man1/ffserver-all.1*
752 %dir %attr(770,root,ffserver) /var/cache/ffserver
753 %dir %attr(770,root,ffserver) /var/log/ffserver
757 %defattr(644,root,root,755)