]>
Commit | Line | Data |
---|---|---|
94447fde | 1 | # TODO |
328d1431 | 2 | # - libnut enabled no (http://www.nut-container.org/) |
197f4211 | 3 | # |
2b3b2117 | 4 | # Conditional build: |
48610c64 | 5 | %bcond_with amr # 3GPP Adaptive Multi Rate (AMR) codec support; makes package non-distributable |
294c9b1e JB |
6 | %bcond_without autoreqdep # don't care about package name deps generated by rpm |
7 | %bcond_without imlib2 # don't build imlib2 vhook module | |
874f67c9 | 8 | # |
d0a0ec26 | 9 | %define _snap 2008-01-31 |
2305d791 | 10 | %define snap %(echo %{_snap} | tr -d -) |
6778cc1e | 11 | %define _rel 1 |
76243dbd | 12 | Summary: Realtime audio/video encoder and streaming server |
adcc0f76 | 13 | Summary(pl.UTF-8): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni |
9fc4ad22 | 14 | Name: ffmpeg |
c32b589f | 15 | Version: 0.4.9 |
72c23aa0 | 16 | Release: 4.%{snap}.%{_rel} |
9cf4d8a4 | 17 | # LGPL or GPL, chosen at configure time (GPL version is more featured) |
48610c64 | 18 | # (postprocessing, ac3, xvid, x264, faad) |
be868f35 | 19 | License: GPL v2+ with LGPL v2.1+ parts |
fde29260 | 20 | Group: Applications/Multimedia |
d7493de8 | 21 | #Source0: http://dl.sourceforge.net/ffmpeg/%{name}-%{version}-pre1.tar.gz |
2305d791 | 22 | Source0: http://ffmpeg.mplayerhq.hu/%{name}-export-snapshot.tar.bz2 |
d0a0ec26 | 23 | # Source0-md5: 6c8b32545838a4090348b93d5195bd08 |
fde29260 ER |
24 | Source1: ffserver.init |
25 | Source2: ffserver.sysconfig | |
38cf6de3 | 26 | Source3: ffserver.conf |
52e0a780 ER |
27 | Patch0: %{name}-gcc4.patch |
28 | Patch1: %{name}-img_convert_symbol.patch | |
48610c64 | 29 | Patch2: %{name}-pkgconfig-lib64.patch |
d2fa6a1d | 30 | URL: http://ffmpeg.mplayerhq.hu/ |
2a60eebe | 31 | BuildRequires: SDL-devel |
fc8de229 | 32 | %if %{with amr} |
7e9547bc JB |
33 | BuildRequires: amrnb-devel >= 6.1.0.4 |
34 | BuildRequires: amrwb-devel >= 7.0.0.1 | |
fc8de229 | 35 | %endif |
e380e18a | 36 | BuildRequires: faac-devel |
b959c224 | 37 | BuildRequires: faad2-devel |
2a60eebe | 38 | BuildRequires: freetype-devel |
4bee03f0 JB |
39 | %ifarch ppc |
40 | # require version with altivec support fixed | |
41 | BuildRequires: gcc >= 5:3.3.2-3 | |
42 | %endif | |
15c15700 | 43 | %{?with_imlib2:BuildRequires: imlib2-devel >= 1.3.0} |
e380e18a | 44 | BuildRequires: lame-libs-devel |
f3692243 | 45 | BuildRequires: libgsm-devel |
94447fde | 46 | BuildRequires: libraw1394-devel |
6bbd46a6 | 47 | BuildRequires: libtheora-devel >= 1.0-0.alpha7 |
4814ac84 | 48 | BuildRequires: libtool >= 2:1.4d-3 |
e380e18a | 49 | BuildRequires: libvorbis-devel |
42dd6e0f | 50 | BuildRequires: libx264-devel >= 0.1.2-1.20061024_2245.1 |
e1fe03f7 | 51 | %ifarch %{ix86} |
52 | %ifnarch i386 i486 | |
76243dbd JB |
53 | BuildRequires: nasm |
54 | %endif | |
e1fe03f7 | 55 | %endif |
1463656a | 56 | BuildRequires: perl-tools-pod |
593d3a64 | 57 | BuildRequires: rpmbuild(macros) >= 1.268 |
1463656a | 58 | BuildRequires: tetex |
9cf4d8a4 | 59 | BuildRequires: texinfo |
872de59d | 60 | %{?with_amr:BuildRequires: unzip} |
46f2a56b | 61 | BuildRequires: xvid-devel >= 1:1.1.0 |
33a1c0f3 | 62 | BuildRequires: zlib-devel |
57ebb8ad | 63 | %{?with_autoreqdep:BuildConflicts: libpostproc} |
54ec280e | 64 | Requires: %{name}-libs = %{version}-%{release} |
839e806f | 65 | Requires: xvid >= 1:1.1.0 |
af49d6ab | 66 | Obsoletes: libpostproc |
539b540f | 67 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9fc4ad22 | 68 | |
2a60eebe JB |
69 | %define _noautoreqdep libGL.so.1 libGLU.so.1 |
70 | ||
c01d7857 PS |
71 | %define specflags -fno-strict-aliasing |
72 | ||
73 | # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one) | |
74 | %define specflags_ia32 -fomit-frame-pointer | |
75 | # -mmmx is needed to enable <mmintrin.h> code. | |
76 | %define specflags_i586 -mmmx | |
77 | %define specflags_i686 -mmmx | |
78 | ||
9fc4ad22 AM |
79 | %description |
80 | ffmpeg is a hyper fast realtime audio/video encoder and streaming | |
81 | server. It can grab from a standard Video4Linux video source and | |
82 | convert it into several file formats based on DCT/motion compensation | |
83 | encoding. Sound is compressed in MPEG audio layer 2 or using an AC3 | |
fda3e16d | 84 | compatible stream. |
9fc4ad22 | 85 | |
cdb7b42e | 86 | %description -l pl.UTF-8 |
fda3e16d | 87 | ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym |
cdb7b42e JR |
88 | oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucać dane |
89 | ze standardowego urządzenia Video4Linux i przekonwertować je w kilka | |
90 | formatów plików bazujących na kodowaniu DCT/kompensacji ruchu. Dźwięk | |
91 | jest kompresowany do strumienia MPEG audio layer 2 lub używając | |
fda3e16d | 92 | strumienia kompatybilnego z AC3. |
9fc4ad22 | 93 | |
54ec280e PG |
94 | %package libs |
95 | Summary: ffmpeg libraries | |
adcc0f76 | 96 | Summary(pl.UTF-8): Biblioteki ffmpeg |
54ec280e PG |
97 | Group: Libraries |
98 | ||
99 | %description libs | |
5e173375 | 100 | This package contains ffmpeg shared libraries. |
54ec280e | 101 | |
cdb7b42e JR |
102 | %description libs -l pl.UTF-8 |
103 | Ten pakiet zawiera biblioteki współdzielone ffmpeg. | |
54ec280e | 104 | |
af49d6ab JB |
105 | %package devel |
106 | Summary: ffmpeg header files | |
adcc0f76 | 107 | Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg |
af49d6ab | 108 | Group: Development/Libraries |
54ec280e | 109 | Requires: %{name}-libs = %{version}-%{release} |
33a1c0f3 | 110 | # for libavcodec: |
fc8de229 JB |
111 | %if %{with amr} |
112 | Requires: amrnb-devel | |
113 | Requires: amrwb-devel >= 5.3.0 | |
114 | %endif | |
33a1c0f3 | 115 | Requires: faac-devel |
96182eea | 116 | Requires: faad2-devel |
33a1c0f3 | 117 | Requires: lame-libs-devel |
bf479bc6 | 118 | Requires: libgsm-devel |
3e95d354 | 119 | Requires: libtheora-devel >= 1.0-0.alpha7 |
33a1c0f3 | 120 | Requires: libvorbis-devel |
7bf6921d | 121 | Requires: libx264-devel >= 0.1.2-1.20060828_2245.1 |
46f2a56b | 122 | Requires: xvid-devel >= 1:1.1.0 |
33a1c0f3 | 123 | Requires: zlib-devel |
8152d6a2 | 124 | Obsoletes: libpostproc-devel |
af49d6ab JB |
125 | |
126 | %description devel | |
127 | ffmpeg header files. | |
128 | ||
cdb7b42e JR |
129 | %description devel -l pl.UTF-8 |
130 | Pliki nagłówkowe ffmpeg. | |
af49d6ab JB |
131 | |
132 | %package static | |
133 | Summary: ffmpeg static libraries | |
adcc0f76 | 134 | Summary(pl.UTF-8): Statyczne biblioteki ffmpeg |
af49d6ab JB |
135 | Group: Development/Libraries |
136 | Requires: %{name}-devel = %{version}-%{release} | |
137 | ||
138 | %description static | |
139 | ffmpeg static libraries (libavcodec and libavformat). | |
140 | ||
cdb7b42e | 141 | %description static -l pl.UTF-8 |
af49d6ab JB |
142 | Statyczne biblioteki ffmpeg (libavcodec i libavformat). |
143 | ||
2a60eebe JB |
144 | %package ffplay |
145 | Summary: FFplay - SDL-based media player | |
adcc0f76 | 146 | Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL |
2a60eebe | 147 | Group: Applications/Multimedia |
54ec280e | 148 | Requires: %{name}-libs = %{version}-%{release} |
2a60eebe JB |
149 | |
150 | %description ffplay | |
151 | FFplay is a very simple and portable media player using the FFmpeg | |
152 | libraries and the SDL library. It is mostly used as a test bench for | |
153 | the various APIs of FFmpeg. | |
154 | ||
cdb7b42e JR |
155 | %description ffplay -l pl.UTF-8 |
156 | FFplay to bardzo prosty i przenośny odtwarzacz mediów używający | |
157 | bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do | |
158 | testowania różnych API FFmpeg. | |
2a60eebe | 159 | |
539b540f JB |
160 | %package vhook-imlib2 |
161 | Summary: imlib2 based hook | |
adcc0f76 | 162 | Summary(pl.UTF-8): Moduł przejściowy oparty o imlib2 |
539b540f | 163 | Group: Libraries |
54ec280e | 164 | Requires: %{name}-libs = %{version}-%{release} |
539b540f JB |
165 | |
166 | %description vhook-imlib2 | |
167 | This module implements a text overlay for a video image. Currently it | |
168 | supports a fixed overlay or reading the text from a file. The string | |
169 | is passed through strftime so that it is easy to imprint the date and | |
170 | time onto the image. | |
171 | ||
cdb7b42e JR |
172 | %description vhook-imlib2 -l pl.UTF-8 |
173 | Ten moduł implementuje tekstową nakładkę dla obrazu. Aktualnie | |
174 | obsługuje stałą nakładkę lub wczytywanie tekstu z pliku. Łańcuch jest | |
175 | przepuszczany przez strftime, więc łatwo umieścić datę i czas na | |
539b540f JB |
176 | obrazie. |
177 | ||
fde29260 ER |
178 | %package ffserver |
179 | Summary: FFserver video server | |
adcc0f76 | 180 | Summary(pl.UTF-8): FFserver - serwer strumieni obrazu |
fde29260 | 181 | Group: Daemons |
593d3a64 | 182 | Requires(post,preun): /sbin/chkconfig |
67103923 | 183 | Requires: %{name}-libs = %{version}-%{release} |
2305d791 | 184 | Requires: rc-scripts >= 0.4.0.10 |
fde29260 ER |
185 | |
186 | %description ffserver | |
187 | FFserver is a streaming server for both audio and video. It supports | |
188 | several live feeds, streaming from files and time shifting on live | |
189 | feeds (you can seek to positions in the past on each live feed, | |
190 | provided you specify a big enough feed storage in ffserver.conf). | |
191 | ||
cdb7b42e JR |
192 | %description ffserver -l pl.UTF-8 |
193 | FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka | |
194 | źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w | |
195 | czasie dla źródeł na żywo (można przeskakiwać na położenia w | |
196 | przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio | |
197 | dużej przestrzeni na dane skonfigurowanej w ffserver.conf). | |
4e0bd1da | 198 | |
9fc4ad22 | 199 | %prep |
2305d791 | 200 | %setup -q -n %{name}-export-%{_snap} |
ee032235 | 201 | %patch0 -p1 |
9ce23f21 | 202 | %patch1 -p1 |
72c23aa0 | 203 | %ifarch %{x8664} |
48610c64 | 204 | %patch2 -p0 |
72c23aa0 | 205 | %endif |
9fc4ad22 AM |
206 | |
207 | %build | |
05e1eb2f JB |
208 | # notes: |
209 | # - it's not autoconf configure | |
d0a0ec26 | 210 | # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags |
2080d1d3 | 211 | ./configure \ |
b4680d0b | 212 | --arch=%{_target_base_arch} \ |
539b540f | 213 | --prefix=%{_prefix} \ |
9cf4d8a4 | 214 | --libdir=%{_libdir} \ |
d81dfa95 | 215 | --shlibdir=%{_libdir} \ |
2a60eebe | 216 | --mandir=%{_mandir} \ |
d7493de8 | 217 | --disable-strip \ |
15c15700 ER |
218 | --enable-libfaac \ |
219 | --enable-libfaad \ | |
220 | --enable-libfaadbin \ | |
9cf4d8a4 | 221 | --enable-gpl \ |
f3692243 | 222 | --enable-libgsm \ |
3e95d354 | 223 | --enable-libtheora \ |
15c15700 | 224 | --enable-libmp3lame \ |
9cf4d8a4 | 225 | --enable-pp \ |
d7493de8 | 226 | --enable-pthreads \ |
9cf4d8a4 | 227 | --enable-shared \ |
ee032235 | 228 | --enable-swscaler \ |
15c15700 | 229 | --enable-libvorbis \ |
9ce23f21 AM |
230 | --enable-libx264 \ |
231 | --enable-libxvid \ | |
7a286645 | 232 | %ifnarch %{ix86} %{x8664} |
e1fe03f7 | 233 | --disable-mmx \ |
234 | %endif | |
235 | %ifarch i386 i486 | |
05e1eb2f | 236 | --disable-mmx \ |
b524cd99 | 237 | %endif |
238 | %if %{with amr} | |
48610c64 | 239 | --enable-nonfree \ |
2c00d607 JB |
240 | --enable-libamr-nb \ |
241 | --enable-libamr-wb \ | |
76243dbd | 242 | %endif |
05e1eb2f | 243 | --cc="%{__cc}" \ |
c01d7857 | 244 | --extra-cflags="%{rpmcflags}" \ |
05e1eb2f JB |
245 | --extra-ldflags="%{rpmldflags}" \ |
246 | --disable-debug \ | |
d0a0ec26 | 247 | --disable-optimizations \ |
2305d791 | 248 | |
873cd1c3 | 249 | %{__make} |
9fc4ad22 AM |
250 | |
251 | %install | |
252 | rm -rf $RPM_BUILD_ROOT | |
38cf6de3 ER |
253 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \ |
254 | $RPM_BUILD_ROOT/var/{cache,log}/ffserver | |
9fc4ad22 | 255 | |
539b540f | 256 | %{__make} install \ |
9cf4d8a4 | 257 | DESTDIR=$RPM_BUILD_ROOT |
539b540f | 258 | |
ece24152 | 259 | install config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg |
075d3a6a | 260 | install libavutil/intreadwrite.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg |
fde29260 ER |
261 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver |
262 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver | |
38cf6de3 | 263 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf |
539b540f | 264 | mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver |
9fc4ad22 | 265 | |
9fc4ad22 AM |
266 | %clean |
267 | rm -rf $RPM_BUILD_ROOT | |
268 | ||
3146af55 KK |
269 | %post libs -p /sbin/ldconfig |
270 | %postun libs -p /sbin/ldconfig | |
539b540f | 271 | |
38cf6de3 ER |
272 | %pre ffserver |
273 | %groupadd -g 167 ffserver | |
274 | %useradd -g ffserver -u 167 ffserver | |
275 | ||
593d3a64 ER |
276 | %post ffserver |
277 | /sbin/chkconfig --add ffserver | |
278 | %service ffserver restart | |
279 | ||
38cf6de3 | 280 | %preun ffserver |
593d3a64 ER |
281 | if [ "$1" = 0 ]; then |
282 | %service ffserver stop | |
283 | /sbin/chkconfig --del ffserver | |
284 | fi | |
285 | ||
38cf6de3 ER |
286 | %postun ffserver |
287 | if [ "$1" = 0 ]; then | |
288 | %userremove ffserver | |
289 | %groupremove ffserver | |
290 | fi | |
291 | ||
9fc4ad22 AM |
292 | %files |
293 | %defattr(644,root,root,755) | |
54ec280e | 294 | %doc Changelog README doc/*.html doc/TODO |
2a60eebe | 295 | %attr(755,root,root) %{_bindir}/ffmpeg |
54ec280e | 296 | %{_mandir}/man1/ffmpeg.1* |
54ec280e PG |
297 | |
298 | %files libs | |
299 | %defattr(644,root,root,755) | |
f50f7d7c | 300 | %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.* |
d0a0ec26 | 301 | %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.* |
f50f7d7c JB |
302 | %attr(755,root,root) %{_libdir}/libavformat.so.*.*.* |
303 | %attr(755,root,root) %{_libdir}/libavutil.so.*.*.* | |
d7493de8 | 304 | %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.* |
ee032235 | 305 | %attr(755,root,root) %{_libdir}/libswscale.so.*.*.* |
d0a0ec26 ER |
306 | %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.51 |
307 | %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.52 | |
308 | %attr(755,root,root) %ghost %{_libdir}/libavformat.so.52 | |
309 | %attr(755,root,root) %ghost %{_libdir}/libavutil.so.49 | |
310 | %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.51 | |
311 | %attr(755,root,root) %ghost %{_libdir}/libswscale.so.0 | |
539b540f | 312 | %dir %{_libdir}/vhook |
2a60eebe | 313 | %attr(755,root,root) %{_libdir}/vhook/drawtext.so |
539b540f | 314 | %attr(755,root,root) %{_libdir}/vhook/fish.so |
2a60eebe | 315 | %attr(755,root,root) %{_libdir}/vhook/null.so |
d2af4612 | 316 | %attr(755,root,root) %{_libdir}/vhook/ppm.so |
d7493de8 | 317 | %attr(755,root,root) %{_libdir}/vhook/watermark.so |
2a60eebe | 318 | |
539b540f JB |
319 | %files devel |
320 | %defattr(644,root,root,755) | |
54ec280e | 321 | %doc doc/optimization.txt |
539b540f | 322 | %attr(755,root,root) %{_libdir}/libavcodec.so |
d0a0ec26 | 323 | %attr(755,root,root) %{_libdir}/libavdevice.so |
539b540f | 324 | %attr(755,root,root) %{_libdir}/libavformat.so |
d7493de8 | 325 | %attr(755,root,root) %{_libdir}/libavutil.so |
d2af4612 | 326 | %attr(755,root,root) %{_libdir}/libpostproc.so |
ee032235 | 327 | %attr(755,root,root) %{_libdir}/libswscale.so |
539b540f | 328 | %{_includedir}/ffmpeg |
c32b589f | 329 | %{_includedir}/postproc |
d7493de8 | 330 | %{_pkgconfigdir}/*.pc |
539b540f | 331 | |
9cf4d8a4 JB |
332 | %files static |
333 | %defattr(644,root,root,755) | |
334 | %{_libdir}/lib*.a | |
af49d6ab JB |
335 | |
336 | %files ffplay | |
337 | %defattr(644,root,root,755) | |
338 | %attr(755,root,root) %{_bindir}/ffplay | |
339 | %{_mandir}/man1/ffplay.1* | |
340 | ||
341 | %if %{with imlib2} | |
342 | %files vhook-imlib2 | |
343 | %defattr(644,root,root,755) | |
344 | %attr(755,root,root) %{_libdir}/vhook/imlib2.so | |
345 | %endif | |
fde29260 ER |
346 | |
347 | %files ffserver | |
348 | %defattr(644,root,root,755) | |
349 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf | |
350 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver | |
351 | %attr(755,root,root) %{_sbindir}/ffserver | |
352 | %attr(754,root,root) /etc/rc.d/init.d/ffserver | |
353 | %{_mandir}/man1/ffserver.1* | |
38cf6de3 ER |
354 | %dir %attr(770,root,ffserver) /var/cache/ffserver |
355 | %dir %attr(770,root,ffserver) /var/log/ffserver |