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