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

  ViewVC Help
Powered by ViewVC 1.1.30