/[packages]/cauldron/mplayer/current/SPECS/mplayer.spec
ViewVC logotype

Annotation of /cauldron/mplayer/current/SPECS/mplayer.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193589 - (hide annotations) (download)
Mon Jan 9 00:23:47 2012 UTC (12 years, 3 months ago) by luigiwalser
File size: 20952 byte(s)
enable runtime cpu detection on x86_64 (from mdv)
1 blino 24858 %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 r32713
17     %if %svn
18 fwang 181283 %define rel 1.%prerel.0.%svn.11
19 blino 24858 %else
20 cjw 100681 %define rel 1.%prerel.5
21 blino 24858 %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 ahmad 81539 %define build_zr 0
73 blino 24858
74     %define build_smb 0
75    
76     %ifnarch %ix86
77     %define build_vesa 0
78     %endif
79    
80 cjw 100681 %if "%{?distro_section}" == "tainted"
81     %define build_plf 1
82     %endif
83    
84 blino 24858 %if %build_plf
85     %define build_amr 1
86     %define build_twolame 1
87     %define build_lame 1
88 cjw 100681 %define build_faac 0
89 blino 24858 %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 blino 53362 Patch0: mplayer-distro-config.patch
194 fwang 145937 Patch1: mplayer-1.0-libpng1.5.patch
195 blino 24858 #anssi fix vp6f playback, patch okayed by ffmpeg upstream
196     Patch3: mplayer-mp3lib-no-strict-aliasing.patch
197     Patch7: mplayer-1.0pre1-nomgafirst.patch
198     Patch12: mplayer-desktopentry.patch
199     Patch21: mplayer-1.0rc2-compiz.patch
200     # fixes for crashes found while fixing CVE-2008-1558
201     Patch28: mplayer-rtsp-extra-fixes.patch
202     Patch31: mplayer-format-string-literal.patch
203     #gw HAVE_DLFCN_H isn't defined
204     Patch33: mplayer-have-dlfcn_h.patch
205     #gw fix crash: https://qa.mandriva.com/show_bug.cgi?id=55443
206     Patch35: mplayer-fix-dvd-crash.patch
207     URL: http://www.mplayerhq.hu
208     License: GPLv2
209     Group: Video
210     BuildRequires: libncurses-devel
211     %if %build_aa
212     BuildRequires: libaa-devel
213     %endif
214     BuildRequires: a52dec-devel
215     %if %build_arts
216     BuildRequires: libarts-devel
217     %endif
218     %if %build_amr
219     BuildRequires: opencore-amr-devel
220     %endif
221    
222     %if %build_jack
223     BuildRequires: libjack-devel
224     %endif
225     %if %build_pulse
226     BuildRequires: libpulseaudio-devel
227     %endif
228     %if %build_openal
229     BuildRequires: libopenal-devel
230     %endif
231     %if %build_cdda
232     BuildRequires: libcdda-devel
233     %endif
234     %if %build_dirac
235     BuildRequires: libdirac-devel >= 0.9.0
236     %endif
237     %if %build_schroedinger
238     BuildRequires: libschroedinger-devel
239     %endif
240     %if %build_dv
241     BuildRequires: libdv-devel
242     %endif
243     BuildRequires: libdxr3-devel
244     BuildRequires: libjpeg-devel
245     BuildRequires: openjpeg-devel
246     %if %build_lirc
247     BuildRequires: liblirc-devel
248     %endif
249     %if %build_lzo
250     BuildRequires: liblzo-devel
251     %endif
252     BuildRequires: libmad-devel
253     BuildRequires: libnas-devel
254     BuildRequires: libpng-devel
255     %if %build_sdl
256     BuildRequires: libSDL-devel >= 1.1.8
257     %endif
258     BuildRequires: libtermcap-devel
259     %if %build_xmms
260     BuildRequires: libxmms-devel
261     %endif
262     %if %build_ggi
263     BuildRequires: libggiwmh-devel
264     %endif
265     %if %build_smb
266     # require samba < 3.2.0 to avoid shipping GPLv2 vs GPLv3
267     BuildRequires: libsmbclient-devel < 3.2.0
268     %endif
269     %if %build_twolame
270     BuildRequires: libtwolame-devel
271     %endif
272     %if %build_faac
273     BuildRequires: libfaac-devel
274     %endif
275     %if %build_faad
276     BuildRequires: libfaad2-devel
277     %endif
278     %if %build_x264
279     BuildRequires: libx264-devel >= 0.99
280     %endif
281     %if %build_xvid
282     BuildRequires: xvid-devel >= 1.0.0-0.beta2.1plf
283     %endif
284     %if %build_dts
285     BuildRequires: dtsdec-devel
286     %endif
287     %if %build_lame
288     BuildRequires: liblame-devel
289     %endif
290     %if %build_plf
291     Requires: %mklibname dvdcss 2
292     %endif
293     %if %build_live
294     BuildRequires: live-devel
295     %endif
296     %if %build_vesa
297     BuildRequires: libvbe-devel liblrmi-devel
298     %endif
299     %if %build_theora
300     BuildRequires: libtheora-devel
301     %endif
302     %if %build_fribidi
303     BuildRequires: libfribidi-devel >= 0.10.4
304     %endif
305     %if %build_enca
306     BuildRequires: libenca-devel
307     %endif
308     %if %build_directfb
309     BuildRequires: libdirectfb-devel
310     %endif
311     %if %build_xvmc
312     BuildRequires: libxvmc-devel
313     %endif
314     %if %build_vdpau
315     BuildRequires: vdpau-devel
316     %endif
317     %if %build_libass
318     BuildRequires: libass-devel
319     %endif
320     BuildRequires: gsm-devel
321     BuildRequires: libmpg123-devel
322     %if %build_vpx
323     BuildRequires: libvpx-devel
324     %endif
325     %if %build_rtmp
326     BuildRequires: rtmp-devel
327     %endif
328     BuildRequires: bzip2-devel
329     BuildRequires: libmng-devel
330     BuildRequires: libmesagl-devel
331     BuildRequires: libxxf86vm-devel
332     BuildRequires: libxxf86dga-devel
333     BuildRequires: libxscrnsaver-devel
334     BuildRequires: libspeex-devel
335     BuildRequires: libmpcdec-devel
336     BuildRequires: ladspa-devel
337     BuildRequires: libxslt-proc
338     BuildRequires: docbook-style-xsl
339     BuildRequires: docbook-dtd412-xml
340     BuildRequires: libcaca-devel
341     BuildRequires: giflib-devel
342     %if %build_yasm
343     BuildRequires: yasm
344     %endif
345     BuildRequires: libbs2b-devel
346    
347     Provides: mplayer%{pkgext}1.0
348     Obsoletes: mplayer%{pkgext}1.0
349    
350    
351     %description
352     MPlayer is a movie player for LINUX (runs on many other Unices, and
353     non-x86 CPUs, see the documentation). It plays most MPEG, VOB, AVI,
354     VIVO, ASF/WMV, QT/MOV, FLI, NuppelVideo, yuv4mpeg, FILM, RoQ, and some
355     RealMedia files, supported by many native, XAnim, and Win32 DLL codecs.
356     You can watch VideoCD, SVCD, DVD, 3ivx, FLI, and even DivX movies too
357     (and you don't need the avifile library at all!). The another big
358     feature of mplayer is the wide range of supported output drivers. It
359     works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, but you can use
360     SDL (and this way all drivers of SDL), VESA (on every VESA compatible
361     card, even without X!), and some lowlevel card-specific drivers (for
362     Matrox, 3Dfx and Radeon) too! Most of them supports software or hardware
363     scaling, so you can enjoy movies in fullscreen. MPlayer supports
364     displaying through some hardware MPEG decoder boards, such as the DVB
365     and DXR3/Hollywood+! And what about the nice big antialiased shaded
366     subtitles (9 supported types!!!) with european/ISO 8859-1,2 (hungarian,
367     english, czech, etc), cyrillic, korean fonts, and OSD?
368    
369     Note: If you want to play Real content, you need to have the content
370     of RealPlayer's Codecs directory in %_libdir/codecs/
371     %if %build_plf
372    
373 cjw 100681 This package is in the 'tainted' section because some included codecs
374     are covered by patents. It also includes support for reading DVDs
375     encrypted with CSS which might be illegal in some countries.
376 blino 24858
377     For non-free binary codecs support you should install the packages
378     win32-codecs, real-codecs and xanim-codecs.
379     %endif
380    
381     %package doc
382     Summary: %{Name} documentation
383     Group: Books/Computer books
384    
385     %description doc
386     This package contains documentation for %{Name}.
387    
388     %if %build_gui
389     %package gui
390     Summary: GUI for %{name}
391     Group: Video
392     Requires: %{name} = %{version}
393     BuildRequires: gtk+2-devel
394     BuildRequires: imagemagick
395     Requires(post): desktop-file-utils
396     Requires(postun): desktop-file-utils
397     Requires: soundwrapper
398     Provides: mplayer%{pkgext}1.0-gui
399     Obsoletes: mplayer%{pkgext}1.0-gui
400 ahmad 52786 Conflicts: mplayer-skins < 1.3-8
401 blino 24858
402     %description gui
403     This package contains a GUI for %{name}.
404     %endif
405    
406     %if %build_mencoder
407     %package -n mencoder%{pkgext}
408     Summary: MPlayer's movie encoder
409     Group: Video
410     Requires: %{name} = %version
411     Provides: mencoder%{pkgext}1.0
412     Obsoletes: mencoder%{pkgext}1.0
413    
414     %description -n mencoder%{pkgext}
415     MEncoder a movie encoder and is a part of the MPlayer package.
416     %if !%build_plf
417     Note: this version doesn't have support for encoding mp3 audio streams in the
418     video files.
419     %else
420 cjw 100681 This 'tainted' build has additional support for AAC decoding with libfaad
421 blino 24858 and MP3 encoding with lame, both are covered by software patents. It
422     also includes support for reading DVDs encrypted with CSS which might
423     be illegal in some countries.
424     %endif
425     %endif
426    
427    
428     %prep
429 luigiwalser 193578 rm -rf %{buildroot}
430 blino 24858
431     %if %svn
432     %setup -q -n %name -a 4
433     %else
434     %setup -q -n MPlayer-%{version}%{prerel} -a 4
435     %endif
436     #gw as we have have used svn export:
437     echo %svn|sed s/^r// > snapshot_version
438     find DOCS -name .svn|xargs rm -rf
439     #gw fix permissions
440     chmod 644 AUTHORS Changelog README Copyright
441     rm -f Blue/README
442 blino 53362 %patch0 -p0 -b .distro-config
443 fwang 145937 %patch1 -p0 -b .libpng
444 blino 24858 #%patch3 -p1 -b .mp2
445     #%patch7 -p1 -b .mga
446     %patch12 -p1 -b .desktopentry
447     #%patch21 -p0 -b .compiz
448     %patch28 -p1 -b .rtsp-extra-fixes
449     %patch31 -p1 -b .format~
450     %patch33 -p0
451     %patch35 -p0
452    
453     perl -pi -e 's^r\$svn_revision^%release^' version.sh
454    
455     mv DOCS/README README.DOCS
456    
457     %build
458     %if !%build_optimization
459     export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
460     %endif
461     %if %build_debug
462     export CFLAGS="$CFLAGS -g"
463     %endif
464     %ifarch ppc
465     export CFLAGS="$CFLAGS -mcpu=7450 -maltivec"
466     %endif
467     %if %build_directfb
468     export CPPFLAGS="-I%_includedir/directfb"
469     %endif
470     %if %{build_3264bit}
471     export EXESUF=32
472     %endif
473     export LDFLAGS="%{?ldflags}"
474     ./configure \
475     --prefix=%{_prefix} \
476     --datadir=%{_datadir}/%{name} \
477     --confdir=%{_sysconfdir}/%{name} \
478     --libdir=%_libdir \
479     --enable-largefiles \
480     %if !%build_optimization
481     --enable-runtime-cpudetection \
482     %ifarch %ix86
483     --enable-mmx \
484     --enable-3dnow \
485     --enable-sse \
486     --enable-sse2 \
487     --enable-fastmemcpy \
488     %endif
489     %endif
490     --enable-freetype \
491     --enable-nas \
492     %if %build_debug
493     --enable-debug=3 \
494     %else
495     --disable-sighandler \
496     %endif
497     %if %build_gui
498     --enable-gui \
499     %endif
500     --language=all \
501     \
502     %if ! %build_faad
503     --disable-faad-internal \
504     --disable-decoder=AAC \
505     %endif
506     --disable-libdvdcss-internal \
507     %if %build_lirc
508     --enable-lirc \
509     %else
510     --disable-lirc \
511     %endif
512     --enable-tv \
513     %if ! %build_v4l2
514     --disable-tv-v4l2 \
515     %endif
516     --enable-joystick \
517     \
518     --enable-gl \
519     --disable-svga \
520     %if ! %build_mga
521     --disable-mga \
522     %endif
523     %if ! %build_fbdev
524     --disable-fbdev \
525     %endif
526     %if %build_directfb
527     --enable-directfb \
528     %else
529     --disable-directfb \
530     %endif
531     %if %build_mencoder
532     --enable-mencoder \
533     %else
534     --disable-mencoder \
535     %endif
536     %if ! %build_live
537     --disable-live \
538     %endif
539     %if ! %build_vesa
540     --disable-vesa \
541     %endif
542     %if %build_theora
543     --enable-theora \
544     %else
545     --disable-theora \
546     %endif
547     --enable-menu \
548     %if %build_xmms
549     --enable-xmms --with-xmmslibdir=%{_libdir} \
550     %endif
551     %if %build_smb
552     --enable-smb \
553     %endif
554     %if ! %build_dvb
555     --disable-dvb \
556     %endif
557     %if ! %build_ggi
558     --disable-ggi \
559     %endif
560     --codecsdir=%{_libdir}/codecs \
561     %if ! %build_arts
562     --disable-arts \
563     %endif
564     %if ! %build_jack
565     --disable-jack \
566     %endif
567     %if ! %build_aa
568     --disable-aa \
569     %endif
570     %if ! %build_cdda
571     --disable-cdparanoia \
572     %endif
573     %if ! %build_dv
574     --disable-libdv \
575     %endif
576     %if ! %build_lzo
577     --disable-liblzo \
578     %endif
579     %if ! %build_sdl
580     --disable-sdl \
581     %endif
582     %if ! %build_alsa
583     --disable-alsa \
584     %endif
585     %if ! %build_fribidi
586     --disable-fribidi \
587     %endif
588     %if !%build_enca
589     --disable-enca \
590     %endif
591     %if %build_pulse
592     --enable-pulse \
593     %endif
594     %if !%build_openal
595     --disable-openal \
596     %endif
597 ahmad 81539 %if %build_zr
598 blino 24858 --enable-zr \
599 ahmad 81539 %endif
600 blino 24858 %if %build_xvmc
601     --enable-xvmc \
602     %endif
603     %if ! %build_ivtv
604     --disable-ivtv \
605     %endif
606     %if ! %build_vdpau
607     --disable-vdpau
608     %endif
609    
610    
611     # Keep this line before empty end %%configure (ppc conditionnal pb)
612     make EXESUF=%{pkgext}
613     #gw make sure we have our version string included:
614     fgrep %release version.h
615    
616     # build HTML docs
617 luigiwalser 193587 pushd DOCS/xml && make && popd
618 blino 24858
619     %install
620 luigiwalser 193578 rm -rf %{buildroot}
621     install -d -m 755 %{buildroot}%{_bindir}
622     install -d -m 755 %{buildroot}%{_datadir}/%name
623     install -d -m 755 %{buildroot}%{_sysconfdir}/%name
624     install -d -m 755 %{buildroot}%{_mandir}/{de,fr,hu,pl,es,it,zh_CN,""}/man1
625     install -m 755 mplayer%{pkgext} %{buildroot}%{_bindir}
626     install -m 644 DOCS/man/en/mplayer.1 %{buildroot}%{_mandir}/man1/mplayer%{pkgext}.1
627     install -m 644 DOCS/man/de/mplayer.1 %{buildroot}%{_mandir}/de/man1/mplayer%{pkgext}.1
628     install -m 644 DOCS/man/fr/mplayer.1 %{buildroot}%{_mandir}/fr/man1/mplayer%{pkgext}.1
629     install -m 644 DOCS/man/hu/mplayer.1 %{buildroot}%{_mandir}/hu/man1/mplayer%{pkgext}.1
630     install -m 644 DOCS/man/pl/mplayer.1 %{buildroot}%{_mandir}/pl/man1/mplayer%{pkgext}.1
631     install -m 644 DOCS/man/zh_CN/mplayer.1 %{buildroot}%{_mandir}/zh_CN/man1/mplayer%{pkgext}.1
632     install -m 644 DOCS/man/es/mplayer.1 %{buildroot}%{_mandir}/es/man1/mplayer%{pkgext}.1
633     install -m 644 DOCS/man/it/mplayer.1 %{buildroot}%{_mandir}/it/man1/mplayer%{pkgext}.1
634 blino 24858
635     %if %build_mencoder
636 luigiwalser 193578 install -m 755 mencoder%{pkgext} %{buildroot}%{_bindir}
637     for man_dir in %{buildroot}%{_mandir}/{de,fr,hu,pl,es,it,zh_CN,""}/man1; do
638 luigiwalser 193587 ln -s mplayer%{pkgext}.1 $man_dir/mencoder%{pkgext}.1
639 blino 24858 done
640     install -m 755 TOOLS/mencvcd.sh %buildroot%_bindir/mencvcd%{pkgext}
641     install -m 755 TOOLS/divx2svcd.sh %buildroot%_bindir/divx2svcd%{pkgext}
642     install -m 755 TOOLS/wma2ogg.pl %buildroot%_bindir/wma2ogg%{pkgext}.pl
643     install -m 755 TOOLS/midentify.sh %buildroot%_bindir/midentify%{pkgext}
644     %endif
645 luigiwalser 193578 install -m 644 etc/example.conf %{buildroot}%{_sysconfdir}/%{name}/mplayer.conf
646     install -m 644 etc/menu.conf %{buildroot}%{_sysconfdir}/%{name}
647 blino 24858
648     %if %build_gui
649     # default Skin
650     install -d -m 755 %buildroot%_datadir/%name/Skin/
651     cp -r Blue %buildroot%_datadir/%name/Skin/
652     ln -s Blue %buildroot%_datadir/%name/Skin/default
653     # gmplayer equals mplayer -gui
654 luigiwalser 193587 ln -s mplayer%{pkgext} %{buildroot}%{_bindir}/gmplayer%{pkgext}
655 blino 24858 # icons
656 luigiwalser 193578 mkdir -p %{buildroot}{%_liconsdir,%_iconsdir,%{_miconsdir}}
657     convert -transparent white Blue/icons/icon48x48.png %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
658     convert -transparent white Blue/icons/icon32x32.png %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
659     convert -transparent white -scale 16x16 Blue/icons/icon48x48.png %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
660 blino 24858 install -D -m 644 etc/mplayer.desktop %buildroot%_datadir/applications/mplayer%{pkgext}.desktop
661     perl -pi -e 's@mplayer$@mplayer%{pkgext}@g' %buildroot%_datadir/applications/mplayer%{pkgext}.desktop
662     %endif
663     %if %{build_3264bit}
664     if [ -e %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png ]; then
665     convert %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png -channel green -negate \
666     %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
667     fi
668     if [ -e %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png ]; then
669     convert %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png -channel green -negate \
670     %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
671     fi
672     if [ -e %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png ]; then
673     convert %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png -channel green -negate \
674     %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
675     fi
676     %endif
677    
678     %if %build_debug
679     export DONT_STRIP=1
680     %endif
681    
682     %if %build_gui
683     %pre gui
684     if [ -d %_datadir/%name/Skin/default ]
685     then rm -rf %_datadir/%name/Skin/default
686     fi
687     %endif
688    
689     %clean
690     rm -rf %{buildroot}
691    
692     %files
693     %doc AUTHORS Changelog README Copyright
694     %dir %{_sysconfdir}/%name
695     %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/mplayer.conf
696     %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/menu.conf
697     %{_bindir}/midentify%{pkgext}
698     %{_bindir}/mplayer%{pkgext}
699     %{_mandir}/man1/mplayer%{pkgext}.1*
700     %lang(de) %{_mandir}/de/man1/mplayer%{pkgext}.1*
701     %lang(fr) %{_mandir}/fr/man1/mplayer%{pkgext}.1*
702     %lang(hu) %{_mandir}/hu/man1/mplayer%{pkgext}.1*
703     %lang(pl) %{_mandir}/pl/man1/mplayer%{pkgext}.1*
704     %lang(zh_CN) %{_mandir}/zh_CN/man1/mplayer%{pkgext}.1*
705     %lang(es) %{_mandir}/es/man1/mplayer%{pkgext}.1*
706     %lang(it) %{_mandir}/it/man1/mplayer%{pkgext}.1*
707     %dir %{_datadir}/%{name}
708    
709     %files doc
710     %doc README.DOCS
711     %doc DOCS/default.css DOCS/HTML DOCS/tech/
712 luigiwalser 193578
713 blino 24858 %if %build_mencoder
714     %files -n mencoder%{pkgext}
715     %{_bindir}/mencoder%{pkgext}
716     %{_bindir}/divx2svcd%{pkgext}
717     %{_bindir}/mencvcd%{pkgext}
718     %{_bindir}/wma2ogg%{pkgext}.pl
719     %{_mandir}/man1/mencoder%{pkgext}.1*
720     %lang(de) %{_mandir}/de/man1/mencoder%{pkgext}.1*
721     %lang(fr) %{_mandir}/fr/man1/mencoder%{pkgext}.1*
722     %lang(hu) %{_mandir}/hu/man1/mencoder%{pkgext}.1*
723     %lang(pl) %{_mandir}/pl/man1/mencoder%{pkgext}.1*
724     %lang(zh_CN) %{_mandir}/zh_CN/man1/mencoder%{pkgext}.1*
725     %lang(es) %{_mandir}/es/man1/mencoder%{pkgext}.1*
726     %lang(it) %{_mandir}/it/man1/mencoder%{pkgext}.1*
727     %endif
728    
729     %if %build_gui
730     %files gui
731     %{_bindir}/gmplayer%{pkgext}
732     %_datadir/applications/mplayer%{pkgext}.desktop
733     %_datadir/%name/Skin/
734     %{_iconsdir}/mplayer%{pkgext}.png
735     %{_miconsdir}/mplayer%{pkgext}.png
736     %{_liconsdir}/mplayer%{pkgext}.png
737     %endif
738    
739    
740    
741    

  ViewVC Help
Powered by ViewVC 1.1.30