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

  ViewVC Help
Powered by ViewVC 1.1.30