1 |
%define build_3264bit 0 |
2 |
%{?_with_3264bit: %{expand: %%global build_3264bit 1}} |
3 |
%{?_without_3264bit: %{expand: %%global build_3264bit 0}} |
4 |
%if %{build_3264bit} |
5 |
%define pkgext 32 |
6 |
%else |
7 |
%define pkgext %{nil} |
8 |
%endif |
9 |
|
10 |
%define name mplayer%{pkgext} |
11 |
%define Name MPlayer |
12 |
%define Summary Movie player for linux |
13 |
%define prerel rc4 |
14 |
%define version 1.0 |
15 |
%define fversion %svn |
16 |
%define svn r34537 |
17 |
%if %svn |
18 |
%define rel 1.%prerel.0.%svn.1 |
19 |
%else |
20 |
%define rel 1.%prerel.5 |
21 |
%endif |
22 |
%define release %mkrel %rel |
23 |
|
24 |
%define build_plf 0 |
25 |
%define build_optimization 0 |
26 |
%define build_debug 0 |
27 |
%define build_mencoder 1 |
28 |
%define build_gui 1 |
29 |
|
30 |
%define build_yasm 1 |
31 |
%define build_live 1 |
32 |
%define build_vesa 1 |
33 |
%define build_theora 1 |
34 |
%define build_ggi 0 |
35 |
%define build_lirc 1 |
36 |
%define build_xmms 0 |
37 |
%define build_amr 0 |
38 |
%define build_arts 0 |
39 |
%define build_aa 1 |
40 |
%define build_cdda 1 |
41 |
%define build_compiz 0 |
42 |
%define build_dirac 1 |
43 |
%define build_dv 1 |
44 |
%define build_sdl 1 |
45 |
%define build_lzo 1 |
46 |
%define build_smb 1 |
47 |
%define build_mga 1 |
48 |
%define build_fbdev 1 |
49 |
%define build_dvb 1 |
50 |
%define build_fribidi 1 |
51 |
%define build_enca 1 |
52 |
%define build_alsa 1 |
53 |
%define build_jack 1 |
54 |
%define build_openal 0 |
55 |
%define build_pulse 1 |
56 |
%define build_schroedinger 1 |
57 |
%define build_twolame 0 |
58 |
%define build_lame 0 |
59 |
%define build_faac 0 |
60 |
%define build_faad 0 |
61 |
%define build_x264 0 |
62 |
%define build_xvid 0 |
63 |
%define build_dts 0 |
64 |
%define build_directfb 1 |
65 |
%define build_v4l2 1 |
66 |
%define build_xvmc 1 |
67 |
%define build_vdpau 1 |
68 |
%define build_ivtv 0 |
69 |
%define build_libass 1 |
70 |
%define build_vpx 1 |
71 |
%define build_rtmp 1 |
72 |
%define build_zr 0 |
73 |
|
74 |
%define build_smb 0 |
75 |
|
76 |
%ifnarch %ix86 |
77 |
%define build_vesa 0 |
78 |
%endif |
79 |
|
80 |
%if "%{?distro_section}" == "tainted" |
81 |
%define build_plf 1 |
82 |
%endif |
83 |
|
84 |
%if %build_plf |
85 |
%define build_amr 1 |
86 |
%define build_twolame 1 |
87 |
%define build_lame 1 |
88 |
%define build_faac 0 |
89 |
%define build_faad 1 |
90 |
%define build_x264 1 |
91 |
%define build_xvid 1 |
92 |
%define build_dts 1 |
93 |
%define build_yasm 1 |
94 |
%define build_dirac 1 |
95 |
%define build_schroedinger 1 |
96 |
%endif |
97 |
|
98 |
%{?_with_amr: %{expand: %%global build_amr 1}} |
99 |
%{?_without_amr: %{expand: %%global build_amr 0}} |
100 |
%{?_with_live: %{expand: %%global build_live 1}} |
101 |
%{?_without_live: %{expand: %%global build_live 0}} |
102 |
%{?_with_yasm: %{expand: %%global build_yasm 1}} |
103 |
%{?_without_yasm: %{expand: %%global build_yasm 0}} |
104 |
%{?_with_vesa: %{expand: %%global build_vesa 1}} |
105 |
%{?_without_vesa: %{expand: %%global build_vesa 0}} |
106 |
%{?_with_optimization: %{expand: %%global build_optimization 1}} |
107 |
%{?_with_debug: %{expand: %%global build_debug 1}} |
108 |
%{?_without_debug: %{expand: %%global build_debug 0}} |
109 |
%{?_with_mencoder: %{expand: %%global build_mencoder 1}} |
110 |
%{?_without_mencoder: %{expand: %%global build_mencoder 0}} |
111 |
%{?_with_gui: %{expand: %%global build_gui 1}} |
112 |
%{?_without_gui: %{expand: %%global build_gui 0}} |
113 |
%{?_with_theora: %{expand: %%global build_theora 1}} |
114 |
%{?_without_theora: %{expand: %%global build_theora 0}} |
115 |
%{?_with_smb: %{expand: %%global build_smb 1}} |
116 |
%{?_without_smb: %{expand: %%global build_smb 0}} |
117 |
%{?_with_ggi: %{expand: %%global build_ggi 1}} |
118 |
%{?_without_ggi: %{expand: %%global build_ggi 0}} |
119 |
%{?_with_lirc: %{expand: %%global build_lirc 1}} |
120 |
%{?_without_lirc: %{expand: %%global build_lirc 0}} |
121 |
%{?_with_xmms: %{expand: %%global build_xmms 1}} |
122 |
%{?_without_xmms: %{expand: %%global build_xmms 0}} |
123 |
%{?_with_arts: %{expand: %%global build_arts 1}} |
124 |
%{?_without_arts: %{expand: %%global build_arts 0}} |
125 |
%{?_with_aa: %{expand: %%global build_aa 1}} |
126 |
%{?_without_aa: %{expand: %%global build_aa 0}} |
127 |
%{?_with_cdda: %{expand: %%global build_cdda 1}} |
128 |
%{?_without_cdda: %{expand: %%global build_cdda 0}} |
129 |
%{?_with_dirac: %{expand: %%global build_dirac 1}} |
130 |
%{?_without_dirac: %{expand: %%global build_dirac 0}} |
131 |
%{?_with_dv: %{expand: %%global build_dv 1}} |
132 |
%{?_without_dv: %{expand: %%global build_dv 0}} |
133 |
%{?_with_sdl: %{expand: %%global build_sdl 1}} |
134 |
%{?_without_sdl: %{expand: %%global build_sdl 0}} |
135 |
%{?_with_lzo: %{expand: %%global build_lzo 1}} |
136 |
%{?_without_lzo: %{expand: %%global build_lzo 0}} |
137 |
%{?_with_mga: %{expand: %%global build_mga 1}} |
138 |
%{?_without_mga: %{expand: %%global build_mga 0}} |
139 |
%{?_with_fribidi: %{expand: %%global build_fribidi 1}} |
140 |
%{?_without_fribidi: %{expand: %%global build_fribidi 0}} |
141 |
%{?_with_enca: %{expand: %%global build_enca 1}} |
142 |
%{?_without_enca: %{expand: %%global build_enca 0}} |
143 |
%{?_with_jack: %{expand: %%global build_jack 1}} |
144 |
%{?_without_jack: %{expand: %%global build_jack 0}} |
145 |
%{?_with_libass: %{expand: %%global build_libass 1}} |
146 |
%{?_without_libass: %{expand: %%global build_libass 0}} |
147 |
%{?_with_pulse: %{expand: %%global build_pulse 1}} |
148 |
%{?_without_pulse: %{expand: %%global build_pulse 0}} |
149 |
%{?_with_openal: %{expand: %%global build_openal 1}} |
150 |
%{?_without_openal: %{expand: %%global build_openal 0}} |
151 |
%{?_with_schroedinger: %{expand: %%global build_schroedinger 1}} |
152 |
%{?_without_schroedinger: %{expand: %%global build_schroedinger 0}} |
153 |
%{?_with_twolame: %{expand: %%global build_twolame 1}} |
154 |
%{?_without_twolame: %{expand: %%global build_twolame 0}} |
155 |
%{?_with_lame: %{expand: %%global build_lame 1}} |
156 |
%{?_without_lame: %{expand: %%global build_lame 0}} |
157 |
%{?_with_faac: %{expand: %%global build_faac 1}} |
158 |
%{?_without_faac: %{expand: %%global build_faac 0}} |
159 |
%{?_with_faad: %{expand: %%global build_faad 1}} |
160 |
%{?_without_faad: %{expand: %%global build_faad 0}} |
161 |
%{?_with_x264: %{expand: %%global build_x264 1}} |
162 |
%{?_without_x264: %{expand: %%global build_x264 0}} |
163 |
%{?_with_xvid: %{expand: %%global build_xvid 1}} |
164 |
%{?_without_xvid: %{expand: %%global build_xvid 0}} |
165 |
%{?_with_dts: %{expand: %%global build_dts 1}} |
166 |
%{?_without_dts: %{expand: %%global build_dts 0}} |
167 |
%{?_with_directfb: %{expand: %%global build_directfb 1}} |
168 |
%{?_without_directfb: %{expand: %%global build_directfb 0}} |
169 |
%{?_with_rtmp: %{expand: %%global build_rtmp 1}} |
170 |
%{?_without_rtmp: %{expand: %%global build_rtmp 0}} |
171 |
%{?_with_v4l2: %{expand: %%global build_v4l2 1}} |
172 |
%{?_without_v4l2: %{expand: %%global build_v4l2 0}} |
173 |
%{?_with_xvmc: %{expand: %%global build_xvmc 1}} |
174 |
%{?_without_xvmc: %{expand: %%global build_xvmc 0}} |
175 |
%{?_with_vdpau: %{expand: %%global build_vdpau 1}} |
176 |
%{?_without_vdpau: %{expand: %%global build_vdpau 0}} |
177 |
%{?_with_vpx: %{expand: %%global build_vpx 1}} |
178 |
%{?_without_vpx: %{expand: %%global build_vpx 0}} |
179 |
|
180 |
|
181 |
Name: %{name} |
182 |
Version: %{version} |
183 |
Release: %{release} |
184 |
Summary: %{Summary} |
185 |
%if %svn |
186 |
#gw generated using svn export |
187 |
Source0: %{name}-%{svn}.tar.xz |
188 |
%else |
189 |
Source0: %{Name}-%{fversion}.tar.bz2 |
190 |
%endif |
191 |
#gw default skin |
192 |
Source4: Blue-1.5.tar.bz2 |
193 |
Patch0: mplayer-distro-config.patch |
194 |
#anssi fix vp6f playback, patch okayed by ffmpeg upstream |
195 |
Patch3: mplayer-mp3lib-no-strict-aliasing.patch |
196 |
Patch7: mplayer-1.0pre1-nomgafirst.patch |
197 |
Patch21: mplayer-1.0rc2-compiz.patch |
198 |
# fixes for crashes found while fixing CVE-2008-1558 |
199 |
Patch28: mplayer-rtsp-extra-fixes.patch |
200 |
Patch31: mplayer-format-string-literal.patch |
201 |
Patch32: mplayer-gui-format-string-literal.patch |
202 |
#gw HAVE_DLFCN_H isn't defined |
203 |
Patch33: mplayer-have-dlfcn_h.patch |
204 |
#gw fix crash: https://qa.mandriva.com/show_bug.cgi?id=55443 |
205 |
Patch35: mplayer-fix-dvd-crash.patch |
206 |
# rediffed from http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/42_aac_zero_bands.patch?revision=25254&view=markup&pathrev=26428 |
207 |
Patch45: ffmpeg-CVE-2009-4636.patch |
208 |
# rediffed from http://git.videolan.org/?p=ffmpeg.git;a=commit;h=44511b17cbbb524602c91a198e7314fa57a7062a |
209 |
Patch46: ffmpeg-CVE-2011-0722.patch |
210 |
|
211 |
URL: http://www.mplayerhq.hu |
212 |
License: GPLv2 |
213 |
Group: Video |
214 |
BuildRequires: libncurses-devel |
215 |
%if %build_aa |
216 |
BuildRequires: libaa-devel |
217 |
%endif |
218 |
BuildRequires: a52dec-devel |
219 |
%if %build_arts |
220 |
BuildRequires: libarts-devel |
221 |
%endif |
222 |
%if %build_amr |
223 |
BuildRequires: opencore-amr-devel |
224 |
%endif |
225 |
|
226 |
%if %build_jack |
227 |
BuildRequires: libjack-devel |
228 |
%endif |
229 |
%if %build_pulse |
230 |
BuildRequires: libpulseaudio-devel |
231 |
%endif |
232 |
%if %build_openal |
233 |
BuildRequires: libopenal-devel |
234 |
%endif |
235 |
%if %build_cdda |
236 |
BuildRequires: libcdda-devel |
237 |
%endif |
238 |
%if %build_dirac |
239 |
BuildRequires: libdirac-devel >= 0.9.0 |
240 |
%endif |
241 |
%if %build_schroedinger |
242 |
BuildRequires: libschroedinger-devel |
243 |
%endif |
244 |
%if %build_dv |
245 |
BuildRequires: libdv-devel |
246 |
%endif |
247 |
BuildRequires: libdxr3-devel |
248 |
BuildRequires: libjpeg-devel |
249 |
BuildRequires: openjpeg-devel |
250 |
%if %build_lirc |
251 |
BuildRequires: liblirc-devel |
252 |
%endif |
253 |
%if %build_lzo |
254 |
BuildRequires: liblzo-devel |
255 |
%endif |
256 |
BuildRequires: libmad-devel |
257 |
BuildRequires: libnas-devel |
258 |
BuildRequires: libpng-devel |
259 |
%if %build_sdl |
260 |
BuildRequires: libSDL-devel >= 1.1.8 |
261 |
%endif |
262 |
BuildRequires: libtermcap-devel |
263 |
%if %build_xmms |
264 |
BuildRequires: libxmms-devel |
265 |
%endif |
266 |
%if %build_ggi |
267 |
BuildRequires: libggiwmh-devel |
268 |
%endif |
269 |
%if %build_smb |
270 |
# require samba < 3.2.0 to avoid shipping GPLv2 vs GPLv3 |
271 |
BuildRequires: libsmbclient-devel < 3.2.0 |
272 |
%endif |
273 |
%if %build_twolame |
274 |
BuildRequires: libtwolame-devel |
275 |
%endif |
276 |
%if %build_faac |
277 |
BuildRequires: libfaac-devel |
278 |
%endif |
279 |
%if %build_faad |
280 |
BuildRequires: libfaad2-devel |
281 |
%endif |
282 |
%if %build_x264 |
283 |
BuildRequires: libx264-devel >= 0.120 |
284 |
%endif |
285 |
%if %build_xvid |
286 |
BuildRequires: xvid-devel >= 1.0.0-0.beta2.1plf |
287 |
%endif |
288 |
%if %build_dts |
289 |
BuildRequires: dtsdec-devel |
290 |
%endif |
291 |
%if %build_lame |
292 |
BuildRequires: liblame-devel |
293 |
%endif |
294 |
%if %build_plf |
295 |
Requires: %mklibname dvdcss 2 |
296 |
%endif |
297 |
%if %build_live |
298 |
BuildRequires: live-devel |
299 |
%endif |
300 |
%if %build_vesa |
301 |
BuildRequires: libvbe-devel liblrmi-devel |
302 |
%endif |
303 |
%if %build_theora |
304 |
BuildRequires: libtheora-devel |
305 |
%endif |
306 |
%if %build_fribidi |
307 |
BuildRequires: libfribidi-devel >= 0.10.4 |
308 |
%endif |
309 |
%if %build_enca |
310 |
BuildRequires: libenca-devel |
311 |
%endif |
312 |
%if %build_directfb |
313 |
BuildRequires: libdirectfb-devel |
314 |
%endif |
315 |
%if %build_xvmc |
316 |
BuildRequires: libxvmc-devel |
317 |
%endif |
318 |
%if %build_vdpau |
319 |
BuildRequires: vdpau-devel |
320 |
%endif |
321 |
%if %build_libass |
322 |
BuildRequires: libass-devel |
323 |
%endif |
324 |
BuildRequires: gsm-devel |
325 |
BuildRequires: libmpg123-devel |
326 |
%if %build_vpx |
327 |
BuildRequires: libvpx-devel |
328 |
%endif |
329 |
%if %build_rtmp |
330 |
BuildRequires: rtmp-devel |
331 |
%endif |
332 |
BuildRequires: bzip2-devel |
333 |
BuildRequires: libmng-devel |
334 |
BuildRequires: libmesagl-devel |
335 |
BuildRequires: libxxf86vm-devel |
336 |
BuildRequires: libxxf86dga-devel |
337 |
BuildRequires: libxscrnsaver-devel |
338 |
BuildRequires: libspeex-devel |
339 |
BuildRequires: libmpcdec-devel |
340 |
BuildRequires: ladspa-devel |
341 |
BuildRequires: libxslt-proc |
342 |
BuildRequires: docbook-style-xsl |
343 |
BuildRequires: docbook-dtd412-xml |
344 |
BuildRequires: libcaca-devel |
345 |
BuildRequires: giflib-devel |
346 |
%if %build_yasm |
347 |
BuildRequires: yasm |
348 |
%endif |
349 |
BuildRequires: libbs2b-devel |
350 |
|
351 |
Provides: mplayer%{pkgext}1.0 |
352 |
Obsoletes: mplayer%{pkgext}1.0 |
353 |
|
354 |
|
355 |
%description |
356 |
MPlayer is a movie player for LINUX (runs on many other Unices, and |
357 |
non-x86 CPUs, see the documentation). It plays most MPEG, VOB, AVI, |
358 |
VIVO, ASF/WMV, QT/MOV, FLI, NuppelVideo, yuv4mpeg, FILM, RoQ, and some |
359 |
RealMedia files, supported by many native, XAnim, and Win32 DLL codecs. |
360 |
You can watch VideoCD, SVCD, DVD, 3ivx, FLI, and even DivX movies too |
361 |
(and you don't need the avifile library at all!). The another big |
362 |
feature of mplayer is the wide range of supported output drivers. It |
363 |
works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, but you can use |
364 |
SDL (and this way all drivers of SDL), VESA (on every VESA compatible |
365 |
card, even without X!), and some lowlevel card-specific drivers (for |
366 |
Matrox, 3Dfx and Radeon) too! Most of them supports software or hardware |
367 |
scaling, so you can enjoy movies in fullscreen. MPlayer supports |
368 |
displaying through some hardware MPEG decoder boards, such as the DVB |
369 |
and DXR3/Hollywood+! And what about the nice big antialiased shaded |
370 |
subtitles (9 supported types!!!) with european/ISO 8859-1,2 (hungarian, |
371 |
english, czech, etc), cyrillic, korean fonts, and OSD? |
372 |
|
373 |
Note: If you want to play Real content, you need to have the content |
374 |
of RealPlayer's Codecs directory in %_libdir/codecs/ |
375 |
%if %build_plf |
376 |
|
377 |
This package is in the 'tainted' section because some included codecs |
378 |
are covered by patents. It also includes support for reading DVDs |
379 |
encrypted with CSS which might be illegal in some countries. |
380 |
|
381 |
For non-free binary codecs support you should install the packages |
382 |
win32-codecs, real-codecs and xanim-codecs. |
383 |
%endif |
384 |
|
385 |
%package doc |
386 |
Summary: %{Name} documentation |
387 |
Group: Books/Computer books |
388 |
|
389 |
%description doc |
390 |
This package contains documentation for %{Name}. |
391 |
|
392 |
%if %build_gui |
393 |
%package gui |
394 |
Summary: GUI for %{name} |
395 |
Group: Video |
396 |
Requires: %{name} = %{version} |
397 |
BuildRequires: gtk+2-devel |
398 |
BuildRequires: imagemagick |
399 |
Requires: soundwrapper |
400 |
Provides: mplayer%{pkgext}1.0-gui |
401 |
Obsoletes: mplayer%{pkgext}1.0-gui |
402 |
Conflicts: mplayer-skins < 1.3-8 |
403 |
|
404 |
%description gui |
405 |
This package contains a GUI for %{name}. |
406 |
%endif |
407 |
|
408 |
%if %build_mencoder |
409 |
%package -n mencoder%{pkgext} |
410 |
Summary: MPlayer's movie encoder |
411 |
Group: Video |
412 |
Requires: %{name} = %version |
413 |
Provides: mencoder%{pkgext}1.0 |
414 |
Obsoletes: mencoder%{pkgext}1.0 |
415 |
|
416 |
%description -n mencoder%{pkgext} |
417 |
MEncoder a movie encoder and is a part of the MPlayer package. |
418 |
%if !%build_plf |
419 |
Note: this version doesn't have support for encoding mp3 audio streams in the |
420 |
video files. |
421 |
%else |
422 |
This 'tainted' build has additional support for AAC decoding with libfaad |
423 |
and MP3 encoding with lame, both are covered by software patents. It |
424 |
also includes support for reading DVDs encrypted with CSS which might |
425 |
be illegal in some countries. |
426 |
%endif |
427 |
%endif |
428 |
|
429 |
|
430 |
%prep |
431 |
rm -rf %{buildroot} |
432 |
|
433 |
%if %svn |
434 |
%setup -q -n %name -a 4 |
435 |
%else |
436 |
%setup -q -n MPlayer-%{version}%{prerel} -a 4 |
437 |
%endif |
438 |
#gw as we have have used svn export: |
439 |
echo %svn|sed s/^r// > snapshot_version |
440 |
find DOCS -name .svn|xargs rm -rf |
441 |
#gw fix permissions |
442 |
chmod 644 AUTHORS Changelog README Copyright |
443 |
rm -f Blue/README |
444 |
%patch0 -p1 -b .distro-config |
445 |
#%patch3 -p1 -b .mp2 |
446 |
#%patch7 -p1 -b .mga |
447 |
#%patch21 -p0 -b .compiz |
448 |
%patch28 -p1 -b .rtsp-extra-fixes |
449 |
%patch31 -p1 -b .format~ |
450 |
%patch32 -p0 -b .format~ |
451 |
%patch33 -p0 |
452 |
%patch35 -p0 |
453 |
|
454 |
pushd ffmpeg |
455 |
%patch45 -p1 -b .CVE-2009-4636 |
456 |
%patch46 -p1 -b .CVE-2011-0722 |
457 |
popd |
458 |
|
459 |
perl -pi -e 's^r\$svn_revision^%release^' version.sh |
460 |
|
461 |
mv DOCS/README README.DOCS |
462 |
|
463 |
%build |
464 |
%if !%build_optimization |
465 |
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" |
466 |
%endif |
467 |
%if %build_debug |
468 |
export CFLAGS="$CFLAGS -g" |
469 |
%endif |
470 |
%ifarch ppc |
471 |
export CFLAGS="$CFLAGS -mcpu=7450 -maltivec" |
472 |
%endif |
473 |
%if %build_directfb |
474 |
export CPPFLAGS="-I%_includedir/directfb" |
475 |
%endif |
476 |
%if %{build_3264bit} |
477 |
export EXESUF=32 |
478 |
%endif |
479 |
export LDFLAGS="%{?ldflags}" |
480 |
./configure \ |
481 |
--prefix=%{_prefix} \ |
482 |
--datadir=%{_datadir}/%{name} \ |
483 |
--confdir=%{_sysconfdir}/%{name} \ |
484 |
--libdir=%_libdir \ |
485 |
%if !%build_optimization |
486 |
--enable-runtime-cpudetection \ |
487 |
%ifarch %ix86 |
488 |
--enable-mmx \ |
489 |
--enable-3dnow \ |
490 |
--enable-sse \ |
491 |
--enable-sse2 \ |
492 |
--enable-fastmemcpy \ |
493 |
%endif |
494 |
%endif |
495 |
--enable-freetype \ |
496 |
--enable-nas \ |
497 |
%if %build_debug |
498 |
--enable-debug=3 \ |
499 |
%else |
500 |
--disable-sighandler \ |
501 |
%endif |
502 |
%if %build_gui |
503 |
--enable-gui \ |
504 |
%endif |
505 |
--language=all \ |
506 |
\ |
507 |
%if ! %build_faad |
508 |
--disable-faad \ |
509 |
--disable-decoder=AAC \ |
510 |
%endif |
511 |
--disable-libdvdcss-internal \ |
512 |
%if %build_lirc |
513 |
--enable-lirc \ |
514 |
%else |
515 |
--disable-lirc \ |
516 |
%endif |
517 |
--enable-tv \ |
518 |
%if ! %build_v4l2 |
519 |
--disable-tv-v4l2 \ |
520 |
%endif |
521 |
--enable-joystick \ |
522 |
\ |
523 |
--enable-gl \ |
524 |
--disable-svga \ |
525 |
%if ! %build_mga |
526 |
--disable-mga \ |
527 |
%endif |
528 |
%if ! %build_fbdev |
529 |
--disable-fbdev \ |
530 |
%endif |
531 |
%if %build_directfb |
532 |
--enable-directfb \ |
533 |
%else |
534 |
--disable-directfb \ |
535 |
%endif |
536 |
%if %build_mencoder |
537 |
--enable-mencoder \ |
538 |
%else |
539 |
--disable-mencoder \ |
540 |
%endif |
541 |
%if ! %build_live |
542 |
--disable-live \ |
543 |
%endif |
544 |
%if ! %build_vesa |
545 |
--disable-vesa \ |
546 |
%endif |
547 |
%if %build_theora |
548 |
--enable-theora \ |
549 |
%else |
550 |
--disable-theora \ |
551 |
%endif |
552 |
--enable-menu \ |
553 |
%if %build_xmms |
554 |
--enable-xmms --with-xmmslibdir=%{_libdir} \ |
555 |
%endif |
556 |
%if %build_smb |
557 |
--enable-smb \ |
558 |
%endif |
559 |
%if ! %build_dvb |
560 |
--disable-dvb \ |
561 |
%endif |
562 |
%if ! %build_ggi |
563 |
--disable-ggi \ |
564 |
%endif |
565 |
--codecsdir=%{_libdir}/codecs \ |
566 |
%if ! %build_arts |
567 |
--disable-arts \ |
568 |
%endif |
569 |
%if ! %build_jack |
570 |
--disable-jack \ |
571 |
%endif |
572 |
%if ! %build_aa |
573 |
--disable-aa \ |
574 |
%endif |
575 |
%if ! %build_cdda |
576 |
--disable-cdparanoia \ |
577 |
%endif |
578 |
%if ! %build_dv |
579 |
--disable-libdv \ |
580 |
%endif |
581 |
%if ! %build_lzo |
582 |
--disable-liblzo \ |
583 |
%endif |
584 |
%if ! %build_sdl |
585 |
--disable-sdl \ |
586 |
%endif |
587 |
%if ! %build_alsa |
588 |
--disable-alsa \ |
589 |
%endif |
590 |
%if ! %build_fribidi |
591 |
--disable-fribidi \ |
592 |
%endif |
593 |
%if !%build_enca |
594 |
--disable-enca \ |
595 |
%endif |
596 |
%if %build_pulse |
597 |
--enable-pulse \ |
598 |
%endif |
599 |
%if !%build_openal |
600 |
--disable-openal \ |
601 |
%endif |
602 |
%if %build_zr |
603 |
--enable-zr \ |
604 |
%endif |
605 |
%if %build_xvmc |
606 |
--enable-xvmc \ |
607 |
%endif |
608 |
%if ! %build_ivtv |
609 |
--disable-ivtv \ |
610 |
%endif |
611 |
%if ! %build_vdpau |
612 |
--disable-vdpau |
613 |
%endif |
614 |
|
615 |
|
616 |
# Keep this line before empty end %%configure (ppc conditionnal pb) |
617 |
make EXESUF=%{pkgext} |
618 |
#gw make sure we have our version string included: |
619 |
fgrep %release version.h |
620 |
|
621 |
%install |
622 |
rm -rf %{buildroot} |
623 |
install -d -m 755 %{buildroot}%{_bindir} |
624 |
install -d -m 755 %{buildroot}%{_datadir}/%name |
625 |
install -d -m 755 %{buildroot}%{_sysconfdir}/%name |
626 |
install -m 755 mplayer%{pkgext} -D %{buildroot}%{_bindir}/mplayer%{pkgext} |
627 |
for lang in en de fr hu pl zh_CN es it; do |
628 |
install -m 644 DOCS/man/$lang/mplayer.1 -D %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mplayer%{pkgext}.1 |
629 |
done |
630 |
%find_lang mplayer%{pkgext} --with-man |
631 |
|
632 |
%if %build_mencoder |
633 |
install -m 755 mencoder%{pkgext} -D %{buildroot}%{_bindir}/mencoder%{pkgext} |
634 |
|
635 |
for lang in en de fr hu pl zh_CN es it; do |
636 |
ln -s mplayer%{pkgext}.1 %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mencoder%{pkgext}.1 |
637 |
done |
638 |
%find_lang mencoder%{pkgext} --with-man |
639 |
install -m 755 TOOLS/mencvcd.sh %buildroot%_bindir/mencvcd%{pkgext} |
640 |
install -m 755 TOOLS/divx2svcd.sh %buildroot%_bindir/divx2svcd%{pkgext} |
641 |
install -m 755 TOOLS/wma2ogg.pl %buildroot%_bindir/wma2ogg%{pkgext}.pl |
642 |
install -m 755 TOOLS/midentify.sh %buildroot%_bindir/midentify%{pkgext} |
643 |
%endif |
644 |
install -m 644 etc/example.conf %{buildroot}%{_sysconfdir}/%{name}/mplayer.conf |
645 |
install -m 644 etc/menu.conf %{buildroot}%{_sysconfdir}/%{name} |
646 |
|
647 |
%if %build_gui |
648 |
# default Skin |
649 |
install -d -m 755 %buildroot%_datadir/%name/Skin/ |
650 |
cp -r Blue %buildroot%_datadir/%name/Skin/ |
651 |
ln -s Blue %buildroot%_datadir/%name/Skin/default |
652 |
# gmplayer equals mplayer -gui |
653 |
ln -s mplayer%{pkgext} %{buildroot}%{_bindir}/gmplayer%{pkgext} |
654 |
# icons |
655 |
mkdir -p %{buildroot}{%_liconsdir,%_iconsdir,%{_miconsdir}} |
656 |
convert -transparent white Blue/icons/icon48x48.png %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png |
657 |
convert -transparent white Blue/icons/icon32x32.png %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png |
658 |
convert -transparent white -scale 16x16 Blue/icons/icon48x48.png %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png |
659 |
install -D -m 644 etc/mplayer.desktop %buildroot%_datadir/applications/mplayer%{pkgext}.desktop |
660 |
perl -pi -e 's@mplayer$@mplayer%{pkgext}@g' %buildroot%_datadir/applications/mplayer%{pkgext}.desktop |
661 |
%endif |
662 |
%if %{build_3264bit} |
663 |
if [ -e %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png ]; then |
664 |
convert %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png -channel green -negate \ |
665 |
%{buildroot}%{_liconsdir}/mplayer%{pkgext}.png |
666 |
fi |
667 |
if [ -e %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png ]; then |
668 |
convert %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png -channel green -negate \ |
669 |
%{buildroot}%{_iconsdir}/mplayer%{pkgext}.png |
670 |
fi |
671 |
if [ -e %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png ]; then |
672 |
convert %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png -channel green -negate \ |
673 |
%{buildroot}%{_miconsdir}/mplayer%{pkgext}.png |
674 |
fi |
675 |
%endif |
676 |
|
677 |
%if %build_debug |
678 |
export DONT_STRIP=1 |
679 |
%endif |
680 |
|
681 |
%if %build_gui |
682 |
%pre gui |
683 |
if [ -d %_datadir/%name/Skin/default ] |
684 |
then rm -rf %_datadir/%name/Skin/default |
685 |
fi |
686 |
%endif |
687 |
|
688 |
%clean |
689 |
rm -rf %{buildroot} |
690 |
|
691 |
%files -f mplayer%{pkgext}.lang |
692 |
%doc AUTHORS Changelog README Copyright |
693 |
%dir %{_sysconfdir}/%name |
694 |
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/mplayer.conf |
695 |
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/menu.conf |
696 |
%{_bindir}/midentify%{pkgext} |
697 |
%{_bindir}/mplayer%{pkgext} |
698 |
%{_mandir}/man1/mplayer%{pkgext}.1* |
699 |
%dir %{_datadir}/%{name} |
700 |
|
701 |
%files doc |
702 |
%defattr(-,root,root,755) |
703 |
%doc README.DOCS |
704 |
%doc DOCS/default.css DOCS/xml DOCS/tech/ |
705 |
|
706 |
%if %build_mencoder |
707 |
%files -n mencoder%{pkgext} -f mencoder%{pkgext}.lang |
708 |
%{_bindir}/mencoder%{pkgext} |
709 |
%{_bindir}/divx2svcd%{pkgext} |
710 |
%{_bindir}/mencvcd%{pkgext} |
711 |
%{_bindir}/wma2ogg%{pkgext}.pl |
712 |
%{_mandir}/man1/mencoder%{pkgext}.1* |
713 |
%endif |
714 |
|
715 |
%if %build_gui |
716 |
%files gui |
717 |
%{_bindir}/gmplayer%{pkgext} |
718 |
%_datadir/applications/mplayer%{pkgext}.desktop |
719 |
%_datadir/%name/Skin/ |
720 |
%{_iconsdir}/mplayer%{pkgext}.png |
721 |
%{_miconsdir}/mplayer%{pkgext}.png |
722 |
%{_liconsdir}/mplayer%{pkgext}.png |
723 |
%endif |
724 |
|
725 |
|
726 |
|
727 |
|