/[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 224351 - (show annotations) (download)
Mon Mar 19 14:49:54 2012 UTC (12 years ago) by luigiwalser
File size: 20933 byte(s)
SILENT: bump release
1 %define build_3264bit 0
2 %{?_with_3264bit: %{expand: %%global build_3264bit 1}}
3 %{?_without_3264bit: %{expand: %%global build_3264bit 0}}
4 %if %{build_3264bit}
5 %define pkgext 32
6 %else
7 %define pkgext %{nil}
8 %endif
9
10 %define name mplayer%{pkgext}
11 %define Name MPlayer
12 %define Summary Movie player for linux
13 %define prerel rc4
14 %define version 1.0
15 %define fversion %svn
16 %define svn r34578
17 %define ffmpegversion 0.10.2
18 %if %svn
19 %define rel 1.%prerel.0.%svn.5
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.8.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 #gw HAVE_DLFCN_H isn't defined
223 Patch33: mplayer-have-dlfcn_h.patch
224 #gw fix crash: https://qa.mandriva.com/show_bug.cgi?id=55443
225 Patch35: mplayer-fix-dvd-crash.patch
226 # fix lavcac3enc to not require internal FFmpeg headers (upstreamable)
227 Patch48: mplayer-lavcac3enc-build-with-shared.patch
228 # hack to build video filters that require internal FFmpeg headers -
229 # this requires the private headers to be present during build
230 # (it is somewhat bad, but there are many other files in mplayer that
231 # already require them, so we couldn't remove them anyway)
232 Patch49: mplayer-filters-hack-with-shared.patch
233 Patch50: mplayer-live555-r34800.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 %if %build_plf
407
408 This package is in the 'tainted' section because some included codecs
409 are covered by patents. It also includes support for reading DVDs
410 encrypted with CSS which might be illegal in some countries.
411 %endif
412
413 %package doc
414 Summary: %{Name} documentation
415 Group: Books/Computer books
416 BuildArch: noarch
417
418 %description doc
419 This package contains documentation for %{Name}.
420
421 %if %build_gui
422 %package gui
423 Summary: GUI for %{name}
424 Group: Video
425 Requires: %{name} = %{version}
426 BuildRequires: gtk+2-devel
427 BuildRequires: imagemagick
428 Requires: soundwrapper
429 Provides: mplayer%{pkgext}1.0-gui
430 Obsoletes: mplayer%{pkgext}1.0-gui
431 Conflicts: mplayer-skins < 1.3-8
432
433 %description gui
434 This package contains a GUI for %{name}.
435 %endif
436
437 %if %build_mencoder
438 %package -n mencoder%{pkgext}
439 Summary: MPlayer's movie encoder
440 Group: Video
441 Requires: %{name} = %version
442 Provides: mencoder%{pkgext}1.0
443 Obsoletes: mencoder%{pkgext}1.0
444
445 %description -n mencoder%{pkgext}
446 MEncoder a movie encoder and is a part of the MPlayer package.
447 %if !%build_plf
448 Note: this version doesn't have support for encoding mp3 audio streams in the
449 video files.
450 %else
451 This 'tainted' build has additional support for AAC decoding with libfaad
452 and MP3 encoding with lame, both are covered by software patents. It
453 also includes support for reading DVDs encrypted with CSS which might
454 be illegal in some countries.
455 %endif
456 %endif
457
458
459 %prep
460 rm -rf %{buildroot}
461
462 %if %svn
463 %setup -q -n %name -a 4
464 %else
465 %setup -q -n MPlayer-%{version}%{prerel} -a 4
466 %endif
467 #gw as we have have used svn export:
468 echo %svn|sed s/^r// > snapshot_version
469 find DOCS -name .svn|xargs rm -rf
470 #gw fix permissions
471 chmod 644 AUTHORS Changelog README Copyright
472 rm -f Blue/README
473 %patch0 -p1 -b .distro-config
474 #%patch3 -p1 -b .mp2
475 #%patch7 -p1 -b .mga
476 #%patch21 -p0 -b .compiz
477 %patch28 -p1 -b .rtsp-extra-fixes
478 %patch31 -p1 -b .format~
479 %patch33 -p0
480 %patch35 -p0
481 %patch48 -p1
482 %patch49 -p1
483 %patch50 -p0
484
485 perl -pi -e 's^r\$svn_revision^%release^' version.sh
486
487 mv DOCS/README README.DOCS
488
489 tar -xjf %{SOURCE1}
490 mv ffmpeg-%{ffmpegversion} ffmpeg
491 pushd ffmpeg
492 popd
493
494 %build
495 %if !%build_optimization
496 export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
497 %endif
498 %if %build_debug
499 export CFLAGS="$CFLAGS -g"
500 %endif
501 %ifarch ppc
502 export CFLAGS="$CFLAGS -mcpu=7450 -maltivec"
503 %endif
504 %if %build_directfb
505 export CPPFLAGS="-I%_includedir/directfb"
506 %endif
507 %if %{build_3264bit}
508 export EXESUF=32
509 %endif
510 export LDFLAGS="%{?ldflags}"
511 ./configure \
512 --prefix=%{_prefix} \
513 --datadir=%{_datadir}/%{name} \
514 --confdir=%{_sysconfdir}/%{name} \
515 --libdir=%_libdir \
516 %if !%build_optimization
517 --enable-runtime-cpudetection \
518 %ifarch %ix86
519 --enable-mmx \
520 --enable-3dnow \
521 --enable-sse \
522 --enable-sse2 \
523 --enable-fastmemcpy \
524 %endif
525 %endif
526 --enable-freetype \
527 --enable-nas \
528 %if %build_debug
529 --enable-debug=3 \
530 %else
531 --disable-sighandler \
532 %endif
533 %if %build_gui
534 --enable-gui \
535 %endif
536 %if %build_system_ffmpeg
537 --disable-ffmpeg_a \
538 %endif
539 --language=all \
540 %if ! %build_faad
541 --disable-faad \
542 --disable-decoder=AAC \
543 %endif
544 --disable-libdvdcss-internal \
545 --enable-dvdnav \
546 --disable-dvdread-internal \
547 --enable-dvdread \
548 %if %build_lirc
549 --enable-lirc \
550 %else
551 --disable-lirc \
552 %endif
553 --enable-tv \
554 %if ! %build_v4l2
555 --disable-tv-v4l2 \
556 %endif
557 --enable-joystick \
558 \
559 --enable-gl \
560 --disable-svga \
561 %if ! %build_mga
562 --disable-mga \
563 %endif
564 %if ! %build_fbdev
565 --disable-fbdev \
566 %endif
567 %if %build_directfb
568 --enable-directfb \
569 %else
570 --disable-directfb \
571 %endif
572 %if %build_mencoder
573 --enable-mencoder \
574 %else
575 --disable-mencoder \
576 %endif
577 %if ! %build_live
578 --disable-live \
579 %endif
580 %if ! %build_vesa
581 --disable-vesa \
582 %endif
583 %if %build_theora
584 --enable-theora \
585 %else
586 --disable-theora \
587 %endif
588 --enable-menu \
589 %if %build_xmms
590 --enable-xmms --with-xmmslibdir=%{_libdir} \
591 %endif
592 %if %build_smb
593 --enable-smb \
594 %endif
595 %if ! %build_dvb
596 --disable-dvb \
597 %endif
598 %if ! %build_ggi
599 --disable-ggi \
600 %endif
601 --codecsdir=%{_libdir}/codecs \
602 %if ! %build_arts
603 --disable-arts \
604 %endif
605 %if ! %build_jack
606 --disable-jack \
607 %endif
608 %if ! %build_aa
609 --disable-aa \
610 %endif
611 %if ! %build_cdda
612 --disable-cdparanoia \
613 %endif
614 %if ! %build_dv
615 --disable-libdv \
616 %endif
617 %if ! %build_lzo
618 --disable-liblzo \
619 %endif
620 %if ! %build_sdl
621 --disable-sdl \
622 %endif
623 %if ! %build_alsa
624 --disable-alsa \
625 %endif
626 %if ! %build_fribidi
627 --disable-fribidi \
628 %endif
629 %if !%build_enca
630 --disable-enca \
631 %endif
632 %if %build_pulse
633 --enable-pulse \
634 %endif
635 %if !%build_openal
636 --disable-openal \
637 %endif
638 %if %build_zr
639 --enable-zr \
640 %endif
641 %if %build_xvmc
642 --enable-xvmc \
643 %endif
644 %if ! %build_ivtv
645 --disable-ivtv \
646 %endif
647 %if ! %build_vdpau
648 --disable-vdpau
649 %endif
650
651
652 # Keep this line before empty end %%configure (ppc conditionnal pb)
653 make EXESUF=%{pkgext}
654 #gw make sure we have our version string included:
655 fgrep %release version.h
656
657 %install
658 rm -rf %{buildroot}
659 install -d -m 755 %{buildroot}%{_bindir}
660 install -d -m 755 %{buildroot}%{_datadir}/%name
661 install -d -m 755 %{buildroot}%{_sysconfdir}/%name
662 install -m 755 mplayer%{pkgext} -D %{buildroot}%{_bindir}/mplayer%{pkgext}
663 for lang in en de fr hu pl zh_CN es it; do
664 install -m 644 DOCS/man/$lang/mplayer.1 -D %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mplayer%{pkgext}.1
665 done
666 %find_lang mplayer%{pkgext} --with-man
667
668 %if %build_mencoder
669 install -m 755 mencoder%{pkgext} -D %{buildroot}%{_bindir}/mencoder%{pkgext}
670
671 for lang in en de fr hu pl zh_CN es it; do
672 ln -s mplayer%{pkgext}.1 %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mencoder%{pkgext}.1
673 done
674 %find_lang mencoder%{pkgext} --with-man
675 install -m 755 TOOLS/mencvcd.sh %buildroot%_bindir/mencvcd%{pkgext}
676 install -m 755 TOOLS/divx2svcd.sh %buildroot%_bindir/divx2svcd%{pkgext}
677 install -m 755 TOOLS/wma2ogg.pl %buildroot%_bindir/wma2ogg%{pkgext}.pl
678 install -m 755 TOOLS/midentify.sh %buildroot%_bindir/midentify%{pkgext}
679 %endif
680 install -m 644 etc/example.conf %{buildroot}%{_sysconfdir}/%{name}/mplayer.conf
681 install -m 644 etc/menu.conf %{buildroot}%{_sysconfdir}/%{name}
682
683 %if %build_gui
684 # default Skin
685 install -d -m 755 %buildroot%_datadir/%name/skins/
686 cp -r Blue %buildroot%_datadir/%name/skins/
687 ln -s Blue %buildroot%_datadir/%name/skins/default
688 # gmplayer equals mplayer -gui
689 ln -s mplayer%{pkgext} %{buildroot}%{_bindir}/gmplayer%{pkgext}
690 # icons
691 mkdir -p %{buildroot}{%_liconsdir,%_iconsdir,%{_miconsdir}}
692 convert -transparent white Blue/icons/icon48x48.png %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
693 convert -transparent white Blue/icons/icon32x32.png %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
694 convert -transparent white -scale 16x16 Blue/icons/icon48x48.png %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
695 install -D -m 644 etc/mplayer.desktop %buildroot%_datadir/applications/mplayer%{pkgext}.desktop
696 perl -pi -e 's@mplayer$@mplayer%{pkgext}@g' %buildroot%_datadir/applications/mplayer%{pkgext}.desktop
697 %endif
698 %if %{build_3264bit}
699 if [ -e %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png ]; then
700 convert %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png -channel green -negate \
701 %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
702 fi
703 if [ -e %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png ]; then
704 convert %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png -channel green -negate \
705 %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
706 fi
707 if [ -e %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png ]; then
708 convert %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png -channel green -negate \
709 %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
710 fi
711 %endif
712
713 %if %build_debug
714 export DONT_STRIP=1
715 %endif
716
717 %if %build_gui
718 %pre gui
719 if [ -d %_datadir/%name/skins/default ]
720 then rm -rf %_datadir/%name/skins/default
721 fi
722 %endif
723
724 %clean
725 rm -rf %{buildroot}
726
727 %files -f mplayer%{pkgext}.lang
728 %doc AUTHORS Changelog README Copyright
729 %dir %{_sysconfdir}/%name
730 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/mplayer.conf
731 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/menu.conf
732 %{_bindir}/midentify%{pkgext}
733 %{_bindir}/mplayer%{pkgext}
734 %{_mandir}/man1/mplayer%{pkgext}.1*
735 %dir %{_datadir}/%{name}
736
737 %files doc
738 %defattr(-,root,root,755)
739 %doc README.DOCS
740 %doc DOCS/default.css DOCS/xml DOCS/tech/
741
742 %if %build_mencoder
743 %files -n mencoder%{pkgext} -f mencoder%{pkgext}.lang
744 %{_bindir}/mencoder%{pkgext}
745 %{_bindir}/divx2svcd%{pkgext}
746 %{_bindir}/mencvcd%{pkgext}
747 %{_bindir}/wma2ogg%{pkgext}.pl
748 %{_mandir}/man1/mencoder%{pkgext}.1*
749 %endif
750
751 %if %build_gui
752 %files gui
753 %{_bindir}/gmplayer%{pkgext}
754 %_datadir/applications/mplayer%{pkgext}.desktop
755 %_datadir/%name/skins/
756 %{_iconsdir}/mplayer%{pkgext}.png
757 %{_miconsdir}/mplayer%{pkgext}.png
758 %{_liconsdir}/mplayer%{pkgext}.png
759 %endif
760
761
762
763

  ViewVC Help
Powered by ViewVC 1.1.30