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