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

  ViewVC Help
Powered by ViewVC 1.1.30