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

  ViewVC Help
Powered by ViewVC 1.1.30