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