]>
Commit | Line | Data |
---|---|---|
197f4211 | 1 | # |
5663f846 JB |
2 | # How to deal with ffmpeg/opencv checken-egg problem: |
3 | # 1. make-request -r --without opencv ffmpeg.spec | |
192f9f57 | 4 | # 2. make-request -r opencv.spec |
5 | # 3. bump release of ffmpeg.spec | |
6 | # 4. make-request -r ffmpeg.spec | |
7 | # | |
2b3b2117 | 8 | # Conditional build: |
38cefaee | 9 | %bcond_with nonfree # non free options of package (currently: faac) |
2e585b44 | 10 | %bcond_with aacplus # AAC+ encoding via libaacplus (requires nonfree) |
294c9b1e | 11 | %bcond_without autoreqdep # don't care about package name deps generated by rpm |
d7a39558 | 12 | %bcond_without frei0r # build without frei0r video filtering |
d5aef92e | 13 | %bcond_without openal # build without OpenAL 1.1 capture support |
192f9f57 | 14 | %bcond_without opencv # build without opencv video filtering |
d5aef92e | 15 | %bcond_without pulseaudio # build without PulseAudio input support |
ea09f25d | 16 | %bcond_without x264 # build without x264 encoder |
daf9a670 | 17 | %bcond_without utvideo # build without Ut Video decoder |
1ef27ea1 JB |
18 | %bcond_without va # VAAPI (Video Acceleration API) |
19 | %bcond_without vpx # VP8, a high-quality video codec | |
20 | %bcond_without doc # don't build docs | |
314ef0df | 21 | |
cbdd2688 JB |
22 | Summary: FFmpeg - a very fast video and audio converter |
23 | Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo | |
9fc4ad22 | 24 | Name: ffmpeg |
ae5be86b JB |
25 | Version: 0.11.2 |
26 | Release: 1 | |
9cf4d8a4 | 27 | # LGPL or GPL, chosen at configure time (GPL version is more featured) |
38cefaee JB |
28 | # (postprocessing, some filters, x264, xavs, xvid, x11grab) |
29 | # using v3 allows Apache-licensed libs (opencore-amr, libvo-*enc) | |
0b43f655 | 30 | License: GPL v3+ with LGPL v3+ parts |
fde29260 | 31 | Group: Applications/Multimedia |
1ef27ea1 | 32 | Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.bz2 |
ae5be86b | 33 | # Source0-md5: 93c1908022567b321df74db7214da6ac |
fde29260 ER |
34 | Source1: ffserver.init |
35 | Source2: ffserver.sysconfig | |
38cf6de3 | 36 | Source3: ffserver.conf |
5663f846 | 37 | Patch0: %{name}-gsm.patch |
3eef5ddf | 38 | Patch1: %{name}-opencv24.patch |
ae5be86b | 39 | Patch2: %{name}-openjpeg.patch |
85f7cea1 | 40 | URL: http://www.ffmpeg.org/ |
d5aef92e | 41 | %{?with_openal:BuildRequires: OpenAL-devel} |
3dcb8642 | 42 | BuildRequires: SDL-devel >= 1.2.1 |
cbdd2688 | 43 | BuildRequires: alsa-lib-devel |
38cefaee | 44 | BuildRequires: bzip2-devel |
9f9ba8ac | 45 | BuildRequires: celt-devel >= 0.11.0 |
38cefaee | 46 | %{?with_nonfree:BuildRequires: faac-devel} |
3dcb8642 | 47 | BuildRequires: fontconfig-devel |
2a60eebe | 48 | BuildRequires: freetype-devel |
d7a39558 | 49 | %{?with_frei0r:BuildRequires: frei0r-devel} |
4bee03f0 JB |
50 | %ifarch ppc |
51 | # require version with altivec support fixed | |
52 | BuildRequires: gcc >= 5:3.3.2-3 | |
53 | %endif | |
d5aef92e | 54 | BuildRequires: gnutls-devel |
cbdd2688 JB |
55 | BuildRequires: jack-audio-connection-kit-devel |
56 | BuildRequires: lame-libs-devel >= 3.98.3 | |
2e585b44 | 57 | %{?with_aacplus:BuildRequires: libaacplus-devel >= 2.0.0} |
d5aef92e | 58 | BuildRequires: libass-devel |
3dcb8642 | 59 | BuildRequires: libbluray-devel |
d5aef92e | 60 | BuildRequires: libcdio-devel |
9c4296c2 | 61 | BuildRequires: libdc1394-devel >= 2 |
f1669449 | 62 | BuildRequires: libgsm-devel |
d5aef92e | 63 | BuildRequires: libmodplug-devel |
4a927f9d | 64 | BuildRequires: libnut-devel |
7571bfa0 | 65 | BuildRequires: libraw1394-devel >= 2 |
cbdd2688 | 66 | BuildRequires: librtmp-devel |
9042663c | 67 | BuildRequires: libtheora-devel >= 1.0-0.beta3 |
4814ac84 | 68 | BuildRequires: libtool >= 2:1.4d-3 |
daf9a670 | 69 | BuildRequires: libv4l-devel |
64f8f109 | 70 | %{?with_va:BuildRequires: libva-devel >= 1.0.3} |
9c4296c2 | 71 | BuildRequires: libvdpau-devel >= 0.2 |
e380e18a | 72 | BuildRequires: libvorbis-devel |
065be88e | 73 | %{?with_vpx:BuildRequires: libvpx-devel >= 0.9.6} |
660918c5 AM |
74 | # X264_BUILD >= 118 |
75 | %{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245} | |
0b43f655 | 76 | BuildRequires: opencore-amr-devel |
192f9f57 | 77 | %{?with_opencv:BuildRequires: opencv-devel} |
ae5be86b | 78 | BuildRequires: openjpeg-devel >= 1.5 |
d5aef92e | 79 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel} |
17a2d1a8 | 80 | BuildRequires: speex-devel >= 1:1.2-rc1 |
e1fe03f7 | 81 | %ifarch %{ix86} |
82 | %ifnarch i386 i486 | |
76243dbd JB |
83 | BuildRequires: nasm |
84 | %endif | |
e1fe03f7 | 85 | %endif |
136f0f45 | 86 | BuildRequires: perl-Encode |
1463656a | 87 | BuildRequires: perl-tools-pod |
ef3c0513 | 88 | BuildRequires: pkgconfig |
db8052c8 | 89 | BuildRequires: rpmbuild(macros) >= 1.470 |
126fb805 | 90 | BuildRequires: schroedinger-devel |
64f8f109 ER |
91 | %{?with_doc:BuildRequires: tetex} |
92 | %{?with_doc:BuildRequires: texi2html} | |
93 | %{?with_doc:BuildRequires: texinfo} | |
daf9a670 | 94 | %{?with_utvideo:BuildRequires: utvideo-devel} |
986e22a5 | 95 | BuildRequires: yasm |
5dc039cb JB |
96 | BuildRequires: vo-aacenc-devel |
97 | BuildRequires: vo-amrwbenc-devel | |
98 | BuildRequires: xavs-devel | |
cbdd2688 JB |
99 | BuildRequires: xorg-lib-libXext-devel |
100 | BuildRequires: xorg-lib-libXfixes-devel | |
46f2a56b | 101 | BuildRequires: xvid-devel >= 1:1.1.0 |
33a1c0f3 | 102 | BuildRequires: zlib-devel |
57ebb8ad | 103 | %{?with_autoreqdep:BuildConflicts: libpostproc} |
9c4296c2 JB |
104 | # overflows maximum hash table size |
105 | BuildConflicts: pdksh < 5.2.14-57 | |
54ec280e | 106 | Requires: %{name}-libs = %{version}-%{release} |
839e806f | 107 | Requires: xvid >= 1:1.1.0 |
af49d6ab | 108 | Obsoletes: libpostproc |
539b540f | 109 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9fc4ad22 | 110 | |
2a60eebe JB |
111 | %define _noautoreqdep libGL.so.1 libGLU.so.1 |
112 | ||
c01d7857 PS |
113 | %define specflags -fno-strict-aliasing |
114 | ||
115 | # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one) | |
116 | %define specflags_ia32 -fomit-frame-pointer | |
117 | # -mmmx is needed to enable <mmintrin.h> code. | |
118 | %define specflags_i586 -mmmx | |
119 | %define specflags_i686 -mmmx | |
1162803a | 120 | %define specflags_ppc -fPIC |
c01d7857 | 121 | |
9fc4ad22 | 122 | %description |
85f7cea1 ER |
123 | FFmpeg is a complete solution to record, convert and stream audio and |
124 | video. It is a command line tool to convert one video file format to | |
125 | another. It also supports grabbing and encoding in real time from a TV | |
126 | card. | |
9fc4ad22 | 127 | |
cdb7b42e | 128 | %description -l pl.UTF-8 |
cbdd2688 JB |
129 | FFmpeg to kompletne rozwiązanie nagrywania, konwersji i transmisji |
130 | strumieni dźwięku i obrazu. Jest to działające z linii poleceń | |
131 | narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje | |
132 | także przechwytywanie i kodowanie w czasie rzeczywistym z karty | |
133 | telewizyjnej. | |
9fc4ad22 | 134 | |
54ec280e PG |
135 | %package libs |
136 | Summary: ffmpeg libraries | |
adcc0f76 | 137 | Summary(pl.UTF-8): Biblioteki ffmpeg |
54ec280e PG |
138 | Group: Libraries |
139 | ||
140 | %description libs | |
cbdd2688 JB |
141 | This package contains the ffmpeg shared libraries: |
142 | - the codec library (libavcodec). It supports most existing encoding | |
143 | formats (MPEG, DivX, MPEG4, AC3, DV...), | |
144 | - demuxer library (libavformat). It supports most existing file | |
145 | formats (AVI, MPEG, OGG, Matroska, ASF...), | |
146 | - video postprocessing library (libpostproc). | |
54ec280e | 147 | |
cdb7b42e | 148 | %description libs -l pl.UTF-8 |
cbdd2688 JB |
149 | Ten pakiet zawiera biblioteki współdzielone ffmpeg: |
150 | - bibliotekę kodeków (libavcodec); obsługuje większość istniejących | |
151 | formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...), | |
152 | - bibliotekę demuksera (libavformat); obsługuje większość istniejących | |
153 | formatów plików (AVI, MPEG, OGG, Matroska, ASF...), | |
154 | - bibliotekę postprocessingu (libpostproc). | |
54ec280e | 155 | |
af49d6ab JB |
156 | %package devel |
157 | Summary: ffmpeg header files | |
adcc0f76 | 158 | Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg |
af49d6ab | 159 | Group: Development/Libraries |
54ec280e | 160 | Requires: %{name}-libs = %{version}-%{release} |
38cefaee | 161 | # Libs.private from *.pc (unreasonably they are all the same) |
3dcb8642 | 162 | Requires: SDL-devel >= 1.2.1 |
38cefaee JB |
163 | Requires: alsa-lib-devel |
164 | Requires: bzip2-devel | |
9c4296c2 | 165 | Requires: celt-devel >= 0.11.0 |
38cefaee | 166 | %{?with_nonfree:Requires: faac-devel} |
3dcb8642 JB |
167 | Requires: fontconfig-devel |
168 | Requires: freetype-devel | |
38cefaee JB |
169 | Requires: jack-audio-connection-kit-devel |
170 | Requires: lame-libs-devel >= 3.98.3 | |
3dcb8642 | 171 | Requires: libbluray-devel |
9c4296c2 | 172 | Requires: libdc1394-devel >= 2 |
bf479bc6 | 173 | Requires: libgsm-devel |
4a927f9d | 174 | Requires: libnut-devel |
7571bfa0 | 175 | Requires: libraw1394-devel >= 2 |
38cefaee JB |
176 | Requires: librtmp-devel |
177 | Requires: libtheora-devel >= 1.0-0.beta3 | |
178 | %{?with_va:Requires: libva-devel >= 1.0.3} | |
33a1c0f3 | 179 | Requires: libvorbis-devel |
38cefaee | 180 | %{?with_vpx:Requires: libvpx-devel >= 0.9.6} |
ea09f25d | 181 | %{?with_x264:Requires: libx264-devel >= 0.1.3-1.20110625_2245} |
38cefaee | 182 | Requires: opencore-amr-devel |
ae5be86b | 183 | Requires: openjpeg-devel >= 1.5 |
38cefaee JB |
184 | Requires: schroedinger-devel |
185 | Requires: speex-devel >= 1:1.2-rc1 | |
186 | Requires: vo-aacenc-devel | |
187 | Requires: vo-amrwbenc-devel | |
188 | Requires: xavs-devel | |
189 | Requires: xorg-lib-libXext-devel | |
190 | Requires: xorg-lib-libXfixes-devel | |
46f2a56b | 191 | Requires: xvid-devel >= 1:1.1.0 |
33a1c0f3 | 192 | Requires: zlib-devel |
8152d6a2 | 193 | Obsoletes: libpostproc-devel |
af49d6ab JB |
194 | |
195 | %description devel | |
196 | ffmpeg header files. | |
197 | ||
cdb7b42e JR |
198 | %description devel -l pl.UTF-8 |
199 | Pliki nagłówkowe ffmpeg. | |
af49d6ab JB |
200 | |
201 | %package static | |
202 | Summary: ffmpeg static libraries | |
adcc0f76 | 203 | Summary(pl.UTF-8): Statyczne biblioteki ffmpeg |
af49d6ab JB |
204 | Group: Development/Libraries |
205 | Requires: %{name}-devel = %{version}-%{release} | |
206 | ||
207 | %description static | |
208 | ffmpeg static libraries (libavcodec and libavformat). | |
209 | ||
cdb7b42e | 210 | %description static -l pl.UTF-8 |
af49d6ab JB |
211 | Statyczne biblioteki ffmpeg (libavcodec i libavformat). |
212 | ||
2a60eebe JB |
213 | %package ffplay |
214 | Summary: FFplay - SDL-based media player | |
adcc0f76 | 215 | Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL |
2a60eebe | 216 | Group: Applications/Multimedia |
54ec280e | 217 | Requires: %{name}-libs = %{version}-%{release} |
2a60eebe JB |
218 | |
219 | %description ffplay | |
220 | FFplay is a very simple and portable media player using the FFmpeg | |
221 | libraries and the SDL library. It is mostly used as a test bench for | |
222 | the various APIs of FFmpeg. | |
223 | ||
cdb7b42e JR |
224 | %description ffplay -l pl.UTF-8 |
225 | FFplay to bardzo prosty i przenośny odtwarzacz mediów używający | |
226 | bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do | |
227 | testowania różnych API FFmpeg. | |
2a60eebe | 228 | |
fde29260 ER |
229 | %package ffserver |
230 | Summary: FFserver video server | |
adcc0f76 | 231 | Summary(pl.UTF-8): FFserver - serwer strumieni obrazu |
fde29260 | 232 | Group: Daemons |
593d3a64 | 233 | Requires(post,preun): /sbin/chkconfig |
67103923 | 234 | Requires: %{name}-libs = %{version}-%{release} |
2305d791 | 235 | Requires: rc-scripts >= 0.4.0.10 |
fde29260 ER |
236 | |
237 | %description ffserver | |
238 | FFserver is a streaming server for both audio and video. It supports | |
239 | several live feeds, streaming from files and time shifting on live | |
240 | feeds (you can seek to positions in the past on each live feed, | |
241 | provided you specify a big enough feed storage in ffserver.conf). | |
242 | ||
cdb7b42e JR |
243 | %description ffserver -l pl.UTF-8 |
244 | FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka | |
245 | źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w | |
246 | czasie dla źródeł na żywo (można przeskakiwać na położenia w | |
247 | przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio | |
248 | dużej przestrzeni na dane skonfigurowanej w ffserver.conf). | |
4e0bd1da | 249 | |
9fc4ad22 | 250 | %prep |
aed8e8c9 | 251 | %setup -q |
f1669449 | 252 | %patch0 -p1 |
3eef5ddf | 253 | %patch1 -p0 |
ae5be86b | 254 | %patch2 -p1 |
9fc4ad22 | 255 | |
9d4f8977 ER |
256 | # package the grep result for mplayer, the result formatted as ./mplayer/configure |
257 | cat <<EOF > ffmpeg-avconfig | |
2b2445b7 ER |
258 | #! /bin/sh |
259 | _libavdecoders_all="`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" | |
260 | _libavencoders_all="`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" | |
261 | _libavparsers_all="`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" | |
262 | _libavbsfs_all="`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" | |
263 | _libavdemuxers_all="`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`" | |
264 | _libavmuxers_all="`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`" | |
265 | _libavprotocols_all="`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`" | |
266 | EOF | |
9d4f8977 | 267 | cat <<'EOF' >> ffmpeg-avconfig |
2b2445b7 ER |
268 | |
269 | case "$1" in | |
270 | --decoders) | |
271 | echo $_libavdecoders_all | |
272 | ;; | |
273 | --encoders) | |
274 | echo $_libavencoders_all | |
275 | ;; | |
276 | --parsers) | |
277 | echo $_libavparsers_all | |
278 | ;; | |
279 | --bsfs) | |
280 | echo $_libavbsfs_all | |
281 | ;; | |
282 | --demuxers) | |
283 | echo $_libavdemuxers_all | |
284 | ;; | |
285 | --muxers) | |
286 | echo $_libavmuxers_all | |
287 | ;; | |
288 | --protocols) | |
289 | echo $_libavprotocols_all | |
290 | ;; | |
291 | *) | |
292 | cat <<USAGE | |
293 | Usage: $0 [OPTION] | |
294 | Options: | |
295 | --decoders | |
296 | --encoders | |
297 | --parsers | |
298 | --bsfs | |
299 | --demuxers | |
300 | --muxers | |
301 | --protocols | |
302 | USAGE | |
303 | exit 1;; | |
304 | esac | |
305 | ||
306 | exit 0 | |
307 | EOF | |
308 | ||
9fc4ad22 | 309 | %build |
05e1eb2f JB |
310 | # notes: |
311 | # - it's not autoconf configure | |
d0a0ec26 | 312 | # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags |
2080d1d3 | 313 | ./configure \ |
b4680d0b | 314 | --arch=%{_target_base_arch} \ |
539b540f | 315 | --prefix=%{_prefix} \ |
9cf4d8a4 | 316 | --libdir=%{_libdir} \ |
d81dfa95 | 317 | --shlibdir=%{_libdir} \ |
2a60eebe | 318 | --mandir=%{_mandir} \ |
314ef0df | 319 | --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \ |
1162803a | 320 | --extra-ldflags="%{rpmcflags} %{rpmldflags}" \ |
3eef5ddf | 321 | --cc="%{__cc}" \ |
126fb805 JB |
322 | --disable-debug \ |
323 | --disable-optimizations \ | |
6382c99d | 324 | --disable-stripping \ |
314ef0df | 325 | --enable-avfilter \ |
0797daec | 326 | --enable-avresample \ |
d5aef92e | 327 | --enable-gnutls \ |
126fb805 | 328 | --enable-gpl \ |
0b43f655 | 329 | --enable-version3 \ |
3dcb8642 | 330 | --enable-fontconfig \ |
d7a39558 | 331 | %{?with_frei0r:--enable-frei0r} \ |
2e585b44 | 332 | %{?with_aacplus:--enable-libaacplus} \ |
d5aef92e | 333 | --enable-libass \ |
3dcb8642 | 334 | --enable-libbluray \ |
cbdd2688 | 335 | --enable-libcelt \ |
d5aef92e JB |
336 | --enable-libcdio \ |
337 | --enable-libdc1394 \ | |
3dcb8642 | 338 | --enable-libfreetype \ |
f3692243 | 339 | --enable-libgsm \ |
d5aef92e | 340 | --enable-libmodplug \ |
15c15700 | 341 | --enable-libmp3lame \ |
4a927f9d | 342 | --enable-libnut \ |
cbdd2688 JB |
343 | --enable-libopencore-amrnb \ |
344 | --enable-libopencore-amrwb \ | |
192f9f57 | 345 | %{?with_opencv:--enable-libopencv} \ |
cbdd2688 | 346 | --enable-libopenjpeg \ |
d5aef92e | 347 | %{?with_pulseaudio:--enable-libpulse} \ |
cbdd2688 | 348 | --enable-librtmp \ |
126fb805 | 349 | --enable-libschroedinger \ |
da99dcf2 | 350 | --enable-libspeex \ |
126fb805 | 351 | --enable-libtheora \ |
daf9a670 | 352 | %{?with_utvideo:--enable-libutvideo} \ |
d5aef92e | 353 | --enable-libv4l2 \ |
5dc039cb JB |
354 | --enable-libvo-aacenc \ |
355 | --enable-libvo-amrwbenc \ | |
126fb805 | 356 | --enable-libvorbis \ |
64f8f109 | 357 | %{?with_vpx:--enable-libvpx} \ |
ea09f25d | 358 | %{?with_x264:--enable-libx264} \ |
5dc039cb | 359 | --enable-libxavs \ |
126fb805 | 360 | --enable-libxvid \ |
d5aef92e | 361 | %{?with_openal:--enable-openal} \ |
6382c99d | 362 | --enable-postproc \ |
d7493de8 | 363 | --enable-pthreads \ |
9cf4d8a4 | 364 | --enable-shared \ |
6382c99d | 365 | --enable-swscale \ |
0b43f655 | 366 | --enable-vdpau \ |
75231f25 | 367 | --enable-x11grab \ |
7a286645 | 368 | %ifnarch %{ix86} %{x8664} |
e1fe03f7 | 369 | --disable-mmx \ |
370 | %endif | |
371 | %ifarch i386 i486 | |
05e1eb2f | 372 | --disable-mmx \ |
b524cd99 | 373 | %endif |
0b43f655 | 374 | %if %{with nonfree} |
48610c64 | 375 | --enable-nonfree \ |
0b43f655 | 376 | --enable-libfaac \ |
76243dbd | 377 | %endif |
75231f25 | 378 | --enable-runtime-cpudetect |
2305d791 | 379 | |
da99dcf2 | 380 | # force oldscaler build |
b8c60172 | 381 | %{__sed} -i -e 's|#define.*CONFIG_OLDSCALER.*0|#define CONFIG_OLDSCALER 1|g' config.h |
da99dcf2 | 382 | |
1ef27ea1 JB |
383 | %{__make} \ |
384 | V=1 | |
9fc4ad22 | 385 | |
b8c60172 ER |
386 | # CC_O to add -c to commandline. makefile should be patched |
387 | %{__make} tools/qt-faststart V=1 CC_O='-c -o $@' | |
388 | ||
9fc4ad22 AM |
389 | %install |
390 | rm -rf $RPM_BUILD_ROOT | |
38cf6de3 | 391 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \ |
38baa0f1 | 392 | $RPM_BUILD_ROOT%{_includedir}/ffmpeg \ |
38cf6de3 | 393 | $RPM_BUILD_ROOT/var/{cache,log}/ffserver |
9fc4ad22 | 394 | |
539b540f | 395 | %{__make} install \ |
1ef27ea1 JB |
396 | DESTDIR=$RPM_BUILD_ROOT \ |
397 | V=1 | |
539b540f | 398 | |
544421b2 ER |
399 | cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg |
400 | cp -a libavutil/intreadwrite.h $RPM_BUILD_ROOT%{_includedir}/libavutil | |
401 | cp -a libavutil/bswap.h $RPM_BUILD_ROOT%{_includedir}/libavutil | |
402 | cp -a libavutil/common.h $RPM_BUILD_ROOT%{_includedir}/libavutil | |
403 | cp -a libavutil/mem.h $RPM_BUILD_ROOT%{_includedir}/libavutil | |
404 | for a in libavutil/*/bswap.h; do | |
405 | install -D $a $RPM_BUILD_ROOT%{_includedir}/$a | |
406 | done | |
9d4f8977 ER |
407 | cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat |
408 | cp -a libavformat/avio.h $RPM_BUILD_ROOT%{_includedir}/libavformat | |
980e7aa8 JB |
409 | # for lim-omx ffmpeg components |
410 | cp -a libavcodec/audioconvert.h $RPM_BUILD_ROOT%{_includedir}/libavcodec | |
544421b2 | 411 | |
b8c60172 ER |
412 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver |
413 | cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver | |
414 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf | |
539b540f | 415 | mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver |
b8c60172 | 416 | install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir} |
9fc4ad22 | 417 | |
2b2445b7 ER |
418 | # install as ffmpeg-avconfig to avoid with possible programs looking for |
419 | # ffmpeg-config and expecting --libs output from it which is not implemented | |
420 | # simple to do (by querying pkgconfig), but why? | |
b8c60172 | 421 | install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig |
2b2445b7 | 422 | |
9fc4ad22 AM |
423 | %clean |
424 | rm -rf $RPM_BUILD_ROOT | |
425 | ||
1ef27ea1 JB |
426 | %post libs -p /sbin/ldconfig |
427 | %postun libs -p /sbin/ldconfig | |
539b540f | 428 | |
38cf6de3 ER |
429 | %pre ffserver |
430 | %groupadd -g 167 ffserver | |
431 | %useradd -g ffserver -u 167 ffserver | |
432 | ||
593d3a64 ER |
433 | %post ffserver |
434 | /sbin/chkconfig --add ffserver | |
435 | %service ffserver restart | |
436 | ||
38cf6de3 | 437 | %preun ffserver |
593d3a64 ER |
438 | if [ "$1" = 0 ]; then |
439 | %service ffserver stop | |
440 | /sbin/chkconfig --del ffserver | |
441 | fi | |
442 | ||
38cf6de3 ER |
443 | %postun ffserver |
444 | if [ "$1" = 0 ]; then | |
445 | %userremove ffserver | |
446 | %groupremove ffserver | |
447 | fi | |
448 | ||
9fc4ad22 AM |
449 | %files |
450 | %defattr(644,root,root,755) | |
660918c5 | 451 | %doc CREDITS LICENSE MAINTAINERS README doc/{APIchanges,RELEASE_NOTES} %{?with_doc:doc/*.html} |
2a60eebe | 452 | %attr(755,root,root) %{_bindir}/ffmpeg |
3a7b84be | 453 | %attr(755,root,root) %{_bindir}/ffprobe |
b7313442 | 454 | %attr(755,root,root) %{_bindir}/qt-faststart |
da99dcf2 AM |
455 | %dir %{_datadir}/ffmpeg |
456 | %{_datadir}/ffmpeg/*.ffpreset | |
714dcf83 | 457 | %{_datadir}/ffmpeg/ffprobe.xsd |
64f8f109 ER |
458 | %{?with_doc:%{_mandir}/man1/ffmpeg.1*} |
459 | %{?with_doc:%{_mandir}/man1/ffprobe.1*} | |
54ec280e PG |
460 | |
461 | %files libs | |
462 | %defattr(644,root,root,755) | |
f50f7d7c | 463 | %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.* |
5663f846 | 464 | %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.54 |
d0a0ec26 | 465 | %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.* |
5663f846 | 466 | %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.54 |
314ef0df | 467 | %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.* |
cbdd2688 | 468 | %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.2 |
f50f7d7c | 469 | %attr(755,root,root) %{_libdir}/libavformat.so.*.*.* |
5663f846 JB |
470 | %attr(755,root,root) %ghost %{_libdir}/libavformat.so.54 |
471 | %attr(755,root,root) %{_libdir}/libavresample.so.*.*.* | |
472 | %attr(755,root,root) %ghost %{_libdir}/libavresample.so.0 | |
f50f7d7c | 473 | %attr(755,root,root) %{_libdir}/libavutil.so.*.*.* |
cbdd2688 | 474 | %attr(755,root,root) %ghost %{_libdir}/libavutil.so.51 |
d7493de8 | 475 | %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.* |
714dcf83 | 476 | %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.52 |
660918c5 AM |
477 | %attr(755,root,root) %{_libdir}/libswresample.so.*.*.* |
478 | %attr(755,root,root) %ghost %{_libdir}/libswresample.so.0 | |
ee032235 | 479 | %attr(755,root,root) %{_libdir}/libswscale.so.*.*.* |
cbdd2688 | 480 | %attr(755,root,root) %ghost %{_libdir}/libswscale.so.2 |
314ef0df | 481 | |
539b540f JB |
482 | %files devel |
483 | %defattr(644,root,root,755) | |
54ec280e | 484 | %doc doc/optimization.txt |
1ef27ea1 | 485 | %attr(755,root,root) %{_bindir}/ffmpeg-avconfig |
539b540f | 486 | %attr(755,root,root) %{_libdir}/libavcodec.so |
d0a0ec26 | 487 | %attr(755,root,root) %{_libdir}/libavdevice.so |
314ef0df | 488 | %attr(755,root,root) %{_libdir}/libavfilter.so |
539b540f | 489 | %attr(755,root,root) %{_libdir}/libavformat.so |
5663f846 | 490 | %attr(755,root,root) %{_libdir}/libavresample.so |
d7493de8 | 491 | %attr(755,root,root) %{_libdir}/libavutil.so |
d2af4612 | 492 | %attr(755,root,root) %{_libdir}/libpostproc.so |
660918c5 | 493 | %attr(755,root,root) %{_libdir}/libswresample.so |
ee032235 | 494 | %attr(755,root,root) %{_libdir}/libswscale.so |
539b540f | 495 | %{_includedir}/ffmpeg |
6382c99d AM |
496 | %{_includedir}/libavcodec |
497 | %{_includedir}/libavdevice | |
314ef0df | 498 | %{_includedir}/libavfilter |
6382c99d | 499 | %{_includedir}/libavformat |
5663f846 | 500 | %{_includedir}/libavresample |
6382c99d AM |
501 | %{_includedir}/libavutil |
502 | %{_includedir}/libpostproc | |
660918c5 | 503 | %{_includedir}/libswresample |
6382c99d | 504 | %{_includedir}/libswscale |
1ef27ea1 JB |
505 | %{_pkgconfigdir}/libavcodec.pc |
506 | %{_pkgconfigdir}/libavdevice.pc | |
507 | %{_pkgconfigdir}/libavfilter.pc | |
508 | %{_pkgconfigdir}/libavformat.pc | |
5663f846 | 509 | %{_pkgconfigdir}/libavresample.pc |
1ef27ea1 JB |
510 | %{_pkgconfigdir}/libavutil.pc |
511 | %{_pkgconfigdir}/libpostproc.pc | |
660918c5 | 512 | %{_pkgconfigdir}/libswresample.pc |
1ef27ea1 | 513 | %{_pkgconfigdir}/libswscale.pc |
539b540f | 514 | |
9cf4d8a4 JB |
515 | %files static |
516 | %defattr(644,root,root,755) | |
1ef27ea1 JB |
517 | %{_libdir}/libavcodec.a |
518 | %{_libdir}/libavdevice.a | |
519 | %{_libdir}/libavfilter.a | |
520 | %{_libdir}/libavformat.a | |
5663f846 | 521 | %{_libdir}/libavresample.a |
1ef27ea1 JB |
522 | %{_libdir}/libavutil.a |
523 | %{_libdir}/libpostproc.a | |
660918c5 | 524 | %{_libdir}/libswresample.a |
1ef27ea1 | 525 | %{_libdir}/libswscale.a |
af49d6ab JB |
526 | |
527 | %files ffplay | |
528 | %defattr(644,root,root,755) | |
529 | %attr(755,root,root) %{_bindir}/ffplay | |
64f8f109 | 530 | %{?with_doc:%{_mandir}/man1/ffplay.1*} |
af49d6ab | 531 | |
fde29260 ER |
532 | %files ffserver |
533 | %defattr(644,root,root,755) | |
534 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf | |
535 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver | |
536 | %attr(755,root,root) %{_sbindir}/ffserver | |
537 | %attr(754,root,root) /etc/rc.d/init.d/ffserver | |
64f8f109 | 538 | %{?with_doc:%{_mandir}/man1/ffserver.1*} |
38cf6de3 ER |
539 | %dir %attr(770,root,ffserver) /var/cache/ffserver |
540 | %dir %attr(770,root,ffserver) /var/log/ffserver |