source: spec/trunk/SPECS/ffmpeg.spec@ 1010

Last change on this file since 1010 was 750, checked in by dmik, 9 years ago

spec: ffmpeg: Release version 2.8.6-2.

File size: 9.0 KB
Line 
1# Note: this .spec is borrowed from ffmpeg-2.6.8-1.fc22.src.rpm (rpmfusion.org)
2
3# TODO: add make test to %%check section
4
5%global _without_frei0r 1
6%global _without_opencv 1
7%global _without_ladspa 1
8%global _without_openal 1
9%global _without_lame 1
10%global _without_cdio 1
11%global _without_theora 1
12%global _without_vorbis 1
13%global _without_vaapi 1
14%global _without_x264 1
15%global _without_x265 1
16%global _without_xvidcore 1
17%global _without_pulse 1
18
19%global _without_extra 1
20
21Summary: Digital VCR and streaming server
22Name: ffmpeg
23Version: 2.8.6
24Release: 2%{?dist}
25%if 0%{?_with_amr:1}
26License: GPLv3+
27%else
28License: GPLv2+
29%endif
30URL: http://ffmpeg.org/
31#Source0: http://ffmpeg.org/releases/ffmpeg-%{version}.tar.bz2
32Vendor: bww bitwise works GmbH
33Requires: %{name}-libs = %{version}-%{release}
34
35%define github_name FFmpeg
36%define github_url https://github.com/bitwiseworks/%{github_name}/archive
37%define github_rev 2587a3aa8d80fb40a0b96d84deda3140bdb4aac8
38
39Source: %{github_name}-%{github_rev}.zip
40
41BuildRequires: gcc make curl zip
42
43BuildRequires: bzip2-devel
44BuildRequires: freetype-devel
45BuildRequires: fontconfig-devel
46%{?_with_celt:BuildRequires: celt-devel}
47%{?_with_dirac:BuildRequires: dirac-devel}
48%{?_with_faac:BuildRequires: faac-devel}
49%{?_with_fdk_aac:BuildRequires: fdk-aac-devel}
50BuildRequires: freetype-devel
51%{!?_without_frei0r:BuildRequires: frei0r-devel}
52%{!?_without_extra:BuildRequires: gnutls-devel}
53%{!?_without_extra:BuildRequires: gsm-devel}
54%{!?_without_lame:BuildRequires: lame-devel >= 3.98.3}
55%{?_with_jack:BuildRequires: jack-audio-connection-kit-devel}
56%{!?_without_ladspa:BuildRequires: ladspa-devel}
57%{!?_without_extra:BuildRequires: libass-devel}
58%{!?_without_cdio:BuildRequires: libcdio-paranoia-devel}
59#libcrystalhd is currently broken
60%{?_with_crystalhd:BuildRequires: libcrystalhd-devel}
61%{!?_without_extra:BuildRequires: libdc1394-devel}
62%{!?_without_extra:Buildrequires: libmodplug-devel}
63%{?_with_rtmp:BuildRequires: librtmp-devel}
64%{!?_without_theora:BuildRequires: libtheora-devel}
65%{!?_without_extra:BuildRequires: libv4l-devel}
66%{!?_without_extra:BuildRequires: libvdpau-devel}
67%{!?_without_vorbis:BuildRequires: libvorbis-devel}
68%{!?_without_vpx:BuildRequires: libvpx-devel >= 0.9.1}
69%ifarch %{ix86} x86_64
70%{!?_without_extra:BuildRequires: libXvMC-devel}
71%{?!_without_vaapi:BuildRequires: libva-devel >= 0.31.0}
72%endif
73%{?_with_amr:BuildRequires: opencore-amr-devel vo-amrwbenc-devel}
74%{!?_without_openal:BuildRequires: openal-soft-devel}
75%{?_with_opencl:BuildRequires: opencl-headers ocl-icd-devel}
76%{!?_without_opencv:BuildRequires: opencv-devel}
77%{!?_without_extra:BuildRequires: openjpeg-devel}
78%{!?_without_extra:BuildRequires: opus-devel}
79%{!?_without_pulse:BuildRequires: pulseaudio-libs-devel}
80#BuildRequires: perl(Pod::Man)
81%{!?_without_extra:BuildRequires: schroedinger-devel}
82BuildRequires: SDL-devel
83%{!?_without_extra:BuildRequires: soxr-devel}
84%{!?_without_extra:BuildRequires: speex-devel}
85#BuildRequires: subversion
86#BuildRequires: texi2html
87BuildRequires: texinfo
88%{!?_without_x264:BuildRequires: x264-devel >= 0.0.0-0.31}
89%{!?_without_x265:BuildRequires: x265-devel}
90%{!?_without_xvidcore:BuildRequires: xvidcore-devel}
91BuildRequires: zlib-devel
92%ifarch %{ix86} x86_64
93#BuildRequires: yasm
94%endif
95
96%description
97FFmpeg is a complete and free Internet live audio and video
98broadcasting solution for Linux/Unix. It also includes a digital
99VCR. It can encode in real time in many formats including MPEG1 audio
100and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
101
102%package libs
103Summary: Libraries for %{name}
104
105%description libs
106FFmpeg is a complete and free Internet live audio and video
107broadcasting solution for Linux/Unix. It also includes a digital
108VCR. It can encode in real time in many formats including MPEG1 audio
109and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
110This package contains the libraries for %{name}
111
112%package -n libavdevice
113Summary: Special devices muxing/demuxing library
114
115%description -n libavdevice
116Libavdevice is a complementary library to libavf "libavformat". It provides
117various "special" platform-specific muxers and demuxers, e.g. for grabbing
118devices, audio capture and playback etc.
119
120%package devel
121Summary: Development package for %{name}
122Requires: %{name}-libs = %{version}-%{release}
123Requires: libavdevice = %{version}-%{release}
124Requires: pkgconfig
125
126%description devel
127FFmpeg is a complete and free Internet live audio and video
128broadcasting solution for Linux/Unix. It also includes a digital
129VCR. It can encode in real time in many formats including MPEG1 audio
130and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
131This package contains development files for %{name}
132
133%debug_package
134
135%global ff_configure \
136./configure \\\
137 --prefix=%{_prefix} \\\
138 --bindir=%{_bindir} \\\
139 --datadir=%{_datadir}/%{name} \\\
140 --incdir=%{_includedir}/%{name} \\\
141 --libdir=%{_libdir} \\\
142 --mandir=%{_mandir} \\\
143 --arch=%{_arch} \\\
144 --optflags="$RPM_OPT_FLAGS" \\\
145 %{?_with_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\
146 --enable-bzlib \\\
147 %{!?_with_crystalhd:--disable-crystalhd} \\\
148 %{!?_without_frei0r:--enable-frei0r} \\\
149 %{!?_without_extra:--enable-gnutls} \\\
150 %{!?_without_ladspa:--enable-ladspa} \\\
151 %{!?_without_extra:--enable-libass} \\\
152 %{!?_without_cdio:--enable-libcdio} \\\
153 %{?_with_celt:--enable-libcelt} \\\
154 %{!?_without_extra:--enable-libdc1394} \\\
155 %{?_with_dirac:--enable-libdirac} \\\
156 %{?_with_faac:--enable-libfaac --enable-nonfree} \\\
157 %{?_with_fdk-aac:--enable-libfdk-aac --enable-nonfree} \\\
158 %{!?_with_jack:--disable-indev=jack} \\\
159 --enable-libfreetype \\\
160 --enable-fontconfig \\\
161 %{!?_without_extra:--enable-libgsm} \\\
162 %{!?_without_lame:--enable-libmp3lame} \\\
163 %{?_with_nvenc:--enable-nvenc --enable-nonfree} \\\
164 %{!?_without_openal:--enable-openal} \\\
165 %{?_with_opencl:--enable-opencl} \\\
166 %{!?_without_opencv:--enable-libopencv} \\\
167 %{!?_without_extra:--enable-libopenjpeg} \\\
168 %{!?_without_extra:--enable-libopus} \\\
169 %{!?_without_pulse:--enable-libpulse} \\\
170 %{?_with_rtmp:--enable-librtmp} \\\
171 %{!?_without_extra:--enable-libschroedinger} \\\
172 %{!?_without_extra:--enable-libsoxr} \\\
173 %{!?_without_extra:--enable-libspeex} \\\
174 %{!?_without_theora:--enable-libtheora} \\\
175 %{!?_without_vorbis:--enable-libvorbis} \\\
176 %{!?_without_extra:--enable-libv4l2} \\\
177 %{!?_without_vpx:--enable-libvpx} \\\
178 %{!?_without_x264:--enable-libx264} \\\
179 %{!?_without_x265:--enable-libx265} \\\
180 %{!?_without_xvidcore:--enable-libxvid} \\\
181 %{!?_without_extra:--enable-x11grab} \\\
182 --enable-avfilter \\\
183 --enable-avresample \\\
184 --enable-postproc \\\
185 %{!?_without_extra:--enable-pthreads} \\\
186 --disable-static \\\
187 --enable-shared \\\
188 --enable-gpl \\\
189 --disable-debug \\\
190 --disable-stripping
191
192
193%prep
194%if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
195%setup -n "%{github_name}-%{github_rev}" -q
196%else
197%setup -n "%{github_name}-%{github_rev}" -Tc
198rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
199curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
200unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
201%endif
202
203# fix -O3 -g in host_cflags
204sed -i "s|-O3 -g|$RPM_OPT_FLAGS|" configure
205
206%build
207%{ff_configure}\
208 --shlibdir=%{_libdir} \
209 --disable-doc \
210%if 0%{?ffmpegsuffix:1}
211 --build-suffix=%{ffmpegsuffix} \
212 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver \
213%else
214%ifarch %{ix86}
215 --cpu=%{_target_cpu} \
216%endif
217%ifarch %{ix86} x86_64 ppc ppc64
218 --enable-runtime-cpudetect \
219%endif
220%endif
221 --extra-ldflags="-Zhigh-mem" \
222 --extra-libs="-lpoll -lmmap"
223
224make %{?_smp_mflags} V=1
225make documentation V=1
226make alltools V=1
227
228%install
229make install DESTDIR=$RPM_BUILD_ROOT V=1
230%if 0%{!?ffmpegsuffix:1}
231install -pm755 tools/qt-faststart.exe $RPM_BUILD_ROOT%{_bindir}
232%endif
233
234%post libs
235
236%postun libs
237
238%if 0%{!?ffmpegsuffix:1}
239%files
240%doc COPYING.* CREDITS README.md doc/ffserver.conf
241%{_bindir}/ffmpeg.exe
242%{_bindir}/ffplay.exe
243%{_bindir}/ffprobe.exe
244%{_bindir}/ffserver.exe
245%{_bindir}/qt-faststart.exe
246# @todo we miss perl(Pod::Man) or such
247#%{_mandir}/man1/ffmpeg*.1*
248#%{_mandir}/man1/ffplay*.1*
249#%{_mandir}/man1/ffprobe*.1*
250#%{_mandir}/man1/ffserver*.1*
251%{_datadir}/ffmpeg
252%endif
253
254%files libs
255%{_libdir}/*.dll
256%exclude %{_libdir}/avdevi*.dll
257# @todo we miss perl(Pod::Man) or such
258#%{_mandir}/man3/lib*.3.gz
259
260%files -n libavdevice
261%{_libdir}/avdevi*.dll
262
263%files devel
264%doc MAINTAINERS doc/APIchanges doc/*.txt
265%{_includedir}/ffmpeg
266%{_libdir}/pkgconfig/lib*.pc
267%{_libdir}/*.a
268%{_libdir}/*.lib
269
270
271%changelog
272* Mon Apr 18 2016 Dmitriy Kuminov <coding@dmik.org> 2.8.6-2
273- Enable high memory support.
274
275* Fri Apr 15 2016 Dmitriy Kuminov <coding@dmik.org> 2.8.6-1
276- Initial release of version 2.8.6.
Note: See TracBrowser for help on using the repository browser.