Increase probe buffer size to 32kB, this makes ac3 auto-detection far more reliable.
[mplayer/glamo.git] / rpm / mplayer.spec
blob02814f17ba0769075005128f7f323c556d0e3e3a
1 %define date %(date --iso)
2 %define svnbuild %(date +%Y%m%d)
3 %define codecsdir %{_libdir}/codecs
5 Name: mplayer
6 Version: 1.0
7 Release: 0.%{svnbuild}svn%{?dist}
8 Summary: Movie player playing most video formats and DVDs
10 Group: Applications/Multimedia
11 License: GPL
12 URL: http://www.mplayerhq.hu/
13 Source0: http://www.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2
14 Source1: http://www.mplayerhq.hu/MPlayer/skins/Blue-1.7.tar.bz2
15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17 BuildRequires: SDL-devel
18 BuildRequires: aalib-devel
19 BuildRequires: alsa-lib-devel
20 BuildRequires: cdparanoia-devel
21 BuildRequires: desktop-file-utils
22 BuildRequires: em8300-devel
23 BuildRequires: enca-devel
24 BuildRequires: faac-devel
25 BuildRequires: faad2-devel
26 BuildRequires: fontconfig-devel
27 BuildRequires: freetype-devel >= 2.0.9
28 BuildRequires: fribidi-devel
29 BuildRequires: giflib-devel
30 BuildRequires: gtk2-devel
31 BuildRequires: ladspa-devel
32 BuildRequires: lame-devel
33 BuildRequires: libGL-devel
34 BuildRequires: libXinerama-devel
35 BuildRequires: libXv-devel
36 BuildRequires: libXvMC-devel
37 BuildRequires: libXxf86dga-devel
38 BuildRequires: libXxf86vm-devel
39 BuildRequires: libcaca-devel
40 BuildRequires: libdca-devel
41 BuildRequires: libdv-devel
42 BuildRequires: libdvdnav-devel
43 BuildRequires: libjpeg-devel
44 BuildRequires: libmpcdec-devel
45 BuildRequires: libtheora-devel
46 BuildRequires: libvorbis-devel
47 BuildRequires: lirc-devel
48 BuildRequires: live-devel
49 BuildRequires: lzo-devel >= 2
50 BuildRequires: speex-devel >= 1.1
51 BuildRequires: twolame-devel
52 BuildRequires: x264-devel
53 BuildRequires: xvidcore-devel >= 0.9.2
54 %{?_with_arts:BuildRequires: arts-devel}
55 %{?_with_amr:BuildRequires: amrnb-devel amrwb-devel}
56 %{?_with_directfb:BuildRequires: directfb-devel}
57 %{?_with_esound:BuildRequires: esound-devel}
58 %{?_with_jack:BuildRequires: jack-audio-connection-kit-devel}
59 %{?_with_libmad:BuildRequires: libmad-devel}
60 %{?_with_openal:BuildRequires: openal-devel}
61 %{?_with_samba:BuildRequires: samba-common}
62 %{?_with_svgalib:BuildRequires: svgalib-devel}
63 %{?_with_xmms:BuildRequires: xmms-devel}
64 # for XML docs, SVN only
65 BuildRequires: docbook-dtds
66 BuildRequires: docbook-style-xsl
67 BuildRequires: libxml2
68 BuildRequires: libxslt
70 %description
71 MPlayer is a movie player that plays most MPEG, VOB, AVI, OGG/OGM,
72 VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM,
73 RoQ, and PVA files. You can also use it to watch VCDs, SVCDs, DVDs,
74 3ivx, RealMedia, and DivX movies.
75 It supports a wide range of output drivers including X11, XVideo, DGA,
76 OpenGL, SVGAlib, fbdev, AAlib, DirectFB etc. There are also nice
77 antialiased shaded subtitles and OSD.
78 Non-default rpmbuild options:
79 --with samba: Enable Samba (smb://) support
80 --with xmms: Enable XMMS input plugin support
81 --with amr: Enable AMR support
82 --with libmad: Enable libmad support
83 --with openal: Enable OpenAL support
84 --with jack: Enable JACK support
85 --with arts: Enable aRts support
86 --with esound: Enable EsounD support
87 --with directfb:Enable DirectFB support
88 --with svgalib: Enable SVGAlib support
90 %package gui
91 Summary: GUI for MPlayer
92 Group: Applications/Multimedia
93 Requires: mplayer = %{version}-%{release}
95 %description gui
96 This package contains a GUI for MPlayer and a default skin for it.
98 %package -n mencoder
99 Summary: MPlayer movie encoder
100 Group: Applications/Multimedia
101 Requires: mplayer = %{version}-%{release}
103 %description -n mencoder
104 This package contains the MPlayer movie encoder.
106 %package doc
107 Summary: MPlayer documentation in various languages
108 Group: Documentation
110 %description doc
111 MPlayer documentation in various languages.
114 %prep
115 %setup -q -n mplayer-export-%{date}
117 doconv() {
118 iconv -f $1 -t $2 -o DOCS/man/$3/mplayer.1.utf8 DOCS/man/$3/mplayer.1 && \
119 mv DOCS/man/$3/mplayer.1.utf8 DOCS/man/$3/mplayer.1
121 for lang in de es fr it ; do doconv iso-8859-1 utf-8 $lang ; done
122 for lang in hu pl ; do doconv iso-8859-2 utf-8 $lang ; done
123 for lang in ru ; do doconv koi8-r utf-8 $lang ; done
125 mv DOCS/man/zh DOCS/man/zh_CN
127 %build
128 ./configure \
129 --prefix=%{_prefix} \
130 --bindir=%{_bindir} \
131 --datadir=%{_datadir}/mplayer \
132 --mandir=%{_mandir} \
133 --confdir=%{_sysconfdir}/mplayer \
134 --libdir=%{_libdir} \
135 --codecsdir=%{codecsdir} \
137 --disable-encoder=FAAC \
138 --disable-encoder=MP3LAME \
139 --disable-encoder=X264 \
141 --enable-gui \
142 --enable-largefiles \
143 --disable-termcap \
144 --disable-bitmap-font \
145 --enable-lirc \
146 --enable-joystick \
147 %{!?_with_samba:--disable-smb} \
148 --disable-dvdread-internal \
149 --disable-libdvdcss-internal \
150 --enable-menu \
152 --disable-faad-internal \
153 --disable-tremor-internal \
154 %{!?_with_amr:--disable-libamr_nb --disable-libamr_wb} \
155 %{!?_with_libmad:--disable-mad} \
156 %{?_with_xmms:--enable-xmms} \
158 --disable-svga \
159 --enable-xvmc \
160 --%{?_with_directfb:enable}%{!?_with_directfb:disable}-directfb \
161 %{!?_with_svgalib:--disable-svga} \
163 %{!?_with_arts:--disable-arts} \
164 %{!?_with_esound:--disable-esd} \
165 %{!?_with_jack:--disable-jack} \
166 %{!?_with_openal:--disable-openal} \
168 --language=all \
170 %{?_with_xmms:--with-xmmslibdir=%{_libdir}} \
171 --with-xvmclib=XvMCW
173 %{__make}
175 mv -f mplayer gmplayer
176 %{__make} distclean
178 ./configure \
179 --prefix=%{_prefix} \
180 --bindir=%{_bindir} \
181 --datadir=%{_datadir}/mplayer \
182 --mandir=%{_mandir} \
183 --confdir=%{_sysconfdir}/mplayer \
184 --libdir=%{_libdir} \
185 --codecsdir=%{codecsdir} \
187 --disable-encoder=FAAC \
188 --disable-encoder=MP3LAME \
189 --disable-encoder=X264 \
191 --enable-largefiles \
192 --disable-termcap \
193 --disable-bitmap-font \
194 --enable-lirc \
195 --enable-joystick \
196 %{!?_with_samba:--disable-smb} \
197 --disable-dvdread-internal \
198 --disable-libdvdcss-internal \
199 --enable-menu \
201 --disable-faad-internal \
202 --disable-tremor-internal \
203 %{!?_with_amr:--disable-libamr_nb --disable-libamr_wb} \
204 %{!?_with_libmad:--disable-mad} \
205 %{?_with_xmms:--enable-xmms} \
207 --disable-svga \
208 --enable-xvmc \
209 --%{?_with_directfb:enable}%{!?_with_directfb:disable}-directfb \
210 %{!?_with_svgalib:--disable-svga} \
212 %{!?_with_arts:--disable-arts} \
213 %{!?_with_esound:--disable-esd} \
214 %{!?_with_jack:--disable-jack} \
215 %{!?_with_openal:--disable-openal} \
217 --language=all \
219 %{?_with_xmms:--with-xmmslibdir=%{_libdir}} \
220 --with-xvmclib=XvMCW
222 %{__make}
224 # build HTML documentation from XML files
225 pushd DOCS/xml
226 %{__make} html-chunked
227 popd
229 %install
230 rm -rf $RPM_BUILD_ROOT doc
232 make install DESTDIR=$RPM_BUILD_ROOT STRIPBINARIES=no
233 install -pm 755 TOOLS/midentify.sh $RPM_BUILD_ROOT%{_bindir}/
235 # Clean up documentation
236 mkdir doc
237 cp -pR DOCS/* doc/
238 rm -r doc/man doc/xml doc/README
239 mv doc/HTML/* doc/
240 rm -rf doc/HTML
242 # Default config files
243 install -Dpm 644 etc/example.conf \
244 $RPM_BUILD_ROOT%{_sysconfdir}/mplayer/mplayer.conf
245 # use Nimbus Sans L font for OSD (via fontconfig)
246 echo "fontconfig=yes" >>$RPM_BUILD_ROOT%{_sysconfdir}/mplayer/mplayer.conf
247 echo "font=\"Sans\"" >>$RPM_BUILD_ROOT%{_sysconfdir}/mplayer/mplayer.conf
249 install -pm 644 etc/{input,menu}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer/
251 # GUI mplayer
252 install -pm 755 g%{name} $RPM_BUILD_ROOT%{_bindir}/
254 # Default skin
255 install -dm 755 $RPM_BUILD_ROOT%{_datadir}/mplayer/skins
256 tar xjC $RPM_BUILD_ROOT%{_datadir}/mplayer/skins --exclude=.svn -f %{SOURCE1}
257 ln -s Blue $RPM_BUILD_ROOT%{_datadir}/mplayer/skins/default
259 # Icons
260 install -dm 755 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
261 install -pm 644 etc/mplayer.xpm \
262 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
264 # Desktop file
265 desktop-file-install \
266 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
267 etc/%{name}.desktop
269 # Codec dir
270 install -dm 755 $RPM_BUILD_ROOT%{codecsdir}
273 %post gui
274 gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :
275 update-desktop-database &>/dev/null || :
278 %postun gui
279 gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :
280 update-desktop-database &>/dev/null || :
283 %clean
284 rm -rf $RPM_BUILD_ROOT
287 %files
288 %defattr(-, root, root, -)
289 %doc AUTHORS Changelog LICENSE README
290 %dir %{_sysconfdir}/mplayer
291 %config(noreplace) %{_sysconfdir}/mplayer/mplayer.conf
292 %config(noreplace) %{_sysconfdir}/mplayer/input.conf
293 %config(noreplace) %{_sysconfdir}/mplayer/menu.conf
294 %{_bindir}/midentify.sh
295 %{_bindir}/mplayer
296 %dir %{codecsdir}/
297 %dir %{_datadir}/mplayer/
298 %{_mandir}/man1/mplayer.1*
299 %lang(cs) %{_mandir}/cs/man1/mplayer.1*
300 %lang(de) %{_mandir}/de/man1/mplayer.1*
301 %lang(es) %{_mandir}/es/man1/mplayer.1*
302 %lang(fr) %{_mandir}/fr/man1/mplayer.1*
303 %lang(hu) %{_mandir}/hu/man1/mplayer.1*
304 %lang(it) %{_mandir}/it/man1/mplayer.1*
305 %lang(pl) %{_mandir}/pl/man1/mplayer.1*
306 %lang(ru) %{_mandir}/ru/man1/mplayer.1*
307 %lang(zh_CN) %{_mandir}/zh_CN/man1/mplayer.1*
309 %files gui
310 %defattr(-, root, root, -)
311 %{_bindir}/gmplayer
312 %{_datadir}/applications/*mplayer.desktop
313 %{_datadir}/icons/hicolor/32x32/apps/mplayer.xpm
314 %{_datadir}/mplayer/skins/
316 %files -n mencoder
317 %defattr(-, root, root, -)
318 %{_bindir}/mencoder
319 %{_mandir}/man1/mencoder.1*
320 %lang(cs) %{_mandir}/cs/man1/mencoder.1*
321 %lang(de) %{_mandir}/de/man1/mencoder.1*
322 %lang(es) %{_mandir}/es/man1/mencoder.1*
323 %lang(fr) %{_mandir}/fr/man1/mencoder.1*
324 %lang(hu) %{_mandir}/hu/man1/mencoder.1*
325 %lang(it) %{_mandir}/it/man1/mencoder.1*
326 %lang(pl) %{_mandir}/pl/man1/mencoder.1*
327 %lang(ru) %{_mandir}/ru/man1/mencoder.1*
328 %lang(zh_CN) %{_mandir}/zh_CN/man1/mencoder.1*
330 %files doc
331 %defattr(-, root, root, -)
332 %doc doc/en/ doc/tech/
333 %lang(cs) %doc doc/cs/
334 %lang(de) %doc doc/de/
335 %lang(es) %doc doc/es/
336 %lang(fr) %doc doc/fr/
337 %lang(hu) %doc doc/hu/
338 %lang(pl) %doc doc/pl/
339 %lang(ru) %doc doc/ru/
340 %lang(zh_CN) %doc doc/zh_CN/
343 %changelog
344 * Sat Oct 06 2007 Dominik Mierzejewski <rpm at greysector.net>
345 - adapted livna specfile for inclusion in SVN