-
Notifications
You must be signed in to change notification settings - Fork 0
/
compat-ffmpeg4.spec
395 lines (349 loc) · 12.3 KB
/
compat-ffmpeg4.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
%undefine _package_note_file
%global __provides_exclude_from ^(%{_libdir}/pkgconfig)/.*$
%global __requires_exclude_from ^(%{_libdir}/pkgconfig)/.*$
# Cuda and others are only available on some arches
%if 0%{?el7}
%global _without_aom 1
%global _without_dav1d 1
%global _without_frei0r 1
%global _without_opus 1
%global _without_vpx 1
%endif
%if 0%{?el9}
%global _without_frei0r 1
%global _without_jack 1
%ifarch x86_64
%global _with_mfx 1
%endif
%endif
%if 0%{?fedora}
%ifarch x86_64
%global _with_mfx 1
%endif
%endif
# Disable nvenc when not relevant
%ifnarch x86_64 aarch64
%global _without_nvenc 1
%endif
%if 0%{?_without_gpl}
%global lesser L
%endif
%if 0%{!?_without_amr} || 0%{?_with_gmp}
%global ffmpeg_license %{?lesser}GPLv3+
%else
%global ffmpeg_license %{?lesser}GPLv2+
%endif
Summary: Digital VCR and streaming server
Name: compat-ffmpeg4
Version: 4.4.5
Release: 2%{?dist}
License: %{ffmpeg_license}
URL: https://ffmpeg.org/
Source0: %{url}/releases/ffmpeg-%{version}.tar.xz
Source1: %{url}/releases/ffmpeg-%{version}.tar.xz.asc
Source2: %{url}/ffmpeg-devel.asc
Patch0: configure-fix-nvenc-detection.patch
Patch1: nvenc-stop-using-deprecated-rc-modes.patch
Patch2: nvenc-support-SDK-12.2-bit-depth-API.patch
BuildRequires: gcc
BuildRequires: alsa-lib-devel
BuildRequires: AMF-devel
BuildRequires: bzip2-devel
%{?_with_faac:BuildRequires: faac-devel}
%{?_with_fdk_aac:BuildRequires: fdk-aac-devel}
%{?_with_flite:BuildRequires: flite-devel}
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: fribidi-devel
%{!?_without_frei0r:BuildRequires: frei0r-devel}
%{?_with_gme:BuildRequires: game-music-emu-devel}
BuildRequires: gnupg2
BuildRequires: gnutls-devel
BuildRequires: gsm-devel
%{?_with_ilbc:BuildRequires: ilbc-devel}
BuildRequires: lame-devel >= 3.98.3
%{!?_without_jack:BuildRequires: jack-audio-connection-kit-devel}
%{!?_without_ladspa:BuildRequires: ladspa-devel}
%{!?_without_aom:BuildRequires: libaom-devel}
%{!?_without_dav1d:BuildRequires: libdav1d-devel >= 0.2.1}
%{!?_without_ass:BuildRequires: libass-devel}
%{!?_without_bluray:BuildRequires: libbluray-devel}
%{?_with_bs2b:BuildRequires: libbs2b-devel}
%{?_with_caca:BuildRequires: libcaca-devel}
%{!?_without_cdio:BuildRequires: libcdio-paranoia-devel}
%{?_with_chromaprint:BuildRequires: libchromaprint-devel}
%{?_with_crystalhd:BuildRequires: libcrystalhd-devel}
%if 0%{?_with_ieee1394}
BuildRequires: libavc1394-devel
BuildRequires: libdc1394-devel
BuildRequires: libiec61883-devel
%endif
BuildRequires: libdrm-devel
BuildRequires: libgcrypt-devel
BuildRequires: libGL-devel
BuildRequires: libmodplug-devel
BuildRequires: libmysofa-devel
BuildRequires: libopenmpt-devel
BuildRequires: librsvg2-devel
%{?_with_rtmp:BuildRequires: librtmp-devel}
BuildRequires: libssh-devel
BuildRequires: libtheora-devel
BuildRequires: libv4l-devel
%{?!_without_vaapi:BuildRequires: libva-devel >= 0.31.0}
BuildRequires: libvdpau-devel
BuildRequires: libvorbis-devel
%{?!_without_vpx:BuildRequires: libvpx-devel >= 1.4.0}
%{?_with_mfx:BuildRequires: pkgconfig(libmfx) >= 1.23-1}
%ifarch %{ix86} x86_64
BuildRequires: nasm
%endif
%{?_with_webp:BuildRequires: libwebp-devel}
%{?_with_netcdf:BuildRequires: netcdf-devel}
%{?_with_rpi:BuildRequires: raspberrypi-vc-devel}
%{!?_without_nvenc:BuildRequires: nv-codec-headers}
%{!?_without_amr:BuildRequires: opencore-amr-devel vo-amrwbenc-devel}
%{?_with_omx:BuildRequires: libomxil-bellagio-devel}
BuildRequires: libxcb-devel
BuildRequires: libxml2-devel
%{!?_without_openal:BuildRequires: openal-soft-devel}
%if 0%{!?_without_opencl:1}
BuildRequires: opencl-headers ocl-icd-devel
%{?fedora:Recommends: opencl-icd}
%endif
%{?_with_opencv:BuildRequires: opencv-devel}
BuildRequires: openjpeg2-devel
%{!?_without_opus:BuildRequires: opus-devel >= 1.1.3}
%{!?_without_pulse:BuildRequires: pulseaudio-libs-devel}
BuildRequires: perl(Pod::Man)
%{?_with_rubberband:BuildRequires: rubberband-devel}
%{?_with_snappy:BuildRequires: snappy-devel}
BuildRequires: soxr-devel
BuildRequires: speex-devel
BuildRequires: pkgconfig(srt)
%{?_with_tesseract:BuildRequires: tesseract-devel}
#BuildRequires: texi2html
BuildRequires: texinfo
%{?_with_twolame:BuildRequires: twolame-devel}
%{?_with_wavpack:BuildRequires: wavpack-devel}
%{!?_without_vidstab:BuildRequires: vid.stab-devel}
%{!?_without_x264:BuildRequires: x264-devel >= 0.0.0-0.31}
%{!?_without_x265:BuildRequires: x265-devel}
%{!?_without_xvid:BuildRequires: xvidcore-devel}
%{!?_without_zimg:BuildRequires: zimg-devel >= 2.7.0}
BuildRequires: zlib-devel
%{?_with_zmq:BuildRequires: zeromq-devel}
%{!?_without_zvbi:BuildRequires: zvbi-devel}
%description
FFmpeg is a complete and free Internet live audio and video
broadcasting solution for Linux/Unix. It also includes a digital
VCR. It can encode in real time in many formats including MPEG1 audio
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
!!! BIG FAT WARNING!!!
This package is made for compatibility with older components
It is not intended to be used in insecure environment.
%package devel
Summary: Development package for %{name}
Requires: %{name}%{_isa} = %{version}-%{release}
Requires: pkgconfig
Conflicts: ffmpeg-devel
Conflicts: ffmpeg-free-devel
%description devel
FFmpeg is a complete and free Internet live audio and video
broadcasting solution for Linux/Unix. It also includes a digital
VCR. It can encode in real time in many formats including MPEG1 audio
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
This package contains development files for %{name}
# Don't use the %%configure macro as this is not an autotool script
%global ff_configure \
./configure \\\
--prefix=%{_prefix} \\\
--bindir=%{_bindir} \\\
--datadir=%{_datadir}/%{name} \\\
--docdir=%{_docdir}/%{name} \\\
--incdir=%{_includedir}/%{name} \\\
--libdir=%{_libdir} \\\
--mandir=%{_mandir} \\\
--arch=%{_target_cpu} \\\
--optflags="%{optflags} -Wno-int-conversion" \\\
--extra-ldflags="%{?__global_ldflags}" \\\
--disable-manpages \\\
%{!?_without_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\
--enable-bzlib \\\
%{?_with_chromaprint:--enable-chromaprint} \\\
%{!?_with_crystalhd:--disable-crystalhd} \\\
--enable-fontconfig \\\
%{!?_without_frei0r:--enable-frei0r} \\\
--enable-gcrypt \\\
%{?_with_gmp:--enable-gmp --enable-version3} \\\
--enable-gnutls \\\
%{!?_without_ladspa:--enable-ladspa} \\\
%{!?_without_aom:--enable-libaom} \\\
%{!?_without_dav1d:--enable-libdav1d} \\\
%{!?_without_ass:--enable-libass} \\\
%{!?_without_bluray:--enable-libbluray} \\\
%{?_with_bs2b:--enable-libbs2b} \\\
%{?_with_caca:--enable-libcaca} \\\
%{?_with_cuvid:--enable-cuvid --enable-nonfree} \\\
%{!?_without_cdio:--enable-libcdio} \\\
%{?_with_ieee1394:--enable-libdc1394 --enable-libiec61883} \\\
--enable-libdrm \\\
%{?_with_faac:--enable-libfaac --enable-nonfree} \\\
%{?_with_fdk_aac:--enable-libfdk-aac --enable-nonfree} \\\
%{?_with_flite:--enable-libflite} \\\
%{!?_without_jack:--enable-libjack} \\\
--enable-libfreetype \\\
%{!?_without_fribidi:--enable-libfribidi} \\\
%{?_with_gme:--enable-libgme} \\\
--enable-libgsm \\\
%{?_with_ilbc:--enable-libilbc} \\\
%{?_with_libnpp:--enable-libnpp --enable-nonfree} \\\
--enable-libmp3lame \\\
--enable-libmysofa \\\
%{?_with_netcdf:--enable-netcdf} \\\
%{?_with_mmal:--enable-mmal} \\\
%{!?_without_nvenc:--enable-nvenc} \\\
%{?_with_omx:--enable-omx} \\\
%{?_with_omx_rpi:--enable-omx-rpi} \\\
%{!?_without_openal:--enable-openal} \\\
%{!?_without_opencl:--enable-opencl} \\\
%{?_with_opencv:--enable-libopencv} \\\
%{!?_without_opengl:--enable-opengl} \\\
--enable-libopenjpeg \\\
--enable-libopenmpt \\\
%{!?_without_opus:--enable-libopus} \\\
%{!?_without_pulse:--enable-libpulse} \\\
--enable-librsvg \\\
%{?_with_rtmp:--enable-librtmp} \\\
%{?_with_rubberband:--enable-librubberband} \\\
%{?_with_snappy:--enable-libsnappy} \\\
--enable-libsoxr \\\
--enable-libspeex \\\
--enable-libssh \\\
%{?_with_tesseract:--enable-libtesseract} \\\
--enable-libtheora \\\
%{?_with_twolame:--enable-libtwolame} \\\
--enable-libvorbis \\\
--enable-libv4l2 \\\
%{!?_without_vidstab:--enable-libvidstab} \\\
%{!?_without_vpx:--enable-libvpx} \\\
%{?_with_webp:--enable-libwebp} \\\
%{!?_without_x264:--enable-libx264} \\\
%{!?_without_x265:--enable-libx265} \\\
%{!?_without_xvid:--enable-libxvid} \\\
--enable-libxml2 \\\
%{!?_without_zimg--enable-libzimg} \\\
%{?_with_zmq:--enable-libzmq} \\\
%{!?_without_zvbi:--enable-libzvbi} \\\
--enable-avfilter \\\
--enable-libmodplug \\\
--enable-postproc \\\
--enable-pthreads \\\
--disable-static \\\
--enable-shared \\\
%{!?_without_gpl:--enable-gpl} \\\
--disable-debug \\\
--disable-stripping
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1 -n ffmpeg-%{version}
# fix -O3 -g in host_cflags
sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure
%build
%{ff_configure}\
--shlibdir=%{_libdir} \
--disable-doc \
--disable-ffmpeg --disable-ffplay --disable-ffprobe \
%ifnarch %{ix86}
--enable-lto \
%endif
%ifarch %{ix86}
--cpu=%{_target_cpu} \
%endif
%{?_with_mfx:--enable-libmfx} \
%ifarch %{ix86} x86_64 %{power64}
--enable-runtime-cpudetect \
%endif
%ifarch %{power64}
%ifarch ppc64
--cpu=g5 \
%endif
%ifarch ppc64p7
--cpu=power7 \
%endif
%ifarch ppc64le
--cpu=power8 \
%endif
--enable-pic \
%endif
%ifarch %{arm}
--disable-runtime-cpudetect --arch=arm \
%ifarch armv6hl
--cpu=armv6 \
%endif
%ifarch armv7hl armv7hnl
--cpu=armv7-a \
--enable-vfpv3 \
--enable-thumb \
%endif
%ifarch armv7hl
--disable-neon \
%endif
%ifarch armv7hnl
--enable-neon \
%endif
%endif
|| cat ffbuild/config.log
%make_build V=1
%install
%make_install V=1
rm -rf %{buildroot}/%{_datadir}/compat-ffmpeg4/
%ldconfig_scriptlets
%files
%doc CREDITS README.md
%license COPYING.*
%{_libdir}/lib*.so.*
%files devel
%doc MAINTAINERS doc/APIchanges doc/*.txt
%{_includedir}/%{name}
%{_libdir}/pkgconfig/lib*.pc
%{_libdir}/lib*.so
%changelog
* Sat Nov 23 2024 Leigh Scott <[email protected]> - 4.4.5-2
- Rebuild for new x265
* Sun Aug 04 2024 Leigh Scott <[email protected]> - 4.4.5-1
- Update to 4.4.5
* Thu Aug 01 2024 RPM Fusion Release Engineering <[email protected]> - 4.4.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Apr 06 2024 Leigh Scott <[email protected]> - 4.4.4-5
- Rebuild for new x265 version
* Sat Feb 03 2024 RPM Fusion Release Engineering <[email protected]> - 4.4.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Leigh Scott <[email protected]> - 4.4.4-3
- rebuilt
* Wed Aug 02 2023 RPM Fusion Release Engineering <[email protected]> - 4.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Apr 13 2023 Leigh Scott <[email protected]> - 4.4.4-1
- Update to 4.4.4
* Wed Mar 22 2023 Nicolas Chauvet <[email protected]> - 4.4.3-3
- rebuilt
* Wed Nov 16 2022 Nicolas Chauvet <[email protected]> - 4.4.3-2
- Rebuilt
* Mon Oct 10 2022 Leigh Scott <[email protected]> - 4.4.3-1
- Update to 4.4.3
* Sun Sep 04 2022 Leigh Scott <[email protected]> - 4.4.2-6
- Remove pkgconfig provides from devel
* Sun Sep 04 2022 Leigh Scott <[email protected]> - 4.4.2-5
- Use standard location for pkgconfig and development libs
* Sun Aug 07 2022 RPM Fusion Release Engineering <[email protected]> - 4.4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
5.1
* Thu Jun 23 2022 Robert-André Mauchin <[email protected]> - 4.4.2-3
- Rebuilt for new AOM, dav1d, rav1e and svt-av1
* Sun Jun 12 2022 Sérgio Basto <[email protected]> - 4.4.2-2
- Mass rebuild for x264-0.164
* Fri Apr 15 2022 Leigh Scott <[email protected]> - 4.4.2-1
- Update to 4.4.2
* Mon Feb 14 2022 Leigh Scott <[email protected]> - 4.4.1-1
- Update to 4.4.1
* Wed Feb 09 2022 Leigh Scott <[email protected]> - 4.3.3-1
- Initial build