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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30