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