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

  ViewVC Help
Powered by ViewVC 1.1.30