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