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