]> git.pld-linux.org Git - packages/ffmpeg.git/blob - ffmpeg.spec
901b6b0aadd7f6a927cafa1c4a6806287f1630a2
[packages/ffmpeg.git] / ffmpeg.spec
1 # Conditional build:
2 %bcond_without  imlib2          # we can safely play without it:-)
3 %bcond_without  autoreqdep      # don't care about package name deps generated by rpm
4 #
5 %define snap    20060129
6 %define _rel 8.6
7 Summary:        Realtime audio/video encoder and streaming server
8 Summary(pl):    Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
9 Name:           ffmpeg
10 Version:        0.4.9
11 Release:        3.%{snap}.%{_rel}
12 # LGPL or GPL, chosen at configure time (GPL version is more featured)
13 License:        GPL
14 Group:          Applications/Multimedia
15 #Source0:       http://dl.sourceforge.net/ffmpeg/%{name}-%{version}-pre1.tar.gz
16 #Source0:       ftp://ftp2.mplayerhq.hu/MPlayer/cvs/FFMpeg-%{snap}.tar.bz2
17 Source0:        %{name}-%{snap}.tar.bz2
18 # Source0-md5:  d8ea09431d6c0c91bfd35e0ca74a67e1
19 Source1:        ffserver.init
20 Source2:        ffserver.sysconfig
21 Source3:        ffserver.conf
22 Patch0:         %{name}-libtool.patch
23 Patch1:         %{name}-libdir.patch
24 Patch2:         %{name}-gcc4.patch
25 URL:            http://ffmpeg.sourceforge.net/
26 BuildRequires:  SDL-devel
27 BuildRequires:  faac-devel
28 BuildRequires:  faad2-devel
29 BuildRequires:  freetype-devel
30 %ifarch ppc
31 # require version with altivec support fixed
32 BuildRequires:  gcc >= 5:3.3.2-3
33 %endif
34 %{?with_imlib2:BuildRequires:   imlib2-devel >= 1.1.0-2}
35 BuildRequires:  lame-libs-devel
36 BuildRequires:  libdts-devel
37 BuildRequires:  libgsm-devel
38 BuildRequires:  libtheora-devel
39 BuildRequires:  libtool >= 2:1.4d-3
40 BuildRequires:  libvorbis-devel
41 #BuildRequires: libx264-devel
42 BuildRequires:  lzo-devel
43 %ifarch %{ix86}
44 %ifnarch i386 i486
45 BuildRequires:  nasm
46 %endif
47 %endif
48 BuildRequires:  perl-tools-pod
49 BuildRequires:  rpmbuild(macros) >= 1.268
50 BuildRequires:  tetex
51 BuildRequires:  texinfo
52 BuildRequires:  xvid-devel >= 1:1.1.0
53 BuildRequires:  zlib-devel
54 %{?with_autoreqdep:BuildConflicts:      libpostproc}
55 Requires:       %{name}-libs = %{version}-%{release}
56 Requires:       xvid >= 1:1.1.0
57 Obsoletes:      libpostproc
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
61
62 %define         specflags       -fno-strict-aliasing
63
64 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
65 %define         specflags_ia32  -fomit-frame-pointer
66 # -mmmx is needed to enable <mmintrin.h> code.
67 %define         specflags_i586  -mmmx
68 %define         specflags_i686  -mmmx
69
70 %description
71 ffmpeg is a hyper fast realtime audio/video encoder and streaming
72 server. It can grab from a standard Video4Linux video source and
73 convert it into several file formats based on DCT/motion compensation
74 encoding. Sound is compressed in MPEG audio layer 2 or using an AC3
75 compatible stream.
76
77 %description -l pl
78 ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
79 oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucaæ dane
80 ze standardowego urz±dzenia Video4Linux i przekonwertowaæ je w kilka
81 formatów plików bazuj±cych na kodowaniu DCT/kompensacji ruchu. D¼wiêk
82 jest kompresowany do strumienia MPEG audio layer 2 lub u¿ywaj±c
83 strumienia kompatybilnego z AC3.
84
85 %package libs
86 Summary:        ffmpeg libraries
87 Summary(pl):    Biblioteki ffmpeg
88 Group:          Libraries
89
90 %description libs
91 This package contains ffmpeg shared libraries.
92
93 %description libs -l pl
94 Ten pakiet zawiera biblioteki wspó³dzielone ffmpeg.
95
96 %package devel
97 Summary:        ffmpeg header files
98 Summary(pl):    Pliki nag³ówkowe ffmpeg
99 Group:          Development/Libraries
100 Requires:       %{name}-libs = %{version}-%{release}
101 Obsoletes:      libpostproc-devel
102 # for libavcodec:
103 Requires:       faac-devel
104 Requires:       lame-libs-devel
105 Requires:       libdts-devel
106 Requires:       libgsm-devel
107 Requires:       libtheora-devel
108 Requires:       libvorbis-devel
109 Requires:       xvid-devel >= 1:1.1.0
110 Requires:       zlib-devel
111
112 %description devel
113 ffmpeg header files.
114
115 %description devel -l pl
116 Pliki nag³ówkowe ffmpeg.
117
118 %package static
119 Summary:        ffmpeg static libraries
120 Summary(pl):    Statyczne biblioteki ffmpeg
121 Group:          Development/Libraries
122 Requires:       %{name}-devel = %{version}-%{release}
123
124 %description static
125 ffmpeg static libraries (libavcodec and libavformat).
126
127 %description static -l pl
128 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
129
130 %package ffplay
131 Summary:        FFplay - SDL-based media player
132 Summary(pl):    FFplay - odtwarzacz mediów oparty na SDL
133 Group:          Applications/Multimedia
134 Requires:       %{name}-libs = %{version}-%{release}
135
136 %description ffplay
137 FFplay is a very simple and portable media player using the FFmpeg
138 libraries and the SDL library. It is mostly used as a test bench for
139 the various APIs of FFmpeg.
140
141 %description ffplay -l pl
142 FFplay to bardzo prosty i przeno¶ny odtwarzacz mediów u¿ywaj±cy
143 bibliotek FFmpeg oraz biblioteki SDL. Jest u¿ywany g³ównie do
144 testowania ró¿nych API FFmpeg.
145
146 %package vhook-imlib2
147 Summary:        imlib2 based hook
148 Summary(pl):    Modu³ przej¶ciowy oparty o imlib2
149 Group:          Libraries
150 Requires:       %{name}-libs = %{version}-%{release}
151
152 %description vhook-imlib2
153 This module implements a text overlay for a video image. Currently it
154 supports a fixed overlay or reading the text from a file. The string
155 is passed through strftime so that it is easy to imprint the date and
156 time onto the image.
157
158 %description vhook-imlib2 -l pl
159 Ten modu³ implementuje tekstow± nak³adkê dla obrazu. Aktualnie
160 obs³uguje sta³± nak³adkê lub wczytywanie tekstu z pliku. £añcuch jest
161 przepuszczany przez strftime, wiêc ³atwo umie¶ciæ datê i czas na
162 obrazie.
163
164 %package ffserver
165 Summary:        FFserver video server
166 Group:          Daemons
167 Requires(post,preun):   /sbin/chkconfig
168 Requires(post,preun):   rc-scripts >= 0.4.0.10
169
170 %description ffserver
171 FFserver is a streaming server for both audio and video. It supports
172 several live feeds, streaming from files and time shifting on live
173 feeds (you can seek to positions in the past on each live feed,
174 provided you specify a big enough feed storage in ffserver.conf).
175
176 %prep
177 %setup -q -n %{name}
178 %patch0 -p1
179 %patch1 -p1
180 %patch2 -p1
181
182 %build
183 # notes:
184 # - it's not autoconf configure
185 # - --disable-debug, --disable-opts, tune=generic causes not to override our optflags
186 ./configure \
187         --prefix=%{_prefix} \
188         --libdir=%{_libdir} \
189         --mandir=%{_mandir} \
190         --disable-strip \
191         --enable-a52 \
192         --enable-a52bin \
193         --enable-dts \
194         --enable-faac \
195         --enable-faad \
196         --enable-faadbin \
197         --enable-gpl \
198         --enable-libgsm \
199         --enable-libogg \
200         --enable-mp3lame \
201         --enable-pp \
202         --enable-pthreads \
203         --enable-shared \
204         --enable-theora \
205         --enable-vorbis \
206         --enable-xvid \
207 %ifnarch %{ix86} %{x8664}
208         --disable-mmx \
209 %endif
210 %ifarch i386 i486
211         --disable-mmx \
212 %endif
213         --cc="%{__cc}" \
214         --extra-cflags="%{rpmcflags}" \
215         --extra-ldflags="%{rpmldflags}" \
216         --disable-debug \
217         --disable-opts \
218         --tune=generic
219
220 %{__make} \
221         BUILD_DOC=yes
222
223 %install
224 rm -rf $RPM_BUILD_ROOT
225 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
226         $RPM_BUILD_ROOT/var/{cache,log}/ffserver
227
228 %{__make} install \
229         DESTDIR=$RPM_BUILD_ROOT
230
231 install xvmc_render.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
232 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
233 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
234 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
235 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
236
237 %clean
238 rm -rf $RPM_BUILD_ROOT
239
240 %post   -p /sbin/ldconfig
241 %postun -p /sbin/ldconfig
242
243 %pre ffserver
244 %groupadd -g 167 ffserver
245 %useradd -g ffserver -u 167 ffserver
246
247 %post ffserver
248 /sbin/chkconfig --add ffserver
249 %service ffserver restart
250
251 %preun ffserver
252 if [ "$1" = 0 ]; then
253         %service ffserver stop
254         /sbin/chkconfig --del ffserver
255 fi
256
257 %postun ffserver
258 if [ "$1" = 0 ]; then
259         %userremove ffserver
260         %groupremove ffserver
261 fi
262
263 %files
264 %defattr(644,root,root,755)
265 %doc Changelog README doc/*.html doc/TODO
266 %attr(755,root,root) %{_bindir}/ffmpeg
267 %{_mandir}/man1/ffmpeg.1*
268
269 %files libs
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
272 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
273 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
274 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
275 %dir %{_libdir}/vhook
276 %attr(755,root,root) %{_libdir}/vhook/drawtext.so
277 %attr(755,root,root) %{_libdir}/vhook/fish.so
278 %attr(755,root,root) %{_libdir}/vhook/null.so
279 %attr(755,root,root) %{_libdir}/vhook/ppm.so
280 %attr(755,root,root) %{_libdir}/vhook/watermark.so
281
282 %files devel
283 %defattr(644,root,root,755)
284 %doc doc/optimization.txt
285 %attr(755,root,root) %{_libdir}/libavcodec.so
286 %attr(755,root,root) %{_libdir}/libavformat.so
287 %attr(755,root,root) %{_libdir}/libavutil.so
288 %attr(755,root,root) %{_libdir}/libpostproc.so
289 %{_libdir}/lib*.la
290 %{_includedir}/ffmpeg
291 %{_includedir}/postproc
292 %{_pkgconfigdir}/*.pc
293
294 %files static
295 %defattr(644,root,root,755)
296 %{_libdir}/lib*.a
297
298 %files ffplay
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_bindir}/ffplay
301 %{_mandir}/man1/ffplay.1*
302
303 %if %{with imlib2}
304 %files vhook-imlib2
305 %defattr(644,root,root,755)
306 %attr(755,root,root) %{_libdir}/vhook/imlib2.so
307 %endif
308
309 %files ffserver
310 %defattr(644,root,root,755)
311 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
312 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
313 %attr(755,root,root) %{_sbindir}/ffserver
314 %attr(754,root,root) /etc/rc.d/init.d/ffserver
315 %{_mandir}/man1/ffserver.1*
316 %dir %attr(770,root,ffserver) /var/cache/ffserver
317 %dir %attr(770,root,ffserver) /var/log/ffserver
This page took 0.056094 seconds and 3 git commands to generate.