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

  ViewVC Help
Powered by ViewVC 1.1.30