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

  ViewVC Help
Powered by ViewVC 1.1.28