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

  ViewVC Help
Powered by ViewVC 1.1.30