sd_lavc: use subtitle framework for former av_sub.c code
[mplayer.git] / rpm / mplayer.spec
blob2db141cd200d4a631cf41d7b99d17d5dc606c8eb
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: faad2-devel
25 BuildRequires: fontconfig-devel
26 BuildRequires: freetype-devel >= 2.0.9
27 BuildRequires: fribidi-devel
28 BuildRequires: giflib-devel
29 BuildRequires: gtk2-devel
30 BuildRequires: ladspa-devel
31 BuildRequires: lame-devel
32 BuildRequires: libGL-devel
33 BuildRequires: libXinerama-devel
34 BuildRequires: libXv-devel
35 BuildRequires: libXxf86dga-devel
36 BuildRequires: libXxf86vm-devel
37 BuildRequires: libcaca-devel
38 BuildRequires: libdca-devel
39 BuildRequires: libdv-devel
40 BuildRequires: libdvdnav-devel
41 BuildRequires: libjpeg-devel
42 BuildRequires: libmpcdec-devel
43 BuildRequires: libtheora-devel
44 BuildRequires: libvorbis-devel
45 BuildRequires: lirc-devel
46 BuildRequires: live-devel
47 BuildRequires: lzo-devel >= 2
48 BuildRequires: speex-devel >= 1.1
49 BuildRequires: xvidcore-devel >= 0.9.2
50 %{?_with_arts:BuildRequires: arts-devel}
51 %{?_with_amr:BuildRequires: amrnb-devel amrwb-devel}
52 %{?_with_directfb:BuildRequires: directfb-devel}
53 %{?_with_esound:BuildRequires: esound-devel}
54 %{?_with_jack:BuildRequires: jack-audio-connection-kit-devel}
55 %{?_with_libmad:BuildRequires: libmad-devel}
56 %{?_with_openal:BuildRequires: openal-devel}
57 %{?_with_samba:BuildRequires: samba-common}
58 %{?_with_svgalib:BuildRequires: svgalib-devel}
59 %{?_with_xmms:BuildRequires: xmms-devel}
60 # for XML docs, SVN only
61 BuildRequires: docbook-dtds
62 BuildRequires: docbook-style-xsl
63 BuildRequires: libxml2
64 BuildRequires: libxslt
66 %description
67 MPlayer is a movie player that plays most MPEG, VOB, AVI, OGG/OGM,
68 VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM,
69 RoQ, and PVA files. You can also use it to watch VCDs, SVCDs, DVDs,
70 3ivx, RealMedia, and DivX movies.
71 It supports a wide range of output drivers including X11, XVideo, DGA,
72 OpenGL, SVGAlib, fbdev, AAlib, DirectFB etc. There are also nice
73 antialiased shaded subtitles and OSD.
74 Non-default rpmbuild options:
75 --with samba: Enable Samba (smb://) support
76 --with xmms: Enable XMMS input plugin support
77 --with amr: Enable AMR support
78 --with libmad: Enable libmad support
79 --with openal: Enable OpenAL support
80 --with jack: Enable JACK support
81 --with arts: Enable aRts support
82 --with esound: Enable EsounD support
83 --with directfb:Enable DirectFB support
84 --with svgalib: Enable SVGAlib support
86 %package gui
87 Summary: GUI for MPlayer
88 Group: Applications/Multimedia
89 Requires: mplayer = %{version}-%{release}
91 %description gui
92 This package contains a GUI for MPlayer and a default skin for it.
94 %package doc
95 Summary: MPlayer documentation in various languages
96 Group: Documentation
98 %description doc
99 MPlayer documentation in various languages.
102 %prep
103 %setup -q -n mplayer-export-%{date}
105 doconv() {
106 iconv -f $1 -t $2 -o DOCS/man/$3/mplayer.1.utf8 DOCS/man/$3/mplayer.1 && \
107 mv DOCS/man/$3/mplayer.1.utf8 DOCS/man/$3/mplayer.1
109 for lang in de es fr it ; do doconv iso-8859-1 utf-8 $lang ; done
110 for lang in hu pl ; do doconv iso-8859-2 utf-8 $lang ; done
111 for lang in ru ; do doconv koi8-r utf-8 $lang ; done
113 mv DOCS/man/zh DOCS/man/zh_CN
115 %build
116 ./configure \
117 --prefix=%{_prefix} \
118 --bindir=%{_bindir} \
119 --datadir=%{_datadir}/mplayer \
120 --mandir=%{_mandir} \
121 --confdir=%{_sysconfdir}/mplayer \
122 --libdir=%{_libdir} \
123 --codecsdir=%{codecsdir} \
125 --enable-gui \
126 --disable-termcap \
127 --disable-bitmap-font \
128 --enable-lirc \
129 --enable-joystick \
130 %{!?_with_samba:--disable-smb} \
131 --disable-dvdread-internal \
132 --disable-libdvdcss-internal \
134 %{!?_with_amr:--disable-libamr_nb --disable-libamr_wb} \
135 %{!?_with_libmad:--disable-mad} \
136 %{?_with_xmms:--enable-xmms} \
138 --disable-svga \
139 --%{?_with_directfb:enable}%{!?_with_directfb:disable}-directfb \
140 %{!?_with_svgalib:--disable-svga} \
142 %{!?_with_arts:--disable-arts} \
143 %{!?_with_esound:--disable-esd} \
144 %{!?_with_jack:--disable-jack} \
145 %{!?_with_openal:--disable-openal} \
147 --language=all \
149 %{?_with_xmms:--with-xmmslibdir=%{_libdir}} \
152 %{__make}
154 mv -f mplayer gmplayer
155 %{__make} distclean
157 ./configure \
158 --prefix=%{_prefix} \
159 --bindir=%{_bindir} \
160 --datadir=%{_datadir}/mplayer \
161 --mandir=%{_mandir} \
162 --confdir=%{_sysconfdir}/mplayer \
163 --libdir=%{_libdir} \
164 --codecsdir=%{codecsdir} \
166 --disable-termcap \
167 --disable-bitmap-font \
168 --enable-lirc \
169 --enable-joystick \
170 %{!?_with_samba:--disable-smb} \
171 --disable-dvdread-internal \
172 --disable-libdvdcss-internal \
174 %{!?_with_amr:--disable-libamr_nb --disable-libamr_wb} \
175 %{!?_with_libmad:--disable-mad} \
176 %{?_with_xmms:--enable-xmms} \
178 --disable-svga \
179 --%{?_with_directfb:enable}%{!?_with_directfb:disable}-directfb \
180 %{!?_with_svgalib:--disable-svga} \
182 %{!?_with_arts:--disable-arts} \
183 %{!?_with_esound:--disable-esd} \
184 %{!?_with_jack:--disable-jack} \
185 %{!?_with_openal:--disable-openal} \
187 --language=all \
189 %{?_with_xmms:--with-xmmslibdir=%{_libdir}} \
192 %{__make}
194 # build HTML documentation from XML files
195 pushd DOCS/xml
196 %{__make} html-chunked
197 popd
199 %install
200 rm -rf $RPM_BUILD_ROOT doc
202 make install DESTDIR=$RPM_BUILD_ROOT STRIPBINARIES=no
203 install -pm 755 TOOLS/midentify.sh $RPM_BUILD_ROOT%{_bindir}/
205 # Clean up documentation
206 mkdir doc
207 cp -pR DOCS/* doc/
208 rm -r doc/man doc/xml doc/README
209 mv doc/HTML/* doc/
210 rm -rf doc/HTML
212 # Default config files
213 install -Dpm 644 etc/example.conf \
214 $RPM_BUILD_ROOT%{_sysconfdir}/mplayer/mplayer.conf
215 # use Nimbus Sans L font for OSD (via fontconfig)
216 echo "fontconfig=yes" >>$RPM_BUILD_ROOT%{_sysconfdir}/mplayer/mplayer.conf
217 echo "font=\"Sans\"" >>$RPM_BUILD_ROOT%{_sysconfdir}/mplayer/mplayer.conf
219 # GUI mplayer
220 install -pm 755 g%{name} $RPM_BUILD_ROOT%{_bindir}/
222 # Default skin
223 install -dm 755 $RPM_BUILD_ROOT%{_datadir}/mplayer/skins
224 tar xjC $RPM_BUILD_ROOT%{_datadir}/mplayer/skins --exclude=.svn -f %{SOURCE1}
225 ln -s Blue $RPM_BUILD_ROOT%{_datadir}/mplayer/skins/default
227 # Icons
228 install -dm 755 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
229 install -pm 644 etc/mplayer.xpm \
230 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
232 # Desktop file
233 desktop-file-install \
234 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
235 etc/%{name}.desktop
237 # Codec dir
238 install -dm 755 $RPM_BUILD_ROOT%{codecsdir}
241 %post gui
242 gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :
243 update-desktop-database &>/dev/null || :
246 %postun gui
247 gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :
248 update-desktop-database &>/dev/null || :
251 %clean
252 rm -rf $RPM_BUILD_ROOT
255 %files
256 %defattr(-, root, root, -)
257 %doc AUTHORS Changelog LICENSE README
258 %dir %{_sysconfdir}/mplayer
259 %config(noreplace) %{_sysconfdir}/mplayer/mplayer.conf
260 %config(noreplace) %{_sysconfdir}/mplayer/input.conf
261 %{_bindir}/midentify.sh
262 %{_bindir}/mplayer
263 %dir %{codecsdir}/
264 %dir %{_datadir}/mplayer/
265 %{_mandir}/man1/mplayer.1*
266 %lang(cs) %{_mandir}/cs/man1/mplayer.1*
267 %lang(de) %{_mandir}/de/man1/mplayer.1*
268 %lang(es) %{_mandir}/es/man1/mplayer.1*
269 %lang(fr) %{_mandir}/fr/man1/mplayer.1*
270 %lang(hu) %{_mandir}/hu/man1/mplayer.1*
271 %lang(it) %{_mandir}/it/man1/mplayer.1*
272 %lang(pl) %{_mandir}/pl/man1/mplayer.1*
273 %lang(ru) %{_mandir}/ru/man1/mplayer.1*
274 %lang(zh_CN) %{_mandir}/zh_CN/man1/mplayer.1*
276 %files gui
277 %defattr(-, root, root, -)
278 %{_bindir}/gmplayer
279 %{_datadir}/applications/*mplayer.desktop
280 %{_datadir}/icons/hicolor/32x32/apps/mplayer.xpm
281 %{_datadir}/mplayer/skins/
283 %files doc
284 %defattr(-, root, root, -)
285 %doc doc/en/ doc/tech/
286 %lang(cs) %doc doc/cs/
287 %lang(de) %doc doc/de/
288 %lang(es) %doc doc/es/
289 %lang(fr) %doc doc/fr/
290 %lang(hu) %doc doc/hu/
291 %lang(pl) %doc doc/pl/
292 %lang(ru) %doc doc/ru/
293 %lang(zh_CN) %doc doc/zh_CN/
296 %changelog
297 * Sat Oct 06 2007 Dominik Mierzejewski <rpm at greysector.net>
298 - adapted livna specfile for inclusion in SVN