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