/[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 125857 - (hide annotations) (download)
Mon Jul 18 07:50:14 2011 UTC (12 years, 9 months ago) by fwang
File size: 21154 byte(s)
rebuild for new dfb
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 125857 %define rel 1.%prerel.0.%svn.7
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 blino 24858 #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     Patch12: mplayer-desktopentry.patch
198     Patch21: mplayer-1.0rc2-compiz.patch
199     # fixes for crashes found while fixing CVE-2008-1558
200     Patch28: mplayer-rtsp-extra-fixes.patch
201     Patch31: mplayer-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     URL: http://www.mplayerhq.hu
207     License: GPLv2
208     Group: Video
209     BuildRequires: libncurses-devel
210     %if %build_aa
211     BuildRequires: libaa-devel
212     %endif
213     BuildRequires: a52dec-devel
214     %if %build_arts
215     BuildRequires: libarts-devel
216     %endif
217     %if %build_amr
218     BuildRequires: opencore-amr-devel
219     %endif
220    
221     %if %build_jack
222     BuildRequires: libjack-devel
223     %endif
224     %if %build_pulse
225     BuildRequires: libpulseaudio-devel
226     %endif
227     %if %build_openal
228     BuildRequires: libopenal-devel
229     %endif
230     %if %build_cdda
231     BuildRequires: libcdda-devel
232     %endif
233     %if %build_dirac
234     BuildRequires: libdirac-devel >= 0.9.0
235     %endif
236     %if %build_schroedinger
237     BuildRequires: libschroedinger-devel
238     %endif
239     %if %build_dv
240     BuildRequires: libdv-devel
241     %endif
242     BuildRequires: libdxr3-devel
243     BuildRequires: libjpeg-devel
244     BuildRequires: openjpeg-devel
245     %if %build_lirc
246     BuildRequires: liblirc-devel
247     %endif
248     %if %build_lzo
249     BuildRequires: liblzo-devel
250     %endif
251     BuildRequires: libmad-devel
252     BuildRequires: libnas-devel
253     BuildRequires: libpng-devel
254     %if %build_sdl
255     BuildRequires: libSDL-devel >= 1.1.8
256     %endif
257     BuildRequires: libtermcap-devel
258     %if %build_xmms
259     BuildRequires: libxmms-devel
260     %endif
261     %if %build_ggi
262     BuildRequires: libggiwmh-devel
263     %endif
264     %if %build_smb
265     # require samba < 3.2.0 to avoid shipping GPLv2 vs GPLv3
266     BuildRequires: libsmbclient-devel < 3.2.0
267     %endif
268     %if %build_twolame
269     BuildRequires: libtwolame-devel
270     %endif
271     %if %build_faac
272     BuildRequires: libfaac-devel
273     %endif
274     %if %build_faad
275     BuildRequires: libfaad2-devel
276     %endif
277     %if %build_x264
278     BuildRequires: libx264-devel >= 0.99
279     %endif
280     %if %build_xvid
281     BuildRequires: xvid-devel >= 1.0.0-0.beta2.1plf
282     %endif
283     %if %build_dts
284     BuildRequires: dtsdec-devel
285     %endif
286     %if %build_lame
287     BuildRequires: liblame-devel
288     %endif
289     %if %build_plf
290     Requires: %mklibname dvdcss 2
291     %endif
292     %if %build_live
293     BuildRequires: live-devel
294     %endif
295     %if %build_vesa
296     BuildRequires: libvbe-devel liblrmi-devel
297     %endif
298     %if %build_theora
299     BuildRequires: libtheora-devel
300     %endif
301     %if %build_fribidi
302     BuildRequires: libfribidi-devel >= 0.10.4
303     %endif
304     %if %build_enca
305     BuildRequires: libenca-devel
306     %endif
307     %if %build_directfb
308     BuildRequires: libdirectfb-devel
309     %endif
310     %if %build_xvmc
311     BuildRequires: libxvmc-devel
312     %endif
313     %if %build_vdpau
314     BuildRequires: vdpau-devel
315     %endif
316     %if %build_libass
317     BuildRequires: libass-devel
318     %endif
319     BuildRequires: gsm-devel
320     BuildRequires: libmpg123-devel
321     %if %build_vpx
322     BuildRequires: libvpx-devel
323     %endif
324     %if %build_rtmp
325     BuildRequires: rtmp-devel
326     %endif
327     BuildRequires: bzip2-devel
328     BuildRequires: libmng-devel
329     BuildRequires: libmesagl-devel
330     BuildRequires: libxxf86vm-devel
331     BuildRequires: libxxf86dga-devel
332     BuildRequires: libxscrnsaver-devel
333     BuildRequires: libspeex-devel
334     BuildRequires: libmpcdec-devel
335     BuildRequires: ladspa-devel
336     BuildRequires: libxslt-proc
337     BuildRequires: docbook-style-xsl
338     BuildRequires: docbook-dtd412-xml
339     BuildRequires: libcaca-devel
340     BuildRequires: giflib-devel
341     %if %build_yasm
342     BuildRequires: yasm
343     %endif
344     BuildRequires: libbs2b-devel
345    
346     BuildRoot: %{_tmppath}/%{name}-%{version}-root
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     rm -rf $RPM_BUILD_ROOT
430    
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 blino 24858 #%patch3 -p1 -b .mp2
444     #%patch7 -p1 -b .mga
445     %patch12 -p1 -b .desktopentry
446     #%patch21 -p0 -b .compiz
447     %patch28 -p1 -b .rtsp-extra-fixes
448     %patch31 -p1 -b .format~
449     %patch33 -p0
450     %patch35 -p0
451    
452     perl -pi -e 's^r\$svn_revision^%release^' version.sh
453    
454     mv DOCS/README README.DOCS
455    
456     %build
457     %if !%build_optimization
458     export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
459     %endif
460     %if %build_debug
461     export CFLAGS="$CFLAGS -g"
462     %endif
463     %ifarch ppc
464     export CFLAGS="$CFLAGS -mcpu=7450 -maltivec"
465     %endif
466     %if %build_directfb
467     export CPPFLAGS="-I%_includedir/directfb"
468     %endif
469     %if %{build_3264bit}
470     export EXESUF=32
471     %endif
472     export LDFLAGS="%{?ldflags}"
473     ./configure \
474     --prefix=%{_prefix} \
475     --datadir=%{_datadir}/%{name} \
476     --confdir=%{_sysconfdir}/%{name} \
477     --libdir=%_libdir \
478     --enable-largefiles \
479     %if !%build_optimization
480     %ifnarch x86_64
481     --enable-runtime-cpudetection \
482     %endif
483     %ifarch %ix86
484     --enable-mmx \
485     --enable-3dnow \
486     --enable-sse \
487     --enable-sse2 \
488     --enable-fastmemcpy \
489     %endif
490     %endif
491     --enable-freetype \
492     --enable-nas \
493     %if %build_debug
494     --enable-debug=3 \
495     %else
496     --disable-sighandler \
497     %endif
498     %if %build_gui
499     --enable-gui \
500     %endif
501     --language=all \
502     \
503     %if ! %build_faad
504     --disable-faad-internal \
505     --disable-decoder=AAC \
506     %endif
507     --disable-libdvdcss-internal \
508     %if %build_lirc
509     --enable-lirc \
510     %else
511     --disable-lirc \
512     %endif
513     --enable-tv \
514     %if ! %build_v4l2
515     --disable-tv-v4l2 \
516     %endif
517     --enable-joystick \
518     \
519     --enable-gl \
520     --disable-svga \
521     %if ! %build_mga
522     --disable-mga \
523     %endif
524     %if ! %build_fbdev
525     --disable-fbdev \
526     %endif
527     %if %build_directfb
528     --enable-directfb \
529     %else
530     --disable-directfb \
531     %endif
532     %if %build_mencoder
533     --enable-mencoder \
534     %else
535     --disable-mencoder \
536     %endif
537     %if ! %build_live
538     --disable-live \
539     %endif
540     %if ! %build_vesa
541     --disable-vesa \
542     %endif
543     %if %build_theora
544     --enable-theora \
545     %else
546     --disable-theora \
547     %endif
548     --enable-menu \
549     %if %build_xmms
550     --enable-xmms --with-xmmslibdir=%{_libdir} \
551     %endif
552     %if %build_smb
553     --enable-smb \
554     %endif
555     %if ! %build_dvb
556     --disable-dvb \
557     --disable-dvbhead \
558     %endif
559     %if ! %build_ggi
560     --disable-ggi \
561     %endif
562     --codecsdir=%{_libdir}/codecs \
563     %if ! %build_arts
564     --disable-arts \
565     %endif
566     %if ! %build_jack
567     --disable-jack \
568     %endif
569     %if ! %build_aa
570     --disable-aa \
571     %endif
572     %if ! %build_cdda
573     --disable-cdparanoia \
574     %endif
575     %if ! %build_dv
576     --disable-libdv \
577     %endif
578     %if ! %build_lzo
579     --disable-liblzo \
580     %endif
581     %if ! %build_sdl
582     --disable-sdl \
583     %endif
584     %if ! %build_alsa
585     --disable-alsa \
586     %endif
587     %if ! %build_fribidi
588     --disable-fribidi \
589     %endif
590     %if !%build_enca
591     --disable-enca \
592     %endif
593     %if %build_pulse
594     --enable-pulse \
595     %endif
596     %if !%build_openal
597     --disable-openal \
598     %endif
599 ahmad 81539 %if %build_zr
600 blino 24858 --enable-zr \
601 ahmad 81539 %endif
602 blino 24858 %if %build_xvmc
603     --enable-xvmc \
604     %endif
605     %if ! %build_ivtv
606     --disable-ivtv \
607     %endif
608     %if ! %build_vdpau
609     --disable-vdpau
610     %endif
611    
612    
613     # Keep this line before empty end %%configure (ppc conditionnal pb)
614     make EXESUF=%{pkgext}
615     #gw make sure we have our version string included:
616     fgrep %release version.h
617    
618     # build HTML docs
619     (cd DOCS/xml && make)
620    
621     %install
622     rm -rf $RPM_BUILD_ROOT
623     install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
624     install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%name
625     install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%name
626     install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/{de,fr,hu,pl,es,it,zh_CN,""}/man1
627     install -m 755 mplayer%{pkgext} $RPM_BUILD_ROOT%{_bindir}
628     install -m 644 DOCS/man/en/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/man1/mplayer%{pkgext}.1
629     install -m 644 DOCS/man/de/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/de/man1/mplayer%{pkgext}.1
630     install -m 644 DOCS/man/fr/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1/mplayer%{pkgext}.1
631     install -m 644 DOCS/man/hu/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1/mplayer%{pkgext}.1
632     install -m 644 DOCS/man/pl/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1/mplayer%{pkgext}.1
633     install -m 644 DOCS/man/zh_CN/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1/mplayer%{pkgext}.1
634     install -m 644 DOCS/man/es/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/es/man1/mplayer%{pkgext}.1
635     install -m 644 DOCS/man/it/mplayer.1 $RPM_BUILD_ROOT%{_mandir}/it/man1/mplayer%{pkgext}.1
636    
637     %if %build_mencoder
638     install -m 755 mencoder%{pkgext} $RPM_BUILD_ROOT%{_bindir}
639     for man_dir in $RPM_BUILD_ROOT%{_mandir}/{de,fr,hu,pl,es,it,zh_CN,""}/man1; do
640     (cd $man_dir && ln -s mplayer%{pkgext}.1 mencoder%{pkgext}.1)
641     done
642     install -m 755 TOOLS/mencvcd.sh %buildroot%_bindir/mencvcd%{pkgext}
643     install -m 755 TOOLS/divx2svcd.sh %buildroot%_bindir/divx2svcd%{pkgext}
644     install -m 755 TOOLS/wma2ogg.pl %buildroot%_bindir/wma2ogg%{pkgext}.pl
645     install -m 755 TOOLS/midentify.sh %buildroot%_bindir/midentify%{pkgext}
646     %endif
647     install -m 644 etc/example.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mplayer.conf
648     install -m 644 etc/menu.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
649    
650     %if %build_gui
651     # default Skin
652     install -d -m 755 %buildroot%_datadir/%name/Skin/
653     cp -r Blue %buildroot%_datadir/%name/Skin/
654     ln -s Blue %buildroot%_datadir/%name/Skin/default
655     # gmplayer equals mplayer -gui
656     (cd $RPM_BUILD_ROOT%{_bindir} && ln -s mplayer%{pkgext} gmplayer%{pkgext})
657     # icons
658     mkdir -p $RPM_BUILD_ROOT{%_liconsdir,%_iconsdir,%{_miconsdir}}
659     convert -transparent white Blue/icons/icon48x48.png $RPM_BUILD_ROOT%{_liconsdir}/mplayer%{pkgext}.png
660     convert -transparent white Blue/icons/icon32x32.png $RPM_BUILD_ROOT%{_iconsdir}/mplayer%{pkgext}.png
661     convert -transparent white -scale 16x16 Blue/icons/icon48x48.png $RPM_BUILD_ROOT%{_miconsdir}/mplayer%{pkgext}.png
662     install -D -m 644 etc/mplayer.desktop %buildroot%_datadir/applications/mplayer%{pkgext}.desktop
663     perl -pi -e 's@mplayer$@mplayer%{pkgext}@g' %buildroot%_datadir/applications/mplayer%{pkgext}.desktop
664     %endif
665     %if %{build_3264bit}
666     if [ -e %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png ]; then
667     convert %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png -channel green -negate \
668     %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
669     fi
670     if [ -e %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png ]; then
671     convert %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png -channel green -negate \
672     %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
673     fi
674     if [ -e %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png ]; then
675     convert %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png -channel green -negate \
676     %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
677     fi
678     %endif
679    
680     %if %build_debug
681     export DONT_STRIP=1
682     %endif
683    
684     %if %build_gui
685     %pre gui
686     if [ -d %_datadir/%name/Skin/default ]
687     then rm -rf %_datadir/%name/Skin/default
688     fi
689     %endif
690    
691     %clean
692     rm -rf %{buildroot}
693    
694     %files
695     %defattr(-,root,root)
696     %doc AUTHORS Changelog README Copyright
697     %dir %{_sysconfdir}/%name
698     %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/mplayer.conf
699     %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/menu.conf
700     %{_bindir}/midentify%{pkgext}
701     %{_bindir}/mplayer%{pkgext}
702     %{_mandir}/man1/mplayer%{pkgext}.1*
703     %lang(de) %{_mandir}/de/man1/mplayer%{pkgext}.1*
704     %lang(fr) %{_mandir}/fr/man1/mplayer%{pkgext}.1*
705     %lang(hu) %{_mandir}/hu/man1/mplayer%{pkgext}.1*
706     %lang(pl) %{_mandir}/pl/man1/mplayer%{pkgext}.1*
707     %lang(zh_CN) %{_mandir}/zh_CN/man1/mplayer%{pkgext}.1*
708     %lang(es) %{_mandir}/es/man1/mplayer%{pkgext}.1*
709     %lang(it) %{_mandir}/it/man1/mplayer%{pkgext}.1*
710     %dir %{_datadir}/%{name}
711    
712     %files doc
713     %defattr(-,root,root)
714     %doc README.DOCS
715     %doc DOCS/default.css DOCS/HTML DOCS/tech/
716     %if %build_mencoder
717     %files -n mencoder%{pkgext}
718     %defattr(-,root,root)
719     %{_bindir}/mencoder%{pkgext}
720     %{_bindir}/divx2svcd%{pkgext}
721     %{_bindir}/mencvcd%{pkgext}
722     %{_bindir}/wma2ogg%{pkgext}.pl
723     %{_mandir}/man1/mencoder%{pkgext}.1*
724     %lang(de) %{_mandir}/de/man1/mencoder%{pkgext}.1*
725     %lang(fr) %{_mandir}/fr/man1/mencoder%{pkgext}.1*
726     %lang(hu) %{_mandir}/hu/man1/mencoder%{pkgext}.1*
727     %lang(pl) %{_mandir}/pl/man1/mencoder%{pkgext}.1*
728     %lang(zh_CN) %{_mandir}/zh_CN/man1/mencoder%{pkgext}.1*
729     %lang(es) %{_mandir}/es/man1/mencoder%{pkgext}.1*
730     %lang(it) %{_mandir}/it/man1/mencoder%{pkgext}.1*
731     %endif
732    
733     %if %build_gui
734     %files gui
735     %defattr(-,root,root)
736     %{_bindir}/gmplayer%{pkgext}
737     %_datadir/applications/mplayer%{pkgext}.desktop
738     %_datadir/%name/Skin/
739     %{_iconsdir}/mplayer%{pkgext}.png
740     %{_miconsdir}/mplayer%{pkgext}.png
741     %{_liconsdir}/mplayer%{pkgext}.png
742     %endif
743    
744    
745    
746    

  ViewVC Help
Powered by ViewVC 1.1.30