-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathffmpeg.spec
226 lines (203 loc) · 6.69 KB
/
ffmpeg.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
%global gitdate 20240405
%global commit0 083443d67cb159ce469e5d902346b8d0c2cd1c93
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Summary: Digital VCR and streaming server
Name: ffmpeg
Version: 7.1
Release: %{gitdate}
License: GPLv2+
URL: http://ffmpeg.org
Source0: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz
Requires: %{name}-libs = %{version}-%{release}
BuildRequires: gmp-dev
BuildRequires: bzip2-dev
BuildRequires: fdk-aac-dev
BuildRequires: fontconfig-dev
BuildRequires: freetype-dev
BuildRequires: gnutls-dev
BuildRequires: gsm-dev
BuildRequires: libmp3lame-dev
BuildRequires: jack2-dev
BuildRequires: ladspa_sdk-dev
BuildRequires: libass-dev
BuildRequires: libgcrypt-devel
BuildRequires: mesa-dev
BuildRequires: libmodplug-dev
BuildRequires: v4l-utils-dev
BuildRequires: libvorbis-dev
BuildRequires: libvpx-dev
BuildRequires: mediasdk-dev
BuildRequires: libXvMC-dev
BuildRequires: libva-dev
BuildRequires: yasm
BuildRequires: libwebp-dev
BuildRequires: libjpeg-turbo-dev
BuildRequires: opus-dev
BuildRequires: pulseaudio-dev
BuildRequires: perl-Pod-POM-man
BuildRequires: SDL2-dev
BuildRequires: snappy-dev
BuildRequires: speex-dev
BuildRequires: subversion
BuildRequires: texinfo
BuildRequires: wavpack-dev
BuildRequires: x264-dev
BuildRequires: x265-dev
BuildRequires: zlib-dev
BuildRequires: libdrm-dev
BuildRequires: alsa-lib-dev
BuildRequires: rtmpdump-dev
BuildRequires: pkgconfig(libmfx)
BuildRequires: appstream-glib-dev
BuildRequires: dav1d-dev
BuildRequires: Vulkan-Loader-dev Vulkan-Loader
BuildRequires: Vulkan-Headers-dev Vulkan-Tools Vulkan-Headers
BuildRequires: SPIRV-Tools-dev SPIRV-Cross-dev SPIRV-Headers-dev
BuildRequires: libplacebo-dev
BuildRequires: SVT-AV1-dev
BuildRequires: zimg-dev
BuildRequires: xvidcore-dev
BuildRequires: vid.stab-dev
BuildRequires: libtheora-dev
BuildRequires: libssh-dev libssh2-dev
BuildRequires: srt-dev
BuildRequires: speex-dev
BuildRequires: librsvg-dev
BuildRequires: libopenmpt-dev
BuildRequires: openjpeg-dev
BuildRequires: libaom-dev
BuildRequires: ladspa_sdk-dev
BuildRequires: glslang-dev glslang
BuildRequires : pkgconfig(vapoursynth)
BuildRequires : pkgconfig(vapoursynth-script)
%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.
%package libs
Summary: Libraries for %{name}
Recommends: fdk-aac
%description libs
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 the libraries for %{name}
%package dev
Summary: Development package for %{name}
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Requires: pkg-config
%description dev
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}
%prep
%setup -n %{name}-%{version}
# erase glslang flags from configure checks
sed -i "s|-lOSDependent||g" configure
sed -i "s|-lOGLCompiler||g" configure
sed -i "s|-lMachineIndependent||g" configure
sed -i "s|-lGenericCodeGen||g" configure
%build
export LANG=C.UTF-8
export GCC_IGNORE_WERROR=1
export AR=gcc-ar
export RANLIB=gcc-ranlib
export NM=gcc-nm
export LDFLAGS="-Wl,-rpath=/opt/3rd-party/bundles/clearfraction/usr/lib64,-rpath=/usr/lib64 "
export CFLAGS="$CFLAGS -Ofast -fno-lto -falign-functions=32 -fno-semantic-interposition -fstack-protector-strong -fzero-call-used-regs=used -mno-vzeroupper -mprefer-vector-width=256 "
export FCFLAGS="$CFLAGS -Ofast -fno-lto -falign-functions=32 -fno-semantic-interposition -fstack-protector-strong -fzero-call-used-regs=used -mno-vzeroupper -mprefer-vector-width=256 "
export FFLAGS="$CFLAGS -Ofast -fno-lto -falign-functions=32 -fno-semantic-interposition -fstack-protector-strong -fzero-call-used-regs=used -mno-vzeroupper -mprefer-vector-width=256 "
export CXXFLAGS="$CXXFLAGS -Ofast -fno-lto -falign-functions=32 -fno-semantic-interposition -fstack-protector-strong -fzero-call-used-regs=used -mno-vzeroupper -mprefer-vector-width=256 "
./configure --disable-static --extra-ldflags='-ldl' \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--datadir=%{_datadir}/%{name} \
--incdir=%{_includedir}/%{name} \
--libdir=%{_libdir} \
--shlibdir=%{_libdir} \
--enable-pixelutils \
--extra-ldflags='-ldl' \
--enable-vaapi \
--enable-bzlib \
--enable-libdrm \
--enable-fontconfig \
--enable-gcrypt \
--enable-gmp --enable-version3 \
--enable-gnutls \
--enable-libass \
--enable-libjack \
--enable-libfreetype \
--enable-libfribidi \
--enable-libgsm \
--enable-libmp3lame \
--enable-opengl \
--enable-libopus \
--enable-libpulse \
--enable-libsnappy \
--enable-libspeex \
--enable-libvorbis \
--enable-libv4l2 \
--enable-sdl2 \
--enable-libvpx \
--enable-libwebp \
--enable-libx264 \
--enable-libx265 \
--enable-avfilter \
--enable-swscale \
--enable-postproc \
--enable-pthreads \
--enable-librtmp \
--enable-libmfx \
--disable-static \
--enable-shared \
--enable-gpl \
--disable-debug \
--disable-doc \
--enable-libfdk-aac --enable-nonfree \
--enable-libdav1d \
--enable-libsvtav1 \
--enable-ladspa \
--enable-libaom \
--enable-libopenjpeg \
--enable-libopenmpt \
--enable-librsvg \
--enable-libspeex \
--enable-libsrt \
--enable-libssh \
--enable-libtheora \
--enable-libvidstab \
--enable-libxcb \
--enable-libzimg \
--enable-libplacebo \
--enable-vulkan \
--enable-libglslang \
--enable-vapoursynth
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%make_install
rm -rf %{buildroot}/usr/share/examples
%post libs -p /usr/bin/ldconfig
%postun libs -p /usr/bin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/ffmpeg
%{_bindir}/ffplay
%{_bindir}/ffprobe
%{_datadir}/%{name}
%files libs
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
%{_libdir}/libavdevice.so.*
%files dev
%defattr(-,root,root,-)
%{_includedir}/%{name}
%{_libdir}/pkgconfig/lib*.pc
%{_libdir}/lib*.so
%changelog
# based on https://github.com/UnitedRPMs/ffmpeg
# and https://github.com/clearlinux-pkgs/not-ffmpeg