]> git.pld-linux.org Git - packages/ffmpeg.git/blob - ffmpeg.spec
- updated to 2.8.1
[packages/ffmpeg.git] / ffmpeg.spec
1 #
2 # How to deal with ffmpeg/opencv checken-egg problem:
3 #       1. make-request -r --with bootstrap ffmpeg.spec
4 #       2. make-request -r opencv.spec
5 #       3. bump release of ffmpeg.spec
6 #       4. make-request -r ffmpeg.spec
7 #
8 # Conditional build:
9 %bcond_with     bootstrap       # disable features to able to build without installed ffmpeg
10 %bcond_with     nonfree         # non free options of package (currently: faac)
11 %bcond_with     aacplus         # AAC+ encoding via libaacplus (requires nonfree)
12 %bcond_with     fdk_aac         # AAC de/encoding via libfdk_aac (requires nonfree)
13 %bcond_without  bs2b            # BS2B audio filter support
14 %bcond_without  caca            # textual display using libcaca
15 %bcond_without  dcadec          # DCA decoding via libdcadec
16 %bcond_without  decklink        # Blackmagic DeskLink output support
17 %bcond_without  flite           # flite voice synthesis support
18 %bcond_without  frei0r          # frei0r video filtering
19 %bcond_without  fribidi         # fribidi support
20 %bcond_without  gme             # Game Music Emu support
21 %bcond_without  ilbc            # iLBC de/encoding via WebRTC libilbc
22 %bcond_without  kvazaar         # Kvazaar HEVC encoder support
23 %bcond_without  ladspa          # LADSPA audio filtering
24 %bcond_with     mfx             # MFX hardware acceleration support
25 %bcond_with     nvenc           # NVIDIA NVENC support (requires nonfree)
26 %bcond_without  openal          # OpenAL 1.1 capture support
27 %bcond_without  opencl          # OpenCL 1.2 code
28 %bcond_without  opencv          # OpenCV video filtering
29 %bcond_without  opengl          # OpenGL rendering support
30 %bcond_with     openh264        # OpenH264 H.264 encoder
31 %bcond_without  pulseaudio      # PulseAudio input support
32 %bcond_without  quvi            # quvi input support
33 %bcond_without  shine           # shine fixed-point MP3 encoder
34 %bcond_without  snappy          # Snappy compression support (needed for hap encoding)
35 %bcond_without  ssh             # SFTP protocol support via libssh
36 %bcond_with     smb             # SMB support via libsmbclient
37 %bcond_without  soxr            # SoX Resampler support
38 %bcond_without  x264            # H.264 x264 encoder
39 %bcond_without  x265            # H.265/HEVC x265 encoder
40 %bcond_without  utvideo         # Ut Video decoder
41 %bcond_without  va              # VAAPI (Video Acceleration API)
42 %bcond_without  vidstab         # vid.stab video stabilization support
43 %bcond_without  vpx             # VP8, a high-quality video codec
44 %bcond_without  wavpack         # wavpack encoding support
45 %bcond_without  webp            # WebP encoding support
46 %bcond_without  zmq             # 0MQ message passing
47 %bcond_without  zvbi            # teletext via libzvbi
48 %bcond_without  doc             # don't build docs
49 %bcond_with     tests           # "make check" (some tests fail as of 2.5)
50
51 %if %{with bootstrap}
52 %undefine       with_opencv
53 %endif
54
55 %ifnarch %{ix86} %{x8664} arm
56 %undefine       with_x265
57 %endif
58 %ifarch i386 i486
59 %undefine       with_x265
60 %endif
61 Summary:        FFmpeg - a very fast video and audio converter
62 Summary(pl.UTF-8):      FFmpeg - szybki konwerter audio/wideo
63 Name:           ffmpeg
64 Version:        2.8.1
65 Release:        1
66 # LGPL or GPL, chosen at configure time (GPL version is more featured)
67 # (postprocessing, some filters, x264, x265, xavs, xvid, x11grab)
68 # using v3 allows Apache-licensed libs (opencore-amr, libvo-*enc)
69 License:        GPL v3+ with LGPL v3+ parts
70 Group:          Applications/Multimedia
71 Source0:        http://ffmpeg.org/releases/%{name}-%{version}.tar.bz2
72 # Source0-md5:  63b2cfeea930e942ff7579fd0064c5be
73 Source1:        ffserver.init
74 Source2:        ffserver.sysconfig
75 Source3:        ffserver.conf
76 Patch0:         %{name}-kvazaar.patch
77 URL:            http://www.ffmpeg.org/
78 %{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK}
79 %{?with_openal:BuildRequires:   OpenAL-devel >= 1.1}
80 %{?with_opencl:BuildRequires:   OpenCL-devel >= 1.2}
81 %{?with_opengl:BuildRequires:   OpenGL-GLX-devel}
82 BuildRequires:  SDL-devel >= 1.2.1
83 BuildRequires:  alsa-lib-devel
84 BuildRequires:  bzip2-devel
85 BuildRequires:  celt-devel >= 0.11.0
86 %{?with_dcadec:BuildRequires:   dcadec-devel}
87 %{?with_nonfree:BuildRequires:  faac-devel}
88 %{?with_fdk_aac:BuildRequires:  fdk-aac-devel}
89 %{?with_flite:BuildRequires:    flite-devel >= 1.4}
90 BuildRequires:  fontconfig-devel
91 BuildRequires:  freetype-devel
92 %{?with_frei0r:BuildRequires:   frei0r-devel}
93 %{?with_fribidi:BuildRequires:  fribidi-devel}
94 %{?with_gme:BuildRequires:      game-music-emu-devel}
95 %ifarch ppc
96 # require version with altivec support fixed
97 BuildRequires:  gcc >= 5:3.3.2-3
98 %endif
99 BuildRequires:  gmp-devel
100 BuildRequires:  gnutls-devel
101 BuildRequires:  jack-audio-connection-kit-devel
102 %{?with_kvazaar:BuildRequires:  kvazaar-devel >= 0.7}
103 %{?with_ladspa:BuildRequires:   ladspa-devel}
104 BuildRequires:  lame-libs-devel >= 3.98.3
105 %{?with_aacplus:BuildRequires:  libaacplus-devel >= 2.0.0}
106 BuildRequires:  libass-devel
107 BuildRequires:  libavc1394-devel
108 %{?with_bs2b:BuildRequires:     libbs2b-devel}
109 BuildRequires:  libbluray-devel
110 %{?with_caca:BuildRequires:     libcaca-devel}
111 BuildRequires:  libcdio-paranoia-devel >= 0.90-2
112 BuildRequires:  libdc1394-devel >= 2
113 BuildRequires:  libgsm-devel
114 BuildRequires:  libiec61883-devel
115 BuildRequires:  libmodplug-devel
116 BuildRequires:  libnut-devel
117 %{?with_quvi:BuildRequires:     libquvi-devel}
118 BuildRequires:  libraw1394-devel >= 2
119 BuildRequires:  librtmp-devel
120 %{?with_ssh:BuildRequires:      libssh-devel}
121 %{?with_smb:BuildRequires:      libsmbclient-devel}
122 BuildRequires:  libtheora-devel >= 1.0-0.beta3
123 BuildRequires:  libtool >= 2:1.4d-3
124 BuildRequires:  libv4l-devel
125 %{?with_va:BuildRequires:       libva-devel >= 1.0.3}
126 BuildRequires:  libvdpau-devel >= 0.2
127 BuildRequires:  libvorbis-devel
128 %{?with_vpx:BuildRequires:      libvpx-devel >= 1.3.0}
129 %{?with_webp:BuildRequires:     libwebp-devel >= 0.4.0}
130 # X264_BUILD >= 118
131 %{?with_x264:BuildRequires:     libx264-devel >= 0.1.3-1.20111212_2245}
132 # X265_BUILD >= 57
133 %{?with_x265:BuildRequires:     libx265-devel >= 1.3-0.20150610.1}
134 # libxcb xcb-shm xcb-xfixes xcb-shape
135 BuildRequires:  libxcb-devel >= 1.4
136 %{?with_mfx:BuildRequires:      mfx_dispatch-devel}
137 %ifarch %{ix86}
138 %ifnarch i386 i486
139 BuildRequires:  nasm
140 %endif
141 %endif
142 # which package?
143 #%{?with_nvenc:BuildRequires:   NVIDIA-NVENC-API}
144 BuildRequires:  opencore-amr-devel
145 %{?with_opencv:BuildRequires:   opencv-devel}
146 %{?with_openh264:BuildRequires: openh264-devel >= 1.3}
147 BuildRequires:  openjpeg-devel >= 1.5
148 BuildRequires:  opus-devel
149 BuildRequires:  perl-Encode
150 BuildRequires:  perl-tools-pod
151 BuildRequires:  pkgconfig
152 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel}
153 BuildRequires:  rpmbuild(macros) >= 1.470
154 BuildRequires:  schroedinger-devel
155 %{?with_shine:BuildRequires:    shine-devel >= 3.0.0}
156 %{?with_snappy:BuildRequires:   snappy-devel}
157 %{?with_soxr:BuildRequires:     soxr-devel}
158 BuildRequires:  speex-devel >= 1:1.2-rc1
159 %{?with_doc:BuildRequires:      tetex}
160 %{?with_doc:BuildRequires:      texi2html}
161 %{?with_doc:BuildRequires:      texinfo}
162 BuildRequires:  twolame-devel
163 %{?with_utvideo:BuildRequires:  utvideo-devel >= 12}
164 %{?with_vidstab:BuildRequires:  vid.stab-devel >= 0.98}
165 BuildRequires:  vo-aacenc-devel
166 BuildRequires:  vo-amrwbenc-devel
167 %{?with_wavpack:BuildRequires:  wavpack-devel}
168 %{?with_ilbc:BuildRequires:     webrtc-libilbc-devel}
169 BuildRequires:  xavs-devel
170 BuildRequires:  xorg-lib-libX11-devel
171 BuildRequires:  xorg-lib-libXext-devel
172 BuildRequires:  xorg-lib-libXfixes-devel
173 BuildRequires:  xvid-devel >= 1:1.1.0
174 BuildRequires:  yasm
175 %{?with_zmq:BuildRequires:      zeromq-devel}
176 %{?with_zvbi:BuildRequires:     zvbi-devel}
177 BuildRequires:  zlib-devel
178 %{?with_autoreqdep:BuildConflicts:      libpostproc}
179 # overflows maximum hash table size
180 BuildConflicts: pdksh < 5.2.14-57
181 Requires:       %{name}-libs = %{version}-%{release}
182 %{?with_utvideo:Requires:       utvideo >= 12}
183 %{?with_ilbc:Requires:  webrtc-libilbc}
184 Requires:       xvid >= 1:1.1.0
185 Obsoletes:      libpostproc
186 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
187
188 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
189
190 %define         specflags       -fno-strict-aliasing
191
192 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
193 %define         specflags_ia32  -fomit-frame-pointer
194 # -mmmx is needed to enable <mmintrin.h> code.
195 %define         specflags_i586  -mmmx
196 %define         specflags_i686  -mmmx
197 %define         specflags_ppc   -fPIC
198
199 %description
200 FFmpeg is a complete solution to record, convert and stream audio and
201 video. It is a command line tool to convert one video file format to
202 another. It also supports grabbing and encoding in real time from a TV
203 card.
204
205 %description -l pl.UTF-8
206 FFmpeg to kompletne rozwiązanie nagrywania, konwersji i transmisji
207 strumieni dźwięku i obrazu. Jest to działające z linii poleceń
208 narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje
209 także przechwytywanie i kodowanie w czasie rzeczywistym z karty
210 telewizyjnej.
211
212 %package libs
213 Summary:        ffmpeg libraries
214 Summary(pl.UTF-8):      Biblioteki ffmpeg
215 Group:          Libraries
216 %if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20"
217 # uses gnutls_certificate_set_x509_system_trust if >= 3.0.20
218 Requires:       gnutls-libs >= 3.0.20
219 %endif
220 %{?with_vpx:Requires:   libvpx >= 1.3.0}
221
222 %description libs
223 This package contains the ffmpeg shared libraries:
224 - the codec library (libavcodec). It supports most existing encoding
225   formats (MPEG, DivX, MPEG4, AC3, DV...),
226 - demuxer library (libavformat). It supports most existing file
227   formats (AVI, MPEG, OGG, Matroska, ASF...),
228 - video postprocessing library (libpostproc).
229
230 %description libs -l pl.UTF-8
231 Ten pakiet zawiera biblioteki współdzielone ffmpeg:
232 - bibliotekę kodeków (libavcodec); obsługuje większość istniejących
233   formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...),
234 - bibliotekę demuksera (libavformat); obsługuje większość istniejących
235   formatów plików (AVI, MPEG, OGG, Matroska, ASF...),
236 - bibliotekę postprocessingu (libpostproc).
237
238 %package devel
239 Summary:        ffmpeg header files
240 Summary(pl.UTF-8):      Pliki nagłówkowe ffmpeg
241 Group:          Development/Libraries
242 Requires:       %{name}-libs = %{version}-%{release}
243 # Libs.private from *.pc (unreasonably they are all the same)
244 %{?with_opencl:Requires:        OpenCL-devel >= 1.2}
245 %{?with_opengl:Requires:        OpenGL-devel}
246 Requires:       SDL-devel >= 1.2.1
247 Requires:       alsa-lib-devel
248 Requires:       bzip2-devel
249 Requires:       celt-devel >= 0.11.0
250 %{?with_dcadec:Requires:        dcadec-devel}
251 %{?with_nonfree:Requires:       faac-devel}
252 %{?with_fdk_aac:Requires:       fdk-aac-devel}
253 %{?with_flite:Requires: flite-devel >= 1.4}
254 Requires:       fontconfig-devel
255 Requires:       freetype-devel
256 %{?with_fribidi:Requires:       fribidi-devel}
257 %{?with_gme:Requires:   game-music-emu-devel}
258 Requires:       jack-audio-connection-kit-devel
259 %{?with_kvazaar:Requires:       kvazaar-devel >= 0.7}
260 Requires:       lame-libs-devel >= 3.98.3
261 %{?with_aacplus:Requires:       libaacplus-devel >= 2.0.0}
262 Requires:       libass-devel
263 Requires:       libavc1394-devel
264 Requires:       libbluray-devel
265 %{?with_bs2b:Requires:  libbs2b-devel}
266 %{?with_caca:Requires:  libcaca-devel}
267 Requires:       libcdio-paranoia-devel >= 0.90-2
268 Requires:       libdc1394-devel >= 2
269 Requires:       libgsm-devel
270 Requires:       libiec61883-devel
271 Requires:       libmodplug-devel
272 Requires:       libnut-devel
273 %{?with_quvi:Requires:  libquvi-devel}
274 Requires:       libraw1394-devel >= 2
275 Requires:       librtmp-devel
276 %{?with_smb:Requires:   libsmbclient-devel}
277 Requires:       libtheora-devel >= 1.0-0.beta3
278 %{?with_va:Requires:    libva-devel >= 1.0.3}
279 Requires:       libvorbis-devel
280 %{?with_vpx:Requires:   libvpx-devel >= 1.3.0}
281 %{?with_webp:Requires:  libwebp-devel >= 0.4.0}
282 %{?with_x264:Requires:  libx264-devel >= 0.1.3-1.20110625_2245}
283 %{?with_x265:Requires:  libx265-devel >= 1.3-0.20150610.1}
284 %{?with_mfx:Requires:   mfx_dispatch-devel}
285 Requires:       opencore-amr-devel
286 %{?with_opencv:Requires:        opencv-devel}
287 %{?with_openh264:Requires:      openh264-devel >= 1.3}
288 Requires:       openjpeg-devel >= 1.5
289 Requires:       schroedinger-devel
290 %{?with_shine:Requires: shine-devel >= 3.0.0}
291 %{?with_snappy:Requires:        snappy-devel}
292 %{?with_soxr:Requires:  soxr-devel}
293 Requires:       speex-devel >= 1:1.2-rc1
294 Requires:       twolame-devel
295 %{?with_utvideo:Requires:       utvideo-devel >= 12}
296 %{?with_vidstab:Requires:       vid.stab-devel >= 0.98}
297 Requires:       vo-aacenc-devel
298 Requires:       vo-amrwbenc-devel
299 %{?with_wavpack:Requires:       wavpack-devel}
300 %{?with_ilbc:Requires:  webrtc-libilbc-devel}
301 Requires:       xavs-devel
302 Requires:       xorg-lib-libXext-devel
303 Requires:       xorg-lib-libXfixes-devel
304 Requires:       xvid-devel >= 1:1.1.0
305 %{?with_zmq:Requires:   zeromq-devel}
306 Requires:       zlib-devel
307 Obsoletes:      libpostproc-devel
308
309 %description devel
310 ffmpeg header files.
311
312 %description devel -l pl.UTF-8
313 Pliki nagłówkowe ffmpeg.
314
315 %package static
316 Summary:        ffmpeg static libraries
317 Summary(pl.UTF-8):      Statyczne biblioteki ffmpeg
318 Group:          Development/Libraries
319 Requires:       %{name}-devel = %{version}-%{release}
320
321 %description static
322 ffmpeg static libraries (libavcodec and libavformat).
323
324 %description static -l pl.UTF-8
325 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
326
327 %package ffplay
328 Summary:        FFplay - SDL-based media player
329 Summary(pl.UTF-8):      FFplay - odtwarzacz mediów oparty na SDL
330 Group:          Applications/Multimedia
331 Requires:       %{name}-libs = %{version}-%{release}
332
333 %description ffplay
334 FFplay is a very simple and portable media player using the FFmpeg
335 libraries and the SDL library. It is mostly used as a test bench for
336 the various APIs of FFmpeg.
337
338 %description ffplay -l pl.UTF-8
339 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
340 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
341 testowania różnych API FFmpeg.
342
343 %package ffserver
344 Summary:        FFserver video server
345 Summary(pl.UTF-8):      FFserver - serwer strumieni obrazu
346 Group:          Daemons
347 Requires(post,preun):   /sbin/chkconfig
348 Requires:       %{name}-libs = %{version}-%{release}
349 Requires:       rc-scripts >= 0.4.0.10
350
351 %description ffserver
352 FFserver is a streaming server for both audio and video. It supports
353 several live feeds, streaming from files and time shifting on live
354 feeds (you can seek to positions in the past on each live feed,
355 provided you specify a big enough feed storage in ffserver.conf).
356
357 %description ffserver -l pl.UTF-8
358 FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
359 źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
360 czasie dla źródeł na żywo (można przeskakiwać na położenia w
361 przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
362 dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
363
364 %package doc
365 Summary:        FFmpeg documentation in HTML format
366 Summary(pl.UTF-8):      Dokumentacja pakietu FFmpeg w formacie HTML
367 Group:          Documentation
368 %if "%{_rpmversion}" >= "5"
369 BuildArch:      noarch
370 %endif
371
372 %description doc
373 FFmpeg documentation in HTML format.
374
375 %description doc -l pl.UTF-8
376 Dokumentacja pakietu FFmpeg w formacie HTML.
377
378 %prep
379 %setup -q
380 %patch0 -p1
381
382 # package the grep result for mplayer, the result formatted as ./mplayer/configure
383 cat <<EOF > ffmpeg-avconfig
384 #! /bin/sh
385 libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
386 libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
387 libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
388 libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
389 libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
390 libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
391 libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
392 libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
393 libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
394 EOF
395 cat <<'EOF' >> ffmpeg-avconfig
396
397 case "$1" in
398 --decoders)
399         echo $libavdecoders_all
400         ;;
401 --encoders)
402         echo $libavencoders_all
403         ;;
404 --parsers)
405         echo $libavparsers_all
406         ;;
407 --bsfs)
408         echo $libavbsfs_all
409         ;;
410 --demuxers)
411         echo $libavdemuxers_all
412         ;;
413 --muxers)
414         echo $libavmuxers_all
415         ;;
416 --protocols)
417         echo $libavprotocols_all
418         ;;
419 --hwaccels)
420         echo $libavhwaccels_all
421         ;;
422 --filters)
423         echo $libavfilters_all
424         ;;
425 *)
426         cat <<USAGE
427 Usage: $0 [OPTION]
428 Options:
429   --decoders
430   --encoders
431   --parsers
432   --bsfs
433   --demuxers
434   --muxers
435   --protocols
436   --hwaccels
437   --filters
438 USAGE
439         exit 1;;
440 esac
441
442 exit 0
443 EOF
444
445 %build
446 # notes:
447 # - it's not autoconf configure
448 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
449 ./configure \
450         --arch=%{_target_base_arch} \
451         --prefix=%{_prefix} \
452         --libdir=%{_libdir} \
453         --shlibdir=%{_libdir} \
454         --mandir=%{_mandir} \
455         --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}" \
456         --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
457         --cc="%{__cc}" \
458         --disable-debug \
459         --disable-optimizations \
460         --disable-stripping \
461         --enable-avfilter \
462         --enable-avresample \
463         %{?with_decklink:--enable-decklink} \
464         --enable-gnutls \
465         --enable-gpl \
466         --enable-version3 \
467         --enable-fontconfig \
468         %{?with_frei0r:--enable-frei0r} \
469         %{?with_ladspa:--enable-ladspa} \
470         %{?with_aacplus:--enable-libaacplus} \
471         --enable-libass \
472         --enable-libbluray \
473         %{?with_bs2b:--enable-libbs2b} \
474         %{?with_caca:--enable-libcaca} \
475         --enable-libcelt \
476         --enable-libcdio \
477         --enable-libdc1394 \
478         %{?with_dcadec:--enable-libdcadec} \
479         %{?with_fdk_aac:--enable-libfdk-aac} \
480         %{?with_flite:--enable-libflite} \
481         --enable-libfreetype \
482         %{?with_fribidi:--enable-libfribidi} \
483         %{?with_gme:--enable-libgme} \
484         --enable-libgsm \
485         --enable-libiec61883 \
486         %{?with_ilbc:--enable-libilbc} \
487         %{?with_kvazaar:--enable-libkvazaar} \
488         %{?with_mfx:--enable-libmfx} \
489         --enable-libmodplug \
490         --enable-libmp3lame \
491         --enable-libnut \
492         --enable-libopencore-amrnb \
493         --enable-libopencore-amrwb \
494         %{?with_opencv:--enable-libopencv} \
495         %{?with_openh264:--enable-libopenh264} \
496         --enable-libopenjpeg \
497         --enable-libopus \
498         %{?with_pulseaudio:--enable-libpulse} \
499         %{?with_quvi:--enable-libquvi} \
500         --enable-librtmp \
501         --enable-libschroedinger \
502         %{?with_shine:--enable-libshine} \
503         %{?with_smb:--enable-libsmbclient} \
504         %{?with_snappy:--enable-libsnappy} \
505         %{?with_soxr:--enable-libsoxr} \
506         --enable-libspeex \
507         %{?with_ssh:--enable-libssh} \
508         --enable-libtheora \
509         --enable-libtwolame \
510         %{?with_utvideo:--enable-libutvideo} \
511         --enable-libv4l2 \
512         %{?with_vidstab:--enable-libvidstab} \
513         --enable-libvo-aacenc \
514         --enable-libvo-amrwbenc \
515         --enable-libvorbis \
516         %{?with_vpx:--enable-libvpx} \
517         %{?with_wavpack:--enable-libwavpack} \
518         %{?with_webp:--enable-libwebp} \
519         %{?with_x264:--enable-libx264} \
520         %{?with_x265:--enable-libx265} \
521         --enable-libxavs \
522         --enable-libxvid \
523         %{?with_zmq:--enable-libzmq} \
524         %{?with_zvbi:--enable-libzvbi} \
525         %{?with_nvenc:--enable-nvenc} \
526         %{?with_openal:--enable-openal} \
527         %{?with_opencl:--enable-opencl} \
528         %{?with_opengl:--enable-opengl} \
529         --enable-postproc \
530         --enable-pthreads \
531         --enable-shared \
532         --enable-swscale \
533         %{!?with_va:--disable-vaapi} \
534         --enable-x11grab \
535 %ifnarch %{ix86} %{x8664}
536         --disable-mmx \
537 %endif
538 %ifarch i386 i486
539         --disable-mmx \
540 %endif
541 %ifarch x32
542         --disable-asm \
543 %endif
544 %if %{with nonfree}
545         --enable-nonfree \
546         --enable-libfaac \
547 %endif
548         --enable-runtime-cpudetect
549
550 %{__make} \
551         V=1
552
553 # CC_O to add -c to commandline. makefile should be patched
554 %{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
555
556 %{?with_tests:%{__make} check V=1}
557
558 %install
559 rm -rf $RPM_BUILD_ROOT
560 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
561         $RPM_BUILD_ROOT%{_includedir}/ffmpeg \
562         $RPM_BUILD_ROOT/var/{cache,log}/ffserver
563
564 %{__make} install install-headers \
565         DESTDIR=$RPM_BUILD_ROOT \
566         V=1
567
568 # install nonstandard, non-public headers manually
569 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
570 for a in libavutil/*/{asm,bswap}.h; do
571         install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
572 done
573 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
574 # for lim-omx ffmpeg components
575 cp -a libavcodec/audioconvert.h $RPM_BUILD_ROOT%{_includedir}/libavcodec
576
577 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
578 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
579 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
580 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
581 install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
582
583 # install as ffmpeg-avconfig to avoid with possible programs looking for
584 # ffmpeg-config and expecting --libs output from it which is not implemented
585 # simple to do (by querying pkgconfig), but why?
586 install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
587
588 # packaged as %doc in -doc
589 %{__rm} $RPM_BUILD_ROOT%{_docdir}/ffmpeg/*.html
590
591 install -d $RPM_BUILD_ROOT%{_examplesdir}
592 %{__mv} $RPM_BUILD_ROOT%{_datadir}/ffmpeg/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
593
594 %clean
595 rm -rf $RPM_BUILD_ROOT
596
597 %post   libs -p /sbin/ldconfig
598 %postun libs -p /sbin/ldconfig
599
600 %pre ffserver
601 %groupadd -g 167 ffserver
602 %useradd -g ffserver -u 167 ffserver
603
604 %post ffserver
605 /sbin/chkconfig --add ffserver
606 %service ffserver restart
607
608 %preun ffserver
609 if [ "$1" = 0 ]; then
610         %service ffserver stop
611         /sbin/chkconfig --del ffserver
612 fi
613
614 %postun ffserver
615 if [ "$1" = 0 ]; then
616         %userremove ffserver
617         %groupremove ffserver
618 fi
619
620 %files
621 %defattr(644,root,root,755)
622 %doc CREDITS LICENSE.md MAINTAINERS README.md RELEASE_NOTES doc/APIchanges
623 %attr(755,root,root) %{_bindir}/ffmpeg
624 %attr(755,root,root) %{_bindir}/ffprobe
625 %attr(755,root,root) %{_bindir}/qt-faststart
626 %dir %{_datadir}/ffmpeg
627 %{_datadir}/ffmpeg/*.ffpreset
628 %{_datadir}/ffmpeg/ffprobe.xsd
629 %if %{with doc}
630 %{_mandir}/man1/ffmpeg.1*
631 %{_mandir}/man1/ffmpeg-all.1*
632 %{_mandir}/man1/ffmpeg-bitstream-filters.1*
633 %{_mandir}/man1/ffmpeg-codecs.1*
634 %{_mandir}/man1/ffmpeg-devices.1*
635 %{_mandir}/man1/ffmpeg-filters.1*
636 %{_mandir}/man1/ffmpeg-formats.1*
637 %{_mandir}/man1/ffmpeg-protocols.1*
638 %{_mandir}/man1/ffmpeg-resampler.1*
639 %{_mandir}/man1/ffmpeg-scaler.1*
640 %{_mandir}/man1/ffmpeg-utils.1*
641 %{_mandir}/man1/ffprobe.1*
642 %{_mandir}/man1/ffprobe-all.1*
643 %endif
644
645 %files libs
646 %defattr(644,root,root,755)
647 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
648 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.56
649 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
650 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.56
651 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
652 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.5
653 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
654 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.56
655 %attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
656 %attr(755,root,root) %ghost %{_libdir}/libavresample.so.2
657 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
658 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.54
659 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
660 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.53
661 %attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
662 %attr(755,root,root) %ghost %{_libdir}/libswresample.so.1
663 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
664 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.3
665
666 %files devel
667 %defattr(644,root,root,755)
668 %doc doc/optimization.txt
669 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
670 %attr(755,root,root) %{_libdir}/libavcodec.so
671 %attr(755,root,root) %{_libdir}/libavdevice.so
672 %attr(755,root,root) %{_libdir}/libavfilter.so
673 %attr(755,root,root) %{_libdir}/libavformat.so
674 %attr(755,root,root) %{_libdir}/libavresample.so
675 %attr(755,root,root) %{_libdir}/libavutil.so
676 %attr(755,root,root) %{_libdir}/libpostproc.so
677 %attr(755,root,root) %{_libdir}/libswresample.so
678 %attr(755,root,root) %{_libdir}/libswscale.so
679 %{_includedir}/ffmpeg
680 %{_includedir}/libavcodec
681 %{_includedir}/libavdevice
682 %{_includedir}/libavfilter
683 %{_includedir}/libavformat
684 %{_includedir}/libavresample
685 %{_includedir}/libavutil
686 %{_includedir}/libpostproc
687 %{_includedir}/libswresample
688 %{_includedir}/libswscale
689 %{_pkgconfigdir}/libavcodec.pc
690 %{_pkgconfigdir}/libavdevice.pc
691 %{_pkgconfigdir}/libavfilter.pc
692 %{_pkgconfigdir}/libavformat.pc
693 %{_pkgconfigdir}/libavresample.pc
694 %{_pkgconfigdir}/libavutil.pc
695 %{_pkgconfigdir}/libpostproc.pc
696 %{_pkgconfigdir}/libswresample.pc
697 %{_pkgconfigdir}/libswscale.pc
698 %if %{with doc}
699 %{_mandir}/man3/libavcodec.3*
700 %{_mandir}/man3/libavdevice.3*
701 %{_mandir}/man3/libavfilter.3*
702 %{_mandir}/man3/libavformat.3*
703 %{_mandir}/man3/libavutil.3*
704 %{_mandir}/man3/libswresample.3*
705 %{_mandir}/man3/libswscale.3*
706 %endif
707 %{_examplesdir}/%{name}-%{version}
708
709 %files static
710 %defattr(644,root,root,755)
711 %{_libdir}/libavcodec.a
712 %{_libdir}/libavdevice.a
713 %{_libdir}/libavfilter.a
714 %{_libdir}/libavformat.a
715 %{_libdir}/libavresample.a
716 %{_libdir}/libavutil.a
717 %{_libdir}/libpostproc.a
718 %{_libdir}/libswresample.a
719 %{_libdir}/libswscale.a
720
721 %files ffplay
722 %defattr(644,root,root,755)
723 %attr(755,root,root) %{_bindir}/ffplay
724 %if %{with doc}
725 %{_mandir}/man1/ffplay.1*
726 %{_mandir}/man1/ffplay-all.1*
727 %endif
728
729 %files ffserver
730 %defattr(644,root,root,755)
731 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
732 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
733 %attr(755,root,root) %{_sbindir}/ffserver
734 %attr(754,root,root) /etc/rc.d/init.d/ffserver
735 %if %{with doc}
736 %{_mandir}/man1/ffserver.1*
737 %{_mandir}/man1/ffserver-all.1*
738 %endif
739 %dir %attr(770,root,ffserver) /var/cache/ffserver
740 %dir %attr(770,root,ffserver) /var/log/ffserver
741
742 %if %{with doc}
743 %files doc
744 %defattr(644,root,root,755)
745 %doc doc/*.html
746 %endif
This page took 0.100111 seconds and 4 git commands to generate.