]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - avisynth+ >= 3.7.3 https://github.com/AviSynth/AviSynthPlus | |
3 | # - libopenvino | |
4 | # - libtensorflow [-ltensorflow tensorflow/c/c_api.h] | |
5 | # - AMF >= 1.4.29.0 (available at https://github.com/GPUOpen-LibrariesAndSDKs/AMF, where is original source?) | |
6 | # | |
7 | # How to deal with ffmpeg/opencv/chromaprint checken-egg problem: | |
8 | # 1. make-request -r --with bootstrap ffmpeg.spec | |
9 | # 2 bump release of opencv.spec and chromaprint.spec | |
10 | # 3. make-request -r opencv.spec chromaprint.spec | |
11 | # 4. bump release of ffmpeg.spec | |
12 | # 5. make-request -r ffmpeg.spec | |
13 | # | |
14 | # Conditional build: | |
15 | %bcond_with bootstrap # disable features to able to build without installed ffmpeg | |
16 | %bcond_with nonfree # unblock non free options of package (currently: cuda_nvcc, decklib, fdk_aac, npp, openssl, libressl/libtls) | |
17 | %bcond_without amr # AMR-NB/WB de/encoding via libopencore-amrnb/wb | |
18 | %bcond_without aom # AV1 viden de/encoding via libaom | |
19 | %bcond_without aribb24 # ARIB text and caption decoding via libaribb24 | |
20 | %bcond_without avisynth # AviSynth scripts support | |
21 | %bcond_without avs # AVS encoding via xavs | |
22 | %bcond_without avs2 # AVS2 de/encoding via libdavs2/libxavs2 | |
23 | %bcond_without bs2b # BS2B audio filter support | |
24 | %bcond_without caca # textual display using libcaca | |
25 | %bcond_without codec2 # codec2 support using libcodec2 | |
26 | %bcond_without chromaprint # audio fingerprinting with chromaprint | |
27 | %bcond_with cudasdk # NVIDIA CUDA code using nvcc from CUDA SDK [BR: cuda.h, non-free] | |
28 | %bcond_with dav1d # AV1 decoding via libdav1d | |
29 | %bcond_without dc1394 # IIDC-1394 grabbing using libdc1394 | |
30 | %bcond_with decklink # Blackmagic DeckLink I/O support (requires nonfree) | |
31 | %bcond_with fdk_aac # AAC de/encoding via libfdk_aac (requires nonfree) | |
32 | %bcond_without ffnvcodec # NVIDIA codecs support using ffnvcodec headers (covered: cuda cuvid nvdec nvenc) | |
33 | %bcond_without flite # flite voice synthesis support | |
34 | %bcond_without frei0r # frei0r video filtering | |
35 | %bcond_without fribidi # fribidi support in drawtext filter | |
36 | %bcond_with glslang # GLSL->SPIRV compilation via libglslang | |
37 | %bcond_without gme # Game Music Emu support | |
38 | %bcond_without gsm # GSM de/encoding via libgsm | |
39 | %bcond_without iec61883 # ec61883 via libiec61883 | |
40 | %bcond_without ilbc # iLBC de/encoding via WebRTC libilbc | |
41 | %bcond_without kvazaar # Kvazaar HEVC encoder support | |
42 | %bcond_without ladspa # LADSPA audio filtering | |
43 | %bcond_without lcms # ICC profile support via lcms2 | |
44 | %bcond_with lensfun # lensfun lens correction | |
45 | %bcond_with libaribcaption # ARIB text and caption decoding via libaribcaption | |
46 | %bcond_with libdrm # Linux Direct Rendering Manager code | |
47 | %bcond_without libjxl # JPEG XL de/encoding via libjxl | |
48 | %bcond_with libklvanc # Kernel Labs VANC processing (in decklink driver) | |
49 | %bcond_without libmysofa # sofalizer filter | |
50 | %bcond_with libplacebo # libplacebo filters | |
51 | %bcond_without librist # RIST support via librist | |
52 | %bcond_with librsvg # SVG rasterization via librsvg | |
53 | %bcond_with libxml2 # XML parsing using libxml2 | |
54 | %bcond_without lv2 # LV2 audio filtering | |
55 | %bcond_with mfx # MFX hardware acceleration support | |
56 | %bcond_without modplug # ModPlug via libmodplug | |
57 | %bcond_with npp # NVIDIA Performance Primitives-based code (requires nonfree) [BR: libnppc+libnppi, npp.h] | |
58 | %bcond_without omx # OpenMAX IL support | |
59 | %bcond_without openal # OpenAL 1.1 capture support | |
60 | %bcond_without opencl # OpenCL 1.2 code | |
61 | %bcond_with opencv # OpenCV video filtering | |
62 | %bcond_without opengl # OpenGL rendering support | |
63 | %bcond_with openh264 # OpenH264 H.264 encoder | |
64 | %bcond_without openmpt # OpenMPT module decoder | |
65 | %bcond_with pocketsphinx # asr filter using PocketSphinx | |
66 | %bcond_without pulseaudio # PulseAudio input support | |
67 | %bcond_without rabbitmq # RabbitMQ support | |
68 | %bcond_with rav1e # AV1 encoding using rav1e | |
69 | %bcond_with rkmpp # Rockchip Media Process Platform code [implies libdrm] | |
70 | %bcond_without rubberband # rubberband filter | |
71 | %bcond_without shaderc # GLSL->SPIRV compilation via libshaderc | |
72 | %bcond_without shine # shine fixed-point MP3 encoder | |
73 | %bcond_with smb # SMB support via libsmbclient | |
74 | %bcond_without snappy # Snappy compression support (needed for hap encoding) | |
75 | %bcond_without soxr # SoX Resampler support | |
76 | %bcond_without srt # Haivision SRT protocol support | |
77 | %bcond_without ssh # SFTP protocol support via libssh | |
78 | %bcond_with svtav1 # AV1 encoding via SVT-AV1 | |
79 | %bcond_with tesseract # OCR filter based on Tesseract | |
80 | %bcond_without theora # Theora encoding via libtheora | |
81 | %bcond_with uavs3d # AVS3 decoding via libuavs3d (TODO: enable when 1.1.41 released) | |
82 | %bcond_with v4l2_request # V4L2 request API for stateless hw decoding | |
83 | %bcond_without va # VAAPI (Video Acceleration API) | |
84 | %bcond_without vapoursynth # VapourSynth demuxer | |
85 | %bcond_without vidstab # vid.stab video stabilization support | |
86 | %bcond_without vmaf # VMAF filter support | |
87 | %bcond_without voamrwbenc # MR-WB encoding via libvo-amrwbenc | |
88 | %bcond_with vpl # libvpl instead of MFX | |
89 | %bcond_without vpx # VP8, a high-quality video codec | |
90 | %bcond_without vulkan # Vulkan code | |
91 | %bcond_without webp # WebP encoding support | |
92 | %bcond_without x264 # H.264 x264 encoder | |
93 | %bcond_without x265 # H.265/HEVC x265 encoder | |
94 | %bcond_without xvid # vid encoding via xvidcore | |
95 | %bcond_without zimg # zscale filter based on z.lib | |
96 | %bcond_without zmq # 0MQ message passing | |
97 | %bcond_without zvbi # teletext via libzvbi | |
98 | %bcond_without doc # HTML documentation | |
99 | %bcond_without static_libs # static libraries | |
100 | %bcond_with tests # "make check" (some tests fail as of 2.5) | |
101 | ||
102 | %if %{with bootstrap} | |
103 | %undefine with_opencv | |
104 | %undefine with_chromaprint | |
105 | %endif | |
106 | %if %{with rkmpp} || %{with v4l2_request} | |
107 | %define with_libdrm 1 | |
108 | %endif | |
109 | %if %{with glslang} | |
110 | %undefine with_shaderc | |
111 | %endif | |
112 | %if %{with vpl} | |
113 | %undefine with_mfx | |
114 | %endif | |
115 | ||
116 | %ifnarch %{ix86} %{x8664} | |
117 | %undefine with_ffnvcodec | |
118 | %endif | |
119 | %ifnarch %{ix86} %{x8664} aarch64 | |
120 | %undefine with_rav1e | |
121 | %endif | |
122 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 | |
123 | %undefine with_x265 | |
124 | %endif | |
125 | %ifarch i386 i486 | |
126 | %undefine with_x265 | |
127 | %endif | |
128 | %ifarch i686 pentium4 athlon %{x8664} x32 | |
129 | %define with_crystalhd 1 | |
130 | %endif | |
131 | Summary: FFmpeg - a very fast video and audio converter | |
132 | Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo | |
133 | Name: ffmpeg | |
134 | # NOTE: 7.0 prepared on DEVEL-7 branch, but other software is not ready (e.g. xine-lib 1.2.13, gstreamer-libav 1.24.2) | |
135 | Version: 6.1.1 | |
136 | Release: 5 | |
137 | # LGPL or GPL, chosen at configure time (GPL version is more featured) | |
138 | # GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid | |
139 | # v3 (allows *GPLv3 or Apache-licensed libs): gmp lensfun opencore-amr vmaf vo-*enc rkmpp | |
140 | # GPLv3: smbclient | |
141 | License: GPL v3+ with LGPL v3+ parts | |
142 | Group: Applications/Multimedia | |
143 | Source0: https://ffmpeg.org/releases/%{name}-%{version}.tar.xz | |
144 | # Source0-md5: 341d719415b7f95bb59f5016f2864ac6 | |
145 | Patch0: %{name}-omx-libnames.patch | |
146 | Patch1: %{name}-atadenoise.patch | |
147 | Patch2: opencv4.patch | |
148 | Patch3: v4l2-request-hwdec.patch | |
149 | Patch4: %{name}-vulkan1.3.280.patch | |
150 | Patch5: %{name}-nvenc.patch | |
151 | Patch6: gcc14.patch | |
152 | URL: https://ffmpeg.org/ | |
153 | %{?with_avisynth:BuildRequires: AviSynthPlus-devel >= 3.7.3} | |
154 | %{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.11} | |
155 | %{?with_openal:BuildRequires: OpenAL-devel >= 1.1} | |
156 | %{?with_opencl:BuildRequires: OpenCL-devel >= 1.2} | |
157 | %{?with_opengl:BuildRequires: OpenGL-GLX-devel} | |
158 | # libomxil-bellagio-devel or limoi-core-devel (just headers, library is dlopened at runtime) | |
159 | %{?with_omx:BuildRequires: OpenMAX-IL-devel} | |
160 | BuildRequires: SDL2-devel >= 2.0.1 | |
161 | BuildRequires: SDL2-devel < 3.0.0 | |
162 | %{?with_vulkan:BuildRequires: Vulkan-Loader-devel >= 1.3.277} | |
163 | BuildRequires: alsa-lib-devel | |
164 | %{?with_aom:BuildRequires: aom-devel >= 1.0.0} | |
165 | %{?with_aribb24:BuildRequires: aribb24-devel} | |
166 | BuildRequires: bzip2-devel | |
167 | BuildRequires: celt-devel >= 0.11.0 | |
168 | %{?with_codec2:BuildRequires: codec2-devel} | |
169 | %{?with_dav1d:BuildRequires: dav1d-devel >= 0.5.0} | |
170 | %{?with_avs2:BuildRequires: davs2-devel >= 1.6} | |
171 | %{?with_fdk_aac:BuildRequires: fdk-aac-devel} | |
172 | %{?with_flite:BuildRequires: flite-devel >= 1.4} | |
173 | BuildRequires: fontconfig-devel | |
174 | BuildRequires: freetype-devel | |
175 | %{?with_frei0r:BuildRequires: frei0r-devel} | |
176 | %{?with_fribidi:BuildRequires: fribidi-devel} | |
177 | %{?with_gme:BuildRequires: game-music-emu-devel} | |
178 | BuildRequires: harfbuzz-devel | |
179 | %ifarch ppc | |
180 | # require version with altivec support fixed | |
181 | BuildRequires: gcc >= 5:3.3.2-3 | |
182 | %endif | |
183 | %{?with_glslang:BuildRequires: glslang-devel >= 11} | |
184 | BuildRequires: gmp-devel | |
185 | BuildRequires: gnutls-devel | |
186 | BuildRequires: jack-audio-connection-kit-devel | |
187 | %{?with_kvazaar:BuildRequires: kvazaar-devel >= 2.0.0} | |
188 | %{?with_ladspa:BuildRequires: ladspa-devel} | |
189 | BuildRequires: lame-libs-devel >= 3.98.3 | |
190 | %{?with_lcms:BuildRequires: lcms2-devel >= 2.13} | |
191 | %{?with_lensfun:BuildRequires: lensfun-devel >= 0.3.95} | |
192 | %{?with_aribcaption:BuildRequires: libaribcaption-devel} | |
193 | BuildRequires: libass-devel >= 0.11.0 | |
194 | %ifnarch %arch_with_atomics64 | |
195 | BuildRequires: libatomic-devel | |
196 | %endif | |
197 | %{?with_iec61883:BuildRequires: libavc1394-devel} | |
198 | %{?with_bs2b:BuildRequires: libbs2b-devel} | |
199 | BuildRequires: libbluray-devel | |
200 | %{?with_caca:BuildRequires: libcaca-devel} | |
201 | BuildRequires: libcdio-paranoia-devel >= 0.90-2 | |
202 | %{?with_chromaprint:BuildRequires: libchromaprint-devel} | |
203 | %{?with_crystalhd:BuildRequires: libcrystalhd-devel} | |
204 | %{?with_dc1394:BuildRequires: libdc1394-devel >= 2} | |
205 | %{?with_libdrm:BuildRequires: libdrm-devel} | |
206 | %{?with_gsm:BuildRequires: libgsm-devel} | |
207 | %{?with_iec61883:BuildRequires: libiec61883-devel} | |
208 | %{?with_libjxl:BuildRequires: libjxl-devel >= 0.7.0} | |
209 | %{?with_libklvanc:BuildRequires: libklvanc-devel} | |
210 | %{?with_modplug:BuildRequires: libmodplug-devel} | |
211 | %{?with_libmysofa:BuildRequires: libmysofa-devel >= 0.7} | |
212 | %{?with_openmpt:BuildRequires: libopenmpt-devel >= 0.4.5} | |
213 | %{?with_libplacebo:BuildRequires: libplacebo-devel >= 4.192.0} | |
214 | %if %{with dc1394} || %{with iec61883} | |
215 | BuildRequires: libraw1394-devel >= 2 | |
216 | %endif | |
217 | %{?with_librist:BuildRequires: librist-devel >= 0.2.7} | |
218 | %{?with_librsvg:BuildRequires: librsvg-devel >= 2} | |
219 | BuildRequires: librtmp-devel | |
220 | %{?with_ssh:BuildRequires: libssh-devel >= 0.6.0} | |
221 | %{?with_smb:BuildRequires: libsmbclient-devel} | |
222 | %{?with_theora:BuildRequires: libtheora-devel >= 1.0-0.beta3} | |
223 | BuildRequires: libtool >= 2:1.4d-3 | |
224 | BuildRequires: libv4l-devel | |
225 | %if %{with va} | |
226 | BuildRequires: libva-devel >= 1.0.3 | |
227 | BuildRequires: libva-drm-devel >= 1.0.3 | |
228 | BuildRequires: libva-x11-devel >= 1.0.3 | |
229 | %endif | |
230 | BuildRequires: libvdpau-devel >= 1.3 | |
231 | BuildRequires: libvorbis-devel | |
232 | %{?with_vpl:BuildRequires: libvpl-devel >= 2.6} | |
233 | %{?with_vpx:BuildRequires: libvpx-devel >= 1.4.0} | |
234 | %{?with_webp:BuildRequires: libwebp-devel >= 0.4.0} | |
235 | # X264_BUILD >= 122 | |
236 | %{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20130827_2245} | |
237 | # X265_BUILD >= 89 | |
238 | %{?with_x265:BuildRequires: libx265-devel >= 2.0} | |
239 | # libxcb xcb-shm xcb-xfixes xcb-shape | |
240 | BuildRequires: libxcb-devel >= 1.4 | |
241 | %{?with_libxml2:BuildRequires: libxml2-devel >= 2} | |
242 | %{?with_lv2:BuildRequires: lilv-devel} | |
243 | %{?with_v4l2_request:BuildRequires: linux-libc-headers >= 7:5.11.0} | |
244 | %{?with_lv2:BuildRequires: lv2-devel} | |
245 | %{?with_mfx:BuildRequires: mfx_dispatch-devel >= 1.28} | |
246 | %ifarch %{ix86} | |
247 | %ifnarch i386 i486 | |
248 | BuildRequires: nasm | |
249 | %endif | |
250 | %endif | |
251 | %{?with_ffnvcodec:BuildRequires: nv-codec-headers >= 12.1.14.0} | |
252 | # amrnb,amrwb | |
253 | %{?with_amr:BuildRequires: opencore-amr-devel} | |
254 | %{?with_opencv:BuildRequires: opencv-devel >= 2} | |
255 | %{?with_openh264:BuildRequires: openh264-devel >= 1.3} | |
256 | BuildRequires: openjpeg2-devel >= 2.1 | |
257 | BuildRequires: opus-devel | |
258 | BuildRequires: perl-Encode | |
259 | BuildRequires: perl-tools-pod | |
260 | %{?with_pocketsphinx:BuildRequires: pocketsphinx-devel > 0.8} | |
261 | BuildRequires: pkgconfig | |
262 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel} | |
263 | %{?with_rabbitmq:BuildRequires: rabbitmq-c-devel >= 0.7.1} | |
264 | %{?with_rav1e:BuildRequires: rav1e-devel >= 0.5.0} | |
265 | %{?with_rkmpp:BuildRequires: rockchip-mpp-devel >= 1.3.7} | |
266 | BuildRequires: rpmbuild(macros) >= 2.025 | |
267 | %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.1} | |
268 | %{?with_shaderc:BuildRequires: shaderc-devel >= 2019.1} | |
269 | %{?with_shine:BuildRequires: shine-devel >= 3.0.0} | |
270 | %{?with_snappy:BuildRequires: snappy-devel} | |
271 | %{?with_soxr:BuildRequires: soxr-devel} | |
272 | BuildRequires: speex-devel >= 1:1.2-rc1 | |
273 | %{?with_glslang:BuildRequires: spirv-tools-devel} | |
274 | %{?with_srt:BuildRequires: srt-devel >= 1.3} | |
275 | %{?with_svtav1:BuildRequires: svt-av1-devel >= 0.9.0} | |
276 | BuildRequires: tar >= 1:1.22 | |
277 | %{?with_tesseract:BuildRequires: tesseract-devel} | |
278 | %{?with_doc:BuildRequires: tetex} | |
279 | %{?with_doc:BuildRequires: texi2html} | |
280 | %{?with_doc:BuildRequires: texinfo} | |
281 | BuildRequires: twolame-devel >= 0.3.10 | |
282 | %{?with_uavs3d:BuildRequires: uavs3d-devel >= 1.1.41} | |
283 | %{?with_v4l2_request:BuildRequires: udev-devel} | |
284 | %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 42} | |
285 | %{?with_vidstab:BuildRequires: vid.stab-devel >= 0.98} | |
286 | %{?with_vmaf:BuildRequires: vmaf-devel >= 2.0.0} | |
287 | %{?with_voamrwbenc:BuildRequires: vo-amrwbenc-devel} | |
288 | %{?with_ilbc:BuildRequires: webrtc-libilbc-devel} | |
289 | %{?with_avs:BuildRequires: xavs-devel} | |
290 | %{?with_avs2:BuildRequires: xavs2-devel >= 1.3} | |
291 | BuildRequires: xorg-lib-libX11-devel | |
292 | BuildRequires: xorg-lib-libXext-devel | |
293 | BuildRequires: xorg-lib-libXv-devel | |
294 | %{?with_xvid:BuildRequires: xvid-devel >= 1:1.1.0} | |
295 | BuildRequires: xz | |
296 | BuildRequires: xz-devel | |
297 | %{?with_zmq:BuildRequires: zeromq-devel >= 4.2.1} | |
298 | %{?with_zimg:BuildRequires: zimg-devel >= 2.7.0} | |
299 | BuildRequires: zlib-devel | |
300 | %{?with_zvbi:BuildRequires: zvbi-devel >= 0.2.28} | |
301 | # overflows maximum hash table size | |
302 | BuildConflicts: pdksh < 5.2.14-57 | |
303 | Requires: %{name}-libs = %{version}-%{release} | |
304 | Suggests: fontconfig | |
305 | Suggests: fonts-TTF-Roboto | |
306 | Obsoletes: libpostproc < 2:1.0-1 | |
307 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
308 | ||
309 | %define specflags -fno-strict-aliasing -fPIC | |
310 | ||
311 | # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one) | |
312 | %define specflags_ia32 -fomit-frame-pointer | |
313 | # -mmmx is needed to enable <mmintrin.h> code. | |
314 | %define specflags_i586 -mmmx | |
315 | %define specflags_i686 -mmmx | |
316 | ||
317 | %description | |
318 | FFmpeg is a complete solution to record, convert and stream audio and | |
319 | video. It is a command line tool to convert one video file format to | |
320 | another. It also supports grabbing and encoding in real time from a TV | |
321 | card. | |
322 | ||
323 | %description -l pl.UTF-8 | |
324 | FFmpeg to kompletne rozwiÄ…zanie nagrywania, konwersji i transmisji | |
325 | strumieni dźwięku i obrazu. Jest to działające z linii poleceń | |
326 | narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje | |
327 | także przechwytywanie i kodowanie w czasie rzeczywistym z karty | |
328 | telewizyjnej. | |
329 | ||
330 | %package libs | |
331 | Summary: ffmpeg libraries | |
332 | Summary(pl.UTF-8): Biblioteki ffmpeg | |
333 | Group: Libraries | |
334 | Requires: SDL2 >= 2.0.1 | |
335 | %{?with_vulkan:Requires: Vulkan-Loader >= 1.3.277} | |
336 | %{?with_aom:Requires: aom >= 1.0.0} | |
337 | Requires: celt >= 0.11.0 | |
338 | %{?with_dav1d:Requires: dav1d >= 0.5.0} | |
339 | %{?with_avs2:Requires: davs2 >= 1.6} | |
340 | %{?with_flite:Requires: flite >= 1.4} | |
341 | %if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20" | |
342 | # uses gnutls_certificate_set_x509_system_trust if >= 3.0.20 | |
343 | Requires: gnutls-libs >= 3.0.20 | |
344 | %endif | |
345 | %{?with_kvazaar:Requires: kvazaar-libs >= 2.0.0} | |
346 | Requires: libass >= 0.11.0 | |
347 | %{?with_libjxl:Requires: libjxl >= 0.7.0} | |
348 | %{?with_libmysofa:Requires: libmysofa >= 0.7} | |
349 | %{?with_openmpt:Requires: libopenmpt >= 0.4.5} | |
350 | %{?with_libplacebo:Requires: libplacebo >= 4.192.0} | |
351 | %{?with_librist:Requires: librist >= 0.2.7} | |
352 | %{?with_ssh:Requires: libssh >= 0.6.0} | |
353 | %{?with_theora:Requires: libtheora >= 1.0-0.beta3} | |
354 | %if %{with va} | |
355 | Requires: libva >= 1.0.3 | |
356 | Requires: libva-drm >= 1.0.3 | |
357 | Requires: libva-x11 >= 1.0.3 | |
358 | %endif | |
359 | Requires: libvdpau >= 1.3 | |
360 | %{?with_vpl:Requires: libvpl >= 2.6} | |
361 | %{?with_vpx:Requires: libvpx >= 1.4.0} | |
362 | %{?with_webp:Requires: libwebp >= 0.4.0} | |
363 | %{?with_x264:Requires: libx264 >= 0.1.3-1.20130827_2245} | |
364 | %{?with_x265:Requires: libx265 >= 2.0} | |
365 | Requires: libxcb >= 1.4 | |
366 | Requires: lame-libs >= 3.98.3 | |
367 | %{?with_lcms:Requires: lcms2 >= 2.13} | |
368 | %{?with_mfx:Requires: mfx_dispatch >= 1.28} | |
369 | %{?with_openh264:Requires: openh264 >= 1.3} | |
370 | Requires: openjpeg2 >= 2.1 | |
371 | %{?with_rabbitmq:Requires: rabbitmq-c >= 0.7.1} | |
372 | %{?with_rav1e:Requires: rav1e-libs >= 0.5.0} | |
373 | %{?with_rkmpp:Requires: rockchip-mpp >= 1.3.7} | |
374 | %{?with_rubberband:Requires: rubberband-libs >= 1.8.1} | |
375 | %{?with_shine:Requires: shine >= 3.0.0} | |
376 | Requires: speex >= 1:1.2-rc1 | |
377 | %{?with_srt:Requires: srt >= 1.3} | |
378 | %{?with_svtav1:Requires: svt-av1 >= 0.9.0} | |
379 | Requires: twolame-libs >= 0.3.10 | |
380 | %{?with_uavs3d:Requires: uavs3d >= 1.1.41} | |
381 | %{?with_vapoursynth:Requires: vapoursynth >= 42} | |
382 | %{?with_vidstab:Requires: vid.stab >= 0.98} | |
383 | %{?with_vmaf:Requires: vmaf-libs >= 2.0.0} | |
384 | %{?with_avs2:Requires: xavs2 >= 1.3} | |
385 | %{?with_xvid:Requires: xvid >= 1:1.1.0} | |
386 | %{?with_zmq:Requires: zeromq >= 4.2.1} | |
387 | %{?with_zimg:Requires: zimg >= 2.7.0} | |
388 | %{?with_zvbi:Requires: zvbi >= 0.2.28} | |
389 | # dlopened | |
390 | %{?with_avisynth:Suggests: AviSynthPlus >= 3.7.3} | |
391 | ||
392 | %description libs | |
393 | This package contains the ffmpeg shared libraries: | |
394 | - the codec library (libavcodec). It supports most existing encoding | |
395 | formats (MPEG, DivX, MPEG4, AC3, DV...), | |
396 | - demuxer library (libavformat). It supports most existing file | |
397 | formats (AVI, MPEG, OGG, Matroska, ASF...), | |
398 | - video postprocessing library (libpostproc). | |
399 | ||
400 | %description libs -l pl.UTF-8 | |
401 | Ten pakiet zawiera biblioteki współdzielone ffmpeg: | |
402 | - bibliotekę kodeków (libavcodec); obsługuje większość istniejących | |
403 | formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...), | |
404 | - bibliotekę demuksera (libavformat); obsługuje większość istniejących | |
405 | formatów plików (AVI, MPEG, OGG, Matroska, ASF...), | |
406 | - bibliotekÄ™ postprocessingu (libpostproc). | |
407 | ||
408 | %package devel | |
409 | Summary: ffmpeg header files | |
410 | Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg | |
411 | Group: Development/Libraries | |
412 | Requires: %{name}-libs = %{version}-%{release} | |
413 | # Libs.private from *.pc | |
414 | %{?with_openal:Requires: OpenAL-devel >= 1.1} | |
415 | %{?with_opencl:Requires: OpenCL-devel >= 1.2} | |
416 | %{?with_opengl:Requires: OpenGL-devel} | |
417 | Requires: SDL2-devel >= 2.0.1 | |
418 | %{?with_vulkan:Requires: Vulkan-Loader-devel >= 1.3.277} | |
419 | Requires: alsa-lib-devel | |
420 | %{?with_aom:Requires: aom-devel >= 1.0.0} | |
421 | %{?with_aribb24:Requires: aribb24-devel} | |
422 | Requires: bzip2-devel | |
423 | Requires: celt-devel >= 0.11.0 | |
424 | %{?with_codec2:Requires: codec2-devel} | |
425 | %{?with_dav1d:Requires: dav1d-devel >= 0.5.0} | |
426 | %{?with_avs2:Requires: davs2-devel >= 1.6} | |
427 | %{?with_fdk_aac:Requires: fdk-aac-devel} | |
428 | %{?with_flite:Requires: flite-devel >= 1.4} | |
429 | Requires: fontconfig-devel | |
430 | Requires: freetype-devel | |
431 | %{?with_fribidi:Requires: fribidi-devel} | |
432 | %{?with_gme:Requires: game-music-emu-devel} | |
433 | %{?with_glslang:Requires: glslang-devel} | |
434 | Requires: gnutls-devel | |
435 | Requires: harfbuzz-devel | |
436 | Requires: jack-audio-connection-kit-devel | |
437 | %{?with_kvazaar:Requires: kvazaar-devel >= 2.0.0} | |
438 | Requires: lame-libs-devel >= 3.98.3 | |
439 | %{?with_lcms:Requires: lcms2-devel >= 2.13} | |
440 | %{?with_lensfun:Requires: lensfun-devel >= 0.3.95} | |
441 | %{?with_libaribcaption:Requires: libaribcaption-devel} | |
442 | Requires: libass-devel >= 0.11.0 | |
443 | %{?with_iec61883:Requires: libavc1394-devel} | |
444 | Requires: libbluray-devel | |
445 | %{?with_bs2b:Requires: libbs2b-devel} | |
446 | %{?with_caca:Requires: libcaca-devel} | |
447 | Requires: libcdio-paranoia-devel >= 0.90-2 | |
448 | %{?with_chromaprint:Requires: libchromaprint-devel} | |
449 | %{?with_crystalhd:Requires: libcrystalhd-devel} | |
450 | %{?with_dc1394:Requires: libdc1394-devel >= 2} | |
451 | %{?with_libdrm:Requires: libdrm-devel} | |
452 | %{?with_gsm:Requires: libgsm-devel} | |
453 | %{?with_iec61883:Requires: libiec61883-devel} | |
454 | %{?with_libjxl:Requires: libjxl-devel >= 0.7.0} | |
455 | %{?with_libklvanc:Requires: libklvanc-devel} | |
456 | %{?with_modplug:Requires: libmodplug-devel} | |
457 | %{?with_libmysofa:Requires: libmysofa-devel >= 0.7} | |
458 | %{?with_openmpt:Requires: libopenmpt-devel >= 0.4.5} | |
459 | %if %{with dc1394} || %{with iec61883} | |
460 | Requires: libraw1394-devel >= 2 | |
461 | %endif | |
462 | %{?with_librist:Requires: librist-devel >= 0.2.7} | |
463 | %{?with_librsvg:Requires: librsvg-devel >= 2} | |
464 | Requires: librtmp-devel | |
465 | %{?with_smb:Requires: libsmbclient-devel} | |
466 | %{?with_ssh:Requires: libssh-devel >= 0.6.0} | |
467 | Requires: libstdc++-devel | |
468 | %{?with_theora:Requires: libtheora-devel >= 1.0-0.beta3} | |
469 | Requires: libv4l-devel | |
470 | %{?with_va:Requires: libva-devel >= 1.0.3} | |
471 | %{?with_va:Requires: libva-drm-devel >= 1.0.3} | |
472 | %{?with_va:Requires: libva-x11-devel >= 1.0.3} | |
473 | Requires: libvdpau-devel >= 1.3 | |
474 | Requires: libvorbis-devel | |
475 | %{?with_vpl:Requires: libvpl-devel >= 2.6} | |
476 | %{?with_vpx:Requires: libvpx-devel >= 1.4.0} | |
477 | %{?with_webp:Requires: libwebp-devel >= 0.4.0} | |
478 | %{?with_x264:Requires: libx264-devel >= 0.1.3-1.20130827_2245} | |
479 | %{?with_x265:Requires: libx265-devel >= 2.0} | |
480 | # libxcb xcb-shm xcb-xfixes xcb-shape | |
481 | Requires: libxcb-devel >= 1.4 | |
482 | %{?with_libxml2:Requires: libxml2-devel >= 2} | |
483 | %{?with_lv2:Requires: lilv-devel} | |
484 | %{?with_mfx:Requires: mfx_dispatch-devel >= 1.28} | |
485 | %{?with_amr:Requires: opencore-amr-devel} | |
486 | %{?with_opencv:Requires: opencv-devel >= 2} | |
487 | %{?with_openh264:Requires: openh264-devel >= 1.3} | |
488 | Requires: openjpeg2-devel >= 2.1 | |
489 | Requires: opus-devel | |
490 | %{?with_pulseaudio:Requires: pulseaudio-devel} | |
491 | %{?with_rabbitmq:Requires: rabbitmq-c-devel >= 0.7.1} | |
492 | %{?with_rav1e:Requires: rav1e-devel >= 0.5.0} | |
493 | %{?with_rkmpp:Requires: rockchip-mpp-devel >= 1.3.7} | |
494 | %{?with_rubberband:Requires: rubberband-devel >= 1.8.1} | |
495 | %{?with_shaderc:Requires: shaderc-devel >= 2019.1} | |
496 | %{?with_shine:Requires: shine-devel >= 3.0.0} | |
497 | %{?with_snappy:Requires: snappy-devel} | |
498 | %{?with_soxr:Requires: soxr-devel} | |
499 | Requires: speex-devel >= 1:1.2-rc1 | |
500 | %{?with_glslang:Requires: spirv-tools-devel} | |
501 | %{?with_srt:Requires: srt-devel >= 1.3} | |
502 | %{?with_svtav1:Requires: svt-av1-devel >= 0.9.0} | |
503 | %{?with_tesseract:Requires: tesseract-devel} | |
504 | Requires: twolame-devel >= 0.3.10 | |
505 | %{?with_uavs3d:Requires: uavs3d-devel >= 1.1.41} | |
506 | %{?with_vapoursynth:Requires: vapoursynth-devel >= 42} | |
507 | %{?with_vidstab:Requires: vid.stab-devel >= 0.98} | |
508 | %{?with_voamrwbenc:Requires: vo-amrwbenc-devel} | |
509 | %{?with_vmaf:Requires: vmaf-devel >= 2.0.0} | |
510 | %{?with_ilbc:Requires: webrtc-libilbc-devel} | |
511 | %{?with_avs:Requires: xavs-devel} | |
512 | %{?with_avs2:Requires: xavs2-devel >= 1.3} | |
513 | Requires: xorg-lib-libX11-devel | |
514 | Requires: xorg-lib-libXext-devel | |
515 | Requires: xorg-lib-libXv-devel | |
516 | %{?with_xvid:Requires: xvid-devel >= 1:1.1.0} | |
517 | Requires: xz-devel | |
518 | %{?with_zmq:Requires: zeromq-devel >= 4.2.1} | |
519 | %{?with_zimg:Requires: zimg-devel >= 2.7.0} | |
520 | Requires: zlib-devel | |
521 | %{?with_zvbi:Requires: zvbi-devel >= 0.2.28} | |
522 | Obsoletes: libpostproc-devel < 2:1.0-1 | |
523 | ||
524 | %description devel | |
525 | ffmpeg header files. | |
526 | ||
527 | %description devel -l pl.UTF-8 | |
528 | Pliki nagłówkowe ffmpeg. | |
529 | ||
530 | %package static | |
531 | Summary: ffmpeg static libraries | |
532 | Summary(pl.UTF-8): Statyczne biblioteki ffmpeg | |
533 | Group: Development/Libraries | |
534 | Requires: %{name}-devel = %{version}-%{release} | |
535 | ||
536 | %description static | |
537 | ffmpeg static libraries (libavcodec and libavformat). | |
538 | ||
539 | %description static -l pl.UTF-8 | |
540 | Statyczne biblioteki ffmpeg (libavcodec i libavformat). | |
541 | ||
542 | %package ffplay | |
543 | Summary: FFplay - SDL-based media player | |
544 | Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL | |
545 | Group: Applications/Multimedia | |
546 | Requires: %{name}-libs = %{version}-%{release} | |
547 | ||
548 | %description ffplay | |
549 | FFplay is a very simple and portable media player using the FFmpeg | |
550 | libraries and the SDL library. It is mostly used as a test bench for | |
551 | the various APIs of FFmpeg. | |
552 | ||
553 | %description ffplay -l pl.UTF-8 | |
554 | FFplay to bardzo prosty i przenośny odtwarzacz mediów używający | |
555 | bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do | |
556 | testowania różnych API FFmpeg. | |
557 | ||
558 | %package doc | |
559 | Summary: FFmpeg documentation in HTML format | |
560 | Summary(pl.UTF-8): Dokumentacja pakietu FFmpeg w formacie HTML | |
561 | Group: Documentation | |
562 | BuildArch: noarch | |
563 | ||
564 | %description doc | |
565 | FFmpeg documentation in HTML format. | |
566 | ||
567 | %description doc -l pl.UTF-8 | |
568 | Dokumentacja pakietu FFmpeg w formacie HTML. | |
569 | ||
570 | %prep | |
571 | %setup -q | |
572 | %patch0 -p1 | |
573 | %patch1 -p1 | |
574 | %patch2 -p1 | |
575 | %if %{with v4l2_request} | |
576 | %patch3 -p1 | |
577 | %endif | |
578 | %patch4 -p1 | |
579 | %patch5 -p1 | |
580 | %patch6 -p1 | |
581 | ||
582 | # package the grep result for mplayer, the result formatted as ./mplayer/configure | |
583 | cat <<EOF > ffmpeg-avconfig | |
584 | #! /bin/sh | |
585 | libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')" | |
586 | libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')" | |
587 | libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')" | |
588 | libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')" | |
589 | libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')" | |
590 | libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')" | |
591 | libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')" | |
592 | libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')" | |
593 | libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')" | |
594 | EOF | |
595 | cat <<'EOF' >> ffmpeg-avconfig | |
596 | ||
597 | case "$1" in | |
598 | --decoders) | |
599 | echo $libavdecoders_all | |
600 | ;; | |
601 | --encoders) | |
602 | echo $libavencoders_all | |
603 | ;; | |
604 | --parsers) | |
605 | echo $libavparsers_all | |
606 | ;; | |
607 | --bsfs) | |
608 | echo $libavbsfs_all | |
609 | ;; | |
610 | --demuxers) | |
611 | echo $libavdemuxers_all | |
612 | ;; | |
613 | --muxers) | |
614 | echo $libavmuxers_all | |
615 | ;; | |
616 | --protocols) | |
617 | echo $libavprotocols_all | |
618 | ;; | |
619 | --hwaccels) | |
620 | echo $libavhwaccels_all | |
621 | ;; | |
622 | --filters) | |
623 | echo $libavfilters_all | |
624 | ;; | |
625 | *) | |
626 | cat <<USAGE | |
627 | Usage: $0 [OPTION] | |
628 | Options: | |
629 | --decoders | |
630 | --encoders | |
631 | --parsers | |
632 | --bsfs | |
633 | --demuxers | |
634 | --muxers | |
635 | --protocols | |
636 | --hwaccels | |
637 | --filters | |
638 | USAGE | |
639 | exit 1;; | |
640 | esac | |
641 | ||
642 | exit 0 | |
643 | EOF | |
644 | ||
645 | %build | |
646 | # notes: | |
647 | # - it's not autoconf configure | |
648 | # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags | |
649 | ./configure \ | |
650 | --arch=%{_target_base_arch} \ | |
651 | --prefix=%{_prefix} \ | |
652 | --libdir=%{_libdir} \ | |
653 | --shlibdir=%{_libdir} \ | |
654 | --mandir=%{_mandir} \ | |
655 | --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}%{?with_opencv: -I/usr/include/opencv4}" \ | |
656 | --extra-cxxflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcxxflags}%{?with_decklink: -I/usr/include/decklink}%{?with_opencv: -I/usr/include/opencv4}" \ | |
657 | --extra-ldflags="%{rpmcflags} %{rpmldflags}" \ | |
658 | --cc="%{__cc}" \ | |
659 | --disable-debug \ | |
660 | --disable-optimizations \ | |
661 | --disable-stripping \ | |
662 | %{!?with_doc:--disable-doc} \ | |
663 | --enable-avfilter \ | |
664 | %{?with_avisynth:--enable-avisynth} \ | |
665 | %{?with_chromaprint:--enable-chromaprint} \ | |
666 | %{?with_cudasdk:--enable-cuda-nvcc} \ | |
667 | %{?with_decklink:--enable-decklink} \ | |
668 | %{!?with_ffnvcodec:--disable-ffnvcodec} \ | |
669 | --enable-gnutls \ | |
670 | --enable-gpl \ | |
671 | --enable-version3 \ | |
672 | %{?with_frei0r:--enable-frei0r} \ | |
673 | %{?with_ladspa:--enable-ladspa} \ | |
674 | %{?with_lcms:--enable-lcms2} \ | |
675 | %{?with_aom:--enable-libaom} \ | |
676 | %{?with_aribb24:--enable-libaribb24} \ | |
677 | %{?with_libaribcaption:--enable-libaribcaption} \ | |
678 | --enable-libass \ | |
679 | --enable-libbluray \ | |
680 | %{?with_bs2b:--enable-libbs2b} \ | |
681 | %{?with_caca:--enable-libcaca} \ | |
682 | --enable-libcelt \ | |
683 | --enable-libcdio \ | |
684 | %{?with_codec2:--enable-libcodec2} \ | |
685 | %{?with_dav1d:--enable-libdav1d} \ | |
686 | %{?with_avs2:--enable-libdavs2} \ | |
687 | %{?with_dc1394:--enable-libdc1394} \ | |
688 | %{?with_libdrm:--enable-libdrm} \ | |
689 | %{?with_flite:--enable-libflite} \ | |
690 | --enable-libfontconfig \ | |
691 | --enable-libfreetype \ | |
692 | %{?with_fribidi:--enable-libfribidi} \ | |
693 | %{?with_glslang:--enable-libglslang} \ | |
694 | %{?with_gme:--enable-libgme} \ | |
695 | %{?with_gsm:--enable-libgsm} \ | |
696 | --enable-libharfbuzz \ | |
697 | %{?with_iec61883:--enable-libiec61883} \ | |
698 | %{?with_ilbc:--enable-libilbc} \ | |
699 | --enable-libjack \ | |
700 | %{?with_libjxl:--enable-libjxl} \ | |
701 | %{?with_kvazaar:--enable-libkvazaar} \ | |
702 | %{?with_libklvanc:--enable-libklvanc} \ | |
703 | %{?with_lensfun:--enable-liblensfun} \ | |
704 | %{?with_mfx:--enable-libmfx} \ | |
705 | %{?with_modplug:--enable-libmodplug} \ | |
706 | --enable-libmp3lame \ | |
707 | %{?with_libmysofa:--enable-libmysofa} \ | |
708 | %{?with_amr:--enable-libopencore-amrnb} \ | |
709 | %{?with_amr:--enable-libopencore-amrwb} \ | |
710 | %{?with_opencv:--enable-libopencv} \ | |
711 | %{?with_openh264:--enable-libopenh264} \ | |
712 | --enable-libopenjpeg \ | |
713 | %{?with_openmpt:--enable-libopenmpt} \ | |
714 | --enable-libopus \ | |
715 | %{?with_libplacebo:--enable-libplacebo} \ | |
716 | %{?with_pulseaudio:--enable-libpulse} \ | |
717 | %{?with_rabbitmq:--enable-librabbitmq} \ | |
718 | %{?with_rav1e:--enable-librav1e} \ | |
719 | %{?with_librist:--enable-librist} \ | |
720 | %{?with_librsvg:--enable-librsvg} \ | |
721 | --enable-librtmp \ | |
722 | %{?with_rubberband:--enable-librubberband} \ | |
723 | %{?with_shaderc:--enable-libshaderc} \ | |
724 | %{?with_shine:--enable-libshine} \ | |
725 | %{?with_smb:--enable-libsmbclient} \ | |
726 | %{?with_snappy:--enable-libsnappy} \ | |
727 | %{?with_soxr:--enable-libsoxr} \ | |
728 | --enable-libspeex \ | |
729 | %{?with_srt:--enable-libsrt} \ | |
730 | %{?with_ssh:--enable-libssh} \ | |
731 | %{?with_svtav1:--enable-libsvtav1} \ | |
732 | %{?with_tesseract:--enable-libtesseract} \ | |
733 | %{?with_theora:--enable-libtheora} \ | |
734 | --enable-libtwolame \ | |
735 | %{?with_uavs3d:--enable-libuavs3d} \ | |
736 | --enable-libv4l2 \ | |
737 | %{?with_vidstab:--enable-libvidstab} \ | |
738 | %{?with_vmaf:--enable-libvmaf} \ | |
739 | %{?with_voamrwbenc:--enable-libvo-amrwbenc} \ | |
740 | --enable-libvorbis \ | |
741 | %{?with_vpx:--enable-libvpx} \ | |
742 | %{?with_webp:--enable-libwebp} \ | |
743 | %{?with_x264:--enable-libx264} \ | |
744 | %{?with_x265:--enable-libx265} \ | |
745 | %{?with_avs:--enable-libxavs} \ | |
746 | %{?with_avs2:--enable-libxavs2} \ | |
747 | --enable-libxcb \ | |
748 | %{?with_libxml2:--enable-libxml2} \ | |
749 | %{?with_xvid:--enable-libxvid} \ | |
750 | %{?with_zimg:--enable-libzimg} \ | |
751 | %{?with_zmq:--enable-libzmq} \ | |
752 | %{?with_zvbi:--enable-libzvbi} \ | |
753 | %{?with_lv2:--enable-lv2} \ | |
754 | %{?with_omx:--enable-omx} \ | |
755 | %{?with_openal:--enable-openal} \ | |
756 | %{?with_opencl:--enable-opencl} \ | |
757 | %{?with_opengl:--enable-opengl} \ | |
758 | %{?with_pocketsphinx:--enable-pocketsphinx} \ | |
759 | --enable-postproc \ | |
760 | --enable-pthreads \ | |
761 | %{?with_rkmpp:--enable-rkmpp} \ | |
762 | --enable-shared \ | |
763 | %{!?with_static_libs:--disable-static} \ | |
764 | --enable-swscale \ | |
765 | %{!?with_va:--disable-vaapi} \ | |
766 | %{?with_vapoursynth:--enable-vapoursynth} \ | |
767 | %{!?with_vulkan:--disable-vulkan} \ | |
768 | %if %{with v4l2_request} | |
769 | --enable-libudev \ | |
770 | --enable-v4l2-request \ | |
771 | %endif | |
772 | %ifnarch %{ix86} %{x8664} | |
773 | --disable-mmx \ | |
774 | %endif | |
775 | %ifarch i386 i486 | |
776 | --disable-mmx \ | |
777 | %endif | |
778 | %ifarch x32 | |
779 | --disable-asm \ | |
780 | %endif | |
781 | %if %{with nonfree} | |
782 | --enable-nonfree \ | |
783 | %{?with_fdk_aac:--enable-libfdk-aac} \ | |
784 | %{?with_npp:--enable-libnpp} \ | |
785 | %endif | |
786 | --enable-runtime-cpudetect | |
787 | ||
788 | %{__make} \ | |
789 | V=1 | |
790 | ||
791 | # CC_O to add -c to commandline. makefile should be patched | |
792 | %{__make} tools/qt-faststart V=1 CC_O='-c -o $@' | |
793 | ||
794 | %{?with_tests:%{__make} check V=1} | |
795 | ||
796 | %install | |
797 | rm -rf $RPM_BUILD_ROOT | |
798 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \ | |
799 | $RPM_BUILD_ROOT%{_includedir}/ffmpeg | |
800 | ||
801 | %{__make} install install-headers \ | |
802 | DESTDIR=$RPM_BUILD_ROOT \ | |
803 | V=1 | |
804 | ||
805 | # install nonstandard, non-public headers manually | |
806 | cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg | |
807 | for a in libavutil/*/{asm,bswap}.h; do | |
808 | install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a | |
809 | done | |
810 | cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat | |
811 | ||
812 | install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir} | |
813 | ||
814 | # install as ffmpeg-avconfig to avoid with possible programs looking for | |
815 | # ffmpeg-config and expecting --libs output from it which is not implemented | |
816 | # simple to do (by querying pkgconfig), but why? | |
817 | install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig | |
818 | ||
819 | # packaged as %doc in -doc | |
820 | %if %{with doc} | |
821 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/ffmpeg/*.{css,html} | |
822 | %endif | |
823 | ||
824 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
825 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/ffmpeg/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
826 | ||
827 | %clean | |
828 | rm -rf $RPM_BUILD_ROOT | |
829 | ||
830 | %post libs -p /sbin/ldconfig | |
831 | %postun libs -p /sbin/ldconfig | |
832 | ||
833 | %files | |
834 | %defattr(644,root,root,755) | |
835 | %doc CREDITS LICENSE.md MAINTAINERS README.md RELEASE_NOTES doc/APIchanges | |
836 | %attr(755,root,root) %{_bindir}/ffmpeg | |
837 | %attr(755,root,root) %{_bindir}/ffprobe | |
838 | %attr(755,root,root) %{_bindir}/qt-faststart | |
839 | %dir %{_datadir}/ffmpeg | |
840 | %{_datadir}/ffmpeg/*.ffpreset | |
841 | %{_datadir}/ffmpeg/ffprobe.xsd | |
842 | %if %{with doc} | |
843 | %{_mandir}/man1/ffmpeg.1* | |
844 | %{_mandir}/man1/ffmpeg-all.1* | |
845 | %{_mandir}/man1/ffmpeg-bitstream-filters.1* | |
846 | %{_mandir}/man1/ffmpeg-codecs.1* | |
847 | %{_mandir}/man1/ffmpeg-devices.1* | |
848 | %{_mandir}/man1/ffmpeg-filters.1* | |
849 | %{_mandir}/man1/ffmpeg-formats.1* | |
850 | %{_mandir}/man1/ffmpeg-protocols.1* | |
851 | %{_mandir}/man1/ffmpeg-resampler.1* | |
852 | %{_mandir}/man1/ffmpeg-scaler.1* | |
853 | %{_mandir}/man1/ffmpeg-utils.1* | |
854 | %{_mandir}/man1/ffprobe.1* | |
855 | %{_mandir}/man1/ffprobe-all.1* | |
856 | %endif | |
857 | ||
858 | %files libs | |
859 | %defattr(644,root,root,755) | |
860 | %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.* | |
861 | %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.60 | |
862 | %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.* | |
863 | %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.60 | |
864 | %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.* | |
865 | %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.9 | |
866 | %attr(755,root,root) %{_libdir}/libavformat.so.*.*.* | |
867 | %attr(755,root,root) %ghost %{_libdir}/libavformat.so.60 | |
868 | %attr(755,root,root) %{_libdir}/libavutil.so.*.*.* | |
869 | %attr(755,root,root) %ghost %{_libdir}/libavutil.so.58 | |
870 | %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.* | |
871 | %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.57 | |
872 | %attr(755,root,root) %{_libdir}/libswresample.so.*.*.* | |
873 | %attr(755,root,root) %ghost %{_libdir}/libswresample.so.4 | |
874 | %attr(755,root,root) %{_libdir}/libswscale.so.*.*.* | |
875 | %attr(755,root,root) %ghost %{_libdir}/libswscale.so.7 | |
876 | ||
877 | %files devel | |
878 | %defattr(644,root,root,755) | |
879 | %doc doc/optimization.txt | |
880 | %attr(755,root,root) %{_bindir}/ffmpeg-avconfig | |
881 | %attr(755,root,root) %{_libdir}/libavcodec.so | |
882 | %attr(755,root,root) %{_libdir}/libavdevice.so | |
883 | %attr(755,root,root) %{_libdir}/libavfilter.so | |
884 | %attr(755,root,root) %{_libdir}/libavformat.so | |
885 | %attr(755,root,root) %{_libdir}/libavutil.so | |
886 | %attr(755,root,root) %{_libdir}/libpostproc.so | |
887 | %attr(755,root,root) %{_libdir}/libswresample.so | |
888 | %attr(755,root,root) %{_libdir}/libswscale.so | |
889 | %{_includedir}/ffmpeg | |
890 | %{_includedir}/libavcodec | |
891 | %{_includedir}/libavdevice | |
892 | %{_includedir}/libavfilter | |
893 | %{_includedir}/libavformat | |
894 | %{_includedir}/libavutil | |
895 | %{_includedir}/libpostproc | |
896 | %{_includedir}/libswresample | |
897 | %{_includedir}/libswscale | |
898 | %{_pkgconfigdir}/libavcodec.pc | |
899 | %{_pkgconfigdir}/libavdevice.pc | |
900 | %{_pkgconfigdir}/libavfilter.pc | |
901 | %{_pkgconfigdir}/libavformat.pc | |
902 | %{_pkgconfigdir}/libavutil.pc | |
903 | %{_pkgconfigdir}/libpostproc.pc | |
904 | %{_pkgconfigdir}/libswresample.pc | |
905 | %{_pkgconfigdir}/libswscale.pc | |
906 | %if %{with doc} | |
907 | %{_mandir}/man3/libavcodec.3* | |
908 | %{_mandir}/man3/libavdevice.3* | |
909 | %{_mandir}/man3/libavfilter.3* | |
910 | %{_mandir}/man3/libavformat.3* | |
911 | %{_mandir}/man3/libavutil.3* | |
912 | %{_mandir}/man3/libswresample.3* | |
913 | %{_mandir}/man3/libswscale.3* | |
914 | %endif | |
915 | %{_examplesdir}/%{name}-%{version} | |
916 | ||
917 | %if %{with static_libs} | |
918 | %files static | |
919 | %defattr(644,root,root,755) | |
920 | %{_libdir}/libavcodec.a | |
921 | %{_libdir}/libavdevice.a | |
922 | %{_libdir}/libavfilter.a | |
923 | %{_libdir}/libavformat.a | |
924 | %{_libdir}/libavutil.a | |
925 | %{_libdir}/libpostproc.a | |
926 | %{_libdir}/libswresample.a | |
927 | %{_libdir}/libswscale.a | |
928 | %endif | |
929 | ||
930 | %files ffplay | |
931 | %defattr(644,root,root,755) | |
932 | %attr(755,root,root) %{_bindir}/ffplay | |
933 | %if %{with doc} | |
934 | %{_mandir}/man1/ffplay.1* | |
935 | %{_mandir}/man1/ffplay-all.1* | |
936 | %endif | |
937 | ||
938 | %if %{with doc} | |
939 | %files doc | |
940 | %defattr(644,root,root,755) | |
941 | %doc doc/*.{css,html} | |
942 | %endif |