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