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

  ViewVC Help
Powered by ViewVC 1.1.30