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