]> git.pld-linux.org Git - packages/ffmpeg.git/blob - ffmpeg.spec
- rel 1.1 for x264 rebuild
[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_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 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.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 >= 0.7}
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 %{?with_x265:Requires:  libx265-devel >= 0.7}
244 Requires:       opencore-amr-devel
245 %{?with_opencv:Requires:        opencv-devel}
246 Requires:       openjpeg-devel >= 1.5
247 Requires:       schroedinger-devel
248 %{?with_shine:Requires: shine-devel >= 3.0.0}
249 %{?with_soxr:Requires:  soxr-devel}
250 Requires:       speex-devel >= 1:1.2-rc1
251 Requires:       twolame-devel
252 %{?with_utvideo:Requires:       utvideo-devel >= 12}
253 %{?with_vidstab:Requires:       vid.stab-devel >= 0.98}
254 Requires:       vo-aacenc-devel
255 Requires:       vo-amrwbenc-devel
256 %{?with_wavpack:Requires:       wavpack-devel}
257 %{?with_ilbc:Requires:  webrtc-libilbc-devel}
258 Requires:       xavs-devel
259 Requires:       xorg-lib-libXext-devel
260 Requires:       xorg-lib-libXfixes-devel
261 Requires:       xvid-devel >= 1:1.1.0
262 %{?with_zmq:Requires:   zeromq-devel}
263 Requires:       zlib-devel
264 Obsoletes:      libpostproc-devel
265
266 %description devel
267 ffmpeg header files.
268
269 %description devel -l pl.UTF-8
270 Pliki nagłówkowe ffmpeg.
271
272 %package static
273 Summary:        ffmpeg static libraries
274 Summary(pl.UTF-8):      Statyczne biblioteki ffmpeg
275 Group:          Development/Libraries
276 Requires:       %{name}-devel = %{version}-%{release}
277
278 %description static
279 ffmpeg static libraries (libavcodec and libavformat).
280
281 %description static -l pl.UTF-8
282 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
283
284 %package ffplay
285 Summary:        FFplay - SDL-based media player
286 Summary(pl.UTF-8):      FFplay - odtwarzacz mediów oparty na SDL
287 Group:          Applications/Multimedia
288 Requires:       %{name}-libs = %{version}-%{release}
289
290 %description ffplay
291 FFplay is a very simple and portable media player using the FFmpeg
292 libraries and the SDL library. It is mostly used as a test bench for
293 the various APIs of FFmpeg.
294
295 %description ffplay -l pl.UTF-8
296 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
297 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
298 testowania różnych API FFmpeg.
299
300 %package ffserver
301 Summary:        FFserver video server
302 Summary(pl.UTF-8):      FFserver - serwer strumieni obrazu
303 Group:          Daemons
304 Requires(post,preun):   /sbin/chkconfig
305 Requires:       %{name}-libs = %{version}-%{release}
306 Requires:       rc-scripts >= 0.4.0.10
307
308 %description ffserver
309 FFserver is a streaming server for both audio and video. It supports
310 several live feeds, streaming from files and time shifting on live
311 feeds (you can seek to positions in the past on each live feed,
312 provided you specify a big enough feed storage in ffserver.conf).
313
314 %description ffserver -l pl.UTF-8
315 FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
316 źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
317 czasie dla źródeł na żywo (można przeskakiwać na położenia w
318 przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
319 dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
320
321 %package doc
322 Summary:        FFmpeg documentation in HTML format
323 Summary(pl.UTF-8):      Dokumentacja pakietu FFmpeg w formacie HTML
324 Group:          Documentation
325 %if "%{_rpmversion}" >= "5"
326 BuildArch:      noarch
327 %endif
328
329 %description doc
330 FFmpeg documentation in HTML format.
331
332 %description doc -l pl.UTF-8
333 Dokumentacja pakietu FFmpeg w formacie HTML.
334
335 %prep
336 %setup -q
337 %patch0 -p1
338
339 # package the grep result for mplayer, the result formatted as ./mplayer/configure
340 cat <<EOF > ffmpeg-avconfig
341 #! /bin/sh
342 libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
343 libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
344 libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
345 libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
346 libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
347 libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
348 libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
349 libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
350 libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
351 EOF
352 cat <<'EOF' >> ffmpeg-avconfig
353
354 case "$1" in
355 --decoders)
356         echo $libavdecoders_all
357         ;;
358 --encoders)
359         echo $libavencoders_all
360         ;;
361 --parsers)
362         echo $libavparsers_all
363         ;;
364 --bsfs)
365         echo $libavbsfs_all
366         ;;
367 --demuxers)
368         echo $libavdemuxers_all
369         ;;
370 --muxers)
371         echo $libavmuxers_all
372         ;;
373 --protocols)
374         echo $libavprotocols_all
375         ;;
376 --hwaccels)
377         echo $libavhwaccels_all
378         ;;
379 --filters)
380         echo $libavfilters_all
381         ;;
382 *)
383         cat <<USAGE
384 Usage: $0 [OPTION]
385 Options:
386   --decoders
387   --encoders
388   --parsers
389   --bsfs
390   --demuxers
391   --muxers
392   --protocols
393   --hwaccels
394   --filters
395 USAGE
396         exit 1;;
397 esac
398
399 exit 0
400 EOF
401
402 %build
403 # notes:
404 # - it's not autoconf configure
405 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
406 ./configure \
407         --arch=%{_target_base_arch} \
408         --prefix=%{_prefix} \
409         --libdir=%{_libdir} \
410         --shlibdir=%{_libdir} \
411         --mandir=%{_mandir} \
412         --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}" \
413         --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
414         --cc="%{__cc}" \
415         --disable-debug \
416         --disable-optimizations \
417         --disable-stripping \
418         --enable-avfilter \
419         --enable-avresample \
420         %{?with_decklink:--enable-decklink} \
421         --enable-gnutls \
422         --enable-gpl \
423         --enable-version3 \
424         --enable-fontconfig \
425         %{?with_frei0r:--enable-frei0r} \
426         %{?with_ladspa:--enable-ladspa} \
427         %{?with_aacplus:--enable-libaacplus} \
428         --enable-libass \
429         --enable-libbluray \
430         %{?with_caca:--enable-libcaca} \
431         --enable-libcelt \
432         --enable-libcdio \
433         --enable-libdc1394 \
434         %{?with_fdk_aac:--enable-libfdk-aac} \
435         %{?with_flite:--enable-libflite} \
436         --enable-libfreetype \
437         %{?with_gme:--enable-libgme} \
438         --enable-libgsm \
439         --enable-libiec61883 \
440         %{?with_ilbc:--enable-libilbc} \
441         --enable-libmodplug \
442         --enable-libmp3lame \
443         --enable-libnut \
444         --enable-libopencore-amrnb \
445         --enable-libopencore-amrwb \
446         %{?with_opencv:--enable-libopencv} \
447         --enable-libopenjpeg \
448         --enable-libopus \
449         %{?with_pulseaudio:--enable-libpulse} \
450         %{?with_quvi:--enable-libquvi} \
451         --enable-librtmp \
452         --enable-libschroedinger \
453         %{?with_shine:--enable-libshine} \
454         %{?with_soxr:--enable-libsoxr} \
455         --enable-libspeex \
456         %{?with_ssh:--enable-libssh} \
457         --enable-libtheora \
458         --enable-libtwolame \
459         %{?with_utvideo:--enable-libutvideo} \
460         --enable-libv4l2 \
461         %{?with_vidstab:--enable-libvidstab} \
462         --enable-libvo-aacenc \
463         --enable-libvo-amrwbenc \
464         --enable-libvorbis \
465         %{?with_vpx:--enable-libvpx} \
466         %{?with_wavpack:--enable-libwavpack} \
467         %{?with_webp:--enable-libwebp} \
468         %{?with_x264:--enable-libx264} \
469         %{?with_x265:--enable-libx265} \
470         --enable-libxavs \
471         --enable-libxvid \
472         %{?with_zmq:--enable-libzmq} \
473         %{?with_zvbi:--enable-libzvbi} \
474         %{?with_openal:--enable-openal} \
475         %{?with_opencl:--enable-opencl} \
476         %{?with_opengl:--enable-opengl} \
477         --enable-postproc \
478         --enable-pthreads \
479         --enable-shared \
480         --enable-swscale \
481         %{!?with_va:--disable-vaapi} \
482         --enable-x11grab \
483 %ifnarch %{ix86} %{x8664}
484         --disable-mmx \
485 %endif
486 %ifarch i386 i486
487         --disable-mmx \
488 %endif
489 %if %{with nonfree}
490         --enable-nonfree \
491         --enable-libfaac \
492 %endif
493         --enable-runtime-cpudetect
494
495 %{__make} \
496         V=1
497
498 # CC_O to add -c to commandline. makefile should be patched
499 %{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
500
501 %install
502 rm -rf $RPM_BUILD_ROOT
503 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
504         $RPM_BUILD_ROOT%{_includedir}/ffmpeg \
505         $RPM_BUILD_ROOT/var/{cache,log}/ffserver
506
507 %{__make} install install-headers \
508         DESTDIR=$RPM_BUILD_ROOT \
509         V=1
510
511 # install nonstandard, non-public headers manually
512 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
513 for a in libavutil/*/bswap.h; do
514         install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
515 done
516 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
517 # for lim-omx ffmpeg components
518 cp -a libavcodec/audioconvert.h $RPM_BUILD_ROOT%{_includedir}/libavcodec
519
520 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
521 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
522 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
523 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
524 install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
525
526 # install as ffmpeg-avconfig to avoid with possible programs looking for
527 # ffmpeg-config and expecting --libs output from it which is not implemented
528 # simple to do (by querying pkgconfig), but why?
529 install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
530
531 %clean
532 rm -rf $RPM_BUILD_ROOT
533
534 %post   libs -p /sbin/ldconfig
535 %postun libs -p /sbin/ldconfig
536
537 %pre ffserver
538 %groupadd -g 167 ffserver
539 %useradd -g ffserver -u 167 ffserver
540
541 %post ffserver
542 /sbin/chkconfig --add ffserver
543 %service ffserver restart
544
545 %preun ffserver
546 if [ "$1" = 0 ]; then
547         %service ffserver stop
548         /sbin/chkconfig --del ffserver
549 fi
550
551 %postun ffserver
552 if [ "$1" = 0 ]; then
553         %userremove ffserver
554         %groupremove ffserver
555 fi
556
557 %files
558 %defattr(644,root,root,755)
559 %doc CREDITS LICENSE MAINTAINERS README doc/{APIchanges,RELEASE_NOTES}
560 %attr(755,root,root) %{_bindir}/ffmpeg
561 %attr(755,root,root) %{_bindir}/ffprobe
562 %attr(755,root,root) %{_bindir}/qt-faststart
563 %dir %{_datadir}/ffmpeg
564 %{_datadir}/ffmpeg/*.ffpreset
565 %{_datadir}/ffmpeg/ffprobe.xsd
566 %if %{with doc}
567 %{_mandir}/man1/ffmpeg.1*
568 %{_mandir}/man1/ffmpeg-all.1*
569 %{_mandir}/man1/ffmpeg-bitstream-filters.1*
570 %{_mandir}/man1/ffmpeg-codecs.1*
571 %{_mandir}/man1/ffmpeg-devices.1*
572 %{_mandir}/man1/ffmpeg-filters.1*
573 %{_mandir}/man1/ffmpeg-formats.1*
574 %{_mandir}/man1/ffmpeg-protocols.1*
575 %{_mandir}/man1/ffmpeg-resampler.1*
576 %{_mandir}/man1/ffmpeg-scaler.1*
577 %{_mandir}/man1/ffmpeg-utils.1*
578 %{_mandir}/man1/ffprobe.1*
579 %{_mandir}/man1/ffprobe-all.1*
580 %endif
581
582 %files libs
583 %defattr(644,root,root,755)
584 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
585 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.55
586 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
587 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.55
588 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
589 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.4
590 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
591 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.55
592 %attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
593 %attr(755,root,root) %ghost %{_libdir}/libavresample.so.1
594 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
595 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.52
596 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
597 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.52
598 %attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
599 %attr(755,root,root) %ghost %{_libdir}/libswresample.so.0
600 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
601 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.2
602
603 %files devel
604 %defattr(644,root,root,755)
605 %doc doc/optimization.txt
606 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
607 %attr(755,root,root) %{_libdir}/libavcodec.so
608 %attr(755,root,root) %{_libdir}/libavdevice.so
609 %attr(755,root,root) %{_libdir}/libavfilter.so
610 %attr(755,root,root) %{_libdir}/libavformat.so
611 %attr(755,root,root) %{_libdir}/libavresample.so
612 %attr(755,root,root) %{_libdir}/libavutil.so
613 %attr(755,root,root) %{_libdir}/libpostproc.so
614 %attr(755,root,root) %{_libdir}/libswresample.so
615 %attr(755,root,root) %{_libdir}/libswscale.so
616 %{_includedir}/ffmpeg
617 %{_includedir}/libavcodec
618 %{_includedir}/libavdevice
619 %{_includedir}/libavfilter
620 %{_includedir}/libavformat
621 %{_includedir}/libavresample
622 %{_includedir}/libavutil
623 %{_includedir}/libpostproc
624 %{_includedir}/libswresample
625 %{_includedir}/libswscale
626 %{_pkgconfigdir}/libavcodec.pc
627 %{_pkgconfigdir}/libavdevice.pc
628 %{_pkgconfigdir}/libavfilter.pc
629 %{_pkgconfigdir}/libavformat.pc
630 %{_pkgconfigdir}/libavresample.pc
631 %{_pkgconfigdir}/libavutil.pc
632 %{_pkgconfigdir}/libpostproc.pc
633 %{_pkgconfigdir}/libswresample.pc
634 %{_pkgconfigdir}/libswscale.pc
635 %if %{with doc}
636 %{_mandir}/man3/libavcodec.3*
637 %{_mandir}/man3/libavdevice.3*
638 %{_mandir}/man3/libavfilter.3*
639 %{_mandir}/man3/libavformat.3*
640 %{_mandir}/man3/libavutil.3*
641 %{_mandir}/man3/libswresample.3*
642 %{_mandir}/man3/libswscale.3*
643 %endif
644
645 %files static
646 %defattr(644,root,root,755)
647 %{_libdir}/libavcodec.a
648 %{_libdir}/libavdevice.a
649 %{_libdir}/libavfilter.a
650 %{_libdir}/libavformat.a
651 %{_libdir}/libavresample.a
652 %{_libdir}/libavutil.a
653 %{_libdir}/libpostproc.a
654 %{_libdir}/libswresample.a
655 %{_libdir}/libswscale.a
656
657 %files ffplay
658 %defattr(644,root,root,755)
659 %attr(755,root,root) %{_bindir}/ffplay
660 %if %{with doc}
661 %{_mandir}/man1/ffplay.1*
662 %{_mandir}/man1/ffplay-all.1*
663 %endif
664
665 %files ffserver
666 %defattr(644,root,root,755)
667 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
668 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
669 %attr(755,root,root) %{_sbindir}/ffserver
670 %attr(754,root,root) /etc/rc.d/init.d/ffserver
671 %if %{with doc}
672 %{_mandir}/man1/ffserver.1*
673 %{_mandir}/man1/ffserver-all.1*
674 %endif
675 %dir %attr(770,root,ffserver) /var/cache/ffserver
676 %dir %attr(770,root,ffserver) /var/log/ffserver
677
678 %if %{with doc}
679 %files doc
680 %defattr(644,root,root,755)
681 %doc doc/*.html
682 %endif
This page took 0.078915 seconds and 4 git commands to generate.