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