/[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 389213 - (show annotations) (download)
Thu Jan 17 21:29:26 2013 UTC (11 years, 3 months ago) by pterjan
Original Path: obsolete/cauldron/mplayer/current/SPECS/mplayer.spec
File size: 21668 byte(s)
Drop 
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 1.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}.2
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 9
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-1.1-init-avcodec.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 %endif
376 %if %build_bluray
377 BuildRequires: bluray-devel
378 %endif
379 BuildRequires: bzip2-devel
380 BuildRequires: libmng-devel
381 BuildRequires: libmesagl-devel
382 BuildRequires: libxxf86vm-devel
383 BuildRequires: libxxf86dga-devel
384 BuildRequires: libxscrnsaver-devel
385 BuildRequires: libspeex-devel
386 BuildRequires: libmpcdec-devel
387 BuildRequires: ladspa-devel
388 BuildRequires: libxslt-proc
389 BuildRequires: docbook-style-xsl
390 BuildRequires: docbook-dtd412-xml
391 BuildRequires: libcaca-devel
392 BuildRequires: giflib-devel
393 %if %build_yasm
394 BuildRequires: yasm
395 %endif
396 BuildRequires: libbs2b-devel
397 %if %build_system_ffmpeg
398 BuildRequires: ffmpeg-devel = %{ffmpegversion}
399 %endif
400 BuildRequires: libdvdread-devel
401 BuildRequires: libdvdnav-devel
402
403 Provides: mplayer%{pkgext}1.0
404 Obsoletes: mplayer%{pkgext}1.0
405
406
407 %description
408 MPlayer is a movie player for LINUX (runs on many other Unices, and
409 non-x86 CPUs, see the documentation). It plays most MPEG, VOB, AVI,
410 VIVO, ASF/WMV, QT/MOV, FLI, NuppelVideo, yuv4mpeg, FILM, RoQ, and some
411 RealMedia files, supported by many native, XAnim, and Win32 DLL codecs.
412 You can watch VideoCD, SVCD, DVD, 3ivx, FLI, and even DivX movies too
413 (and you don't need the avifile library at all!). The another big
414 feature of mplayer is the wide range of supported output drivers. It
415 works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, but you can use
416 SDL (and this way all drivers of SDL), VESA (on every VESA compatible
417 card, even without X!), and some lowlevel card-specific drivers (for
418 Matrox, 3Dfx and Radeon) too! Most of them supports software or hardware
419 scaling, so you can enjoy movies in fullscreen. MPlayer supports
420 displaying through some hardware MPEG decoder boards, such as the DVB
421 and DXR3/Hollywood+! And what about the nice big antialiased shaded
422 subtitles (9 supported types!!!) with european/ISO 8859-1,2 (hungarian,
423 english, czech, etc), cyrillic, korean fonts, and OSD?
424 %if %build_plf
425
426 This package is in the 'tainted' section because some included codecs
427 are covered by patents. It also includes support for reading DVDs
428 encrypted with CSS which might be illegal in some countries.
429 %endif
430
431 %package doc
432 Summary: %{Name} documentation
433 Group: Documentation
434 BuildArch: noarch
435
436 %description doc
437 This package contains documentation for %{Name}.
438
439 %if %build_gui
440 %package gui
441 Summary: GUI for %{name}
442 Group: Video/Players
443 Requires: %{name} = %{version}
444 BuildRequires: gtk+2-devel
445 BuildRequires: imagemagick
446 Requires: soundwrapper
447 Provides: mplayer%{pkgext}1.0-gui
448 Obsoletes: mplayer%{pkgext}1.0-gui
449 Conflicts: mplayer-skins < 1.3-8
450
451 %description gui
452 This package contains a GUI for %{name}.
453 %endif
454
455 %if %build_mencoder
456 %package -n mencoder%{pkgext}
457 Summary: MPlayer's movie encoder
458 Group: Video/Editors and Converters
459 Requires: %{name} = %{version}
460 Provides: mencoder%{pkgext}1.0
461 Obsoletes: mencoder%{pkgext}1.0
462
463 %description -n mencoder%{pkgext}
464 MEncoder a movie encoder and is a part of the MPlayer package.
465 %if !%build_plf
466 Note: this version doesn't have support for encoding mp3 audio streams in the
467 video files.
468 %else
469 This 'tainted' build has additional support for AAC decoding with libfaad
470 and MP3 encoding with lame, both are covered by software patents. It
471 also includes support for reading DVDs encrypted with CSS which might
472 be illegal in some countries.
473 %endif
474 %endif
475
476
477 %prep
478 %if "%{svn}" != ""
479 %setup -q -n %{name} -a 4
480 #gw as we have have used svn export:
481 echo %{svn}|sed s/^r// > snapshot_version
482 perl -pi -e 's^r\$svn_revision^%{release}^' version.sh
483 find DOCS -name .svn|xargs rm -rf
484 %else
485 %setup -q -n MPlayer-%{version}%{prerel} -a 4
486 echo %{version}%{prerel}-%{release} > VERSION
487 %endif
488 #gw fix permissions
489 chmod 644 AUTHORS Changelog README Copyright
490 rm -f Blue/README
491 %patch0 -p1 -b .distro-config
492 #%patch3 -p1 -b .mp2
493 #%patch7 -p1 -b .mga
494 #%patch21 -p0 -b .compiz
495 %patch28 -p1 -b .rtsp-extra-fixes
496 %patch31 -p1 -b .format~
497 %patch33 -p0
498 %patch35 -p0
499 %patch43 -p1 -b .ffm-stable
500 %if %build_system_ffmpeg
501 %patch49 -p1
502 %else
503 %patch52 -p0
504 %endif
505 %patch50 -p0
506 %if %mdvver >= 3
507 %patch51 -p1
508 %endif
509
510 mv DOCS/README README.DOCS
511
512 tar -xjf %{SOURCE1}
513 mv ffmpeg-%{ffmpegversion} ffmpeg
514 pushd ffmpeg
515 popd
516
517 %build
518 %if !%build_optimization
519 export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
520 %endif
521 %if %build_debug
522 export CFLAGS="$CFLAGS -g"
523 %endif
524 %ifarch ppc
525 export CFLAGS="$CFLAGS -mcpu=7450 -maltivec"
526 %endif
527 %if %build_directfb
528 export CPPFLAGS="-I%_includedir/directfb"
529 %endif
530 %if %{build_3264bit}
531 export EXESUF=32
532 %endif
533 export LDFLAGS="%{?ldflags}"
534 ./configure \
535 --prefix=%{_prefix} \
536 --datadir=%{_datadir}/%{name} \
537 --confdir=%{_sysconfdir}/%{name} \
538 --libdir=%{_libdir} \
539 %if !%build_optimization
540 --enable-runtime-cpudetection \
541 %ifarch %ix86
542 --enable-mmx \
543 --enable-3dnow \
544 --enable-sse \
545 --enable-sse2 \
546 --enable-fastmemcpy \
547 %endif
548 %endif
549 --enable-freetype \
550 --enable-nas \
551 %if %build_debug
552 --enable-debug=3 \
553 %else
554 --disable-sighandler \
555 %endif
556 %if %build_gui
557 --enable-gui \
558 %endif
559 %if %build_system_ffmpeg
560 --disable-ffmpeg_a \
561 %endif
562 --language=all \
563 %if ! %build_faad
564 --disable-faad \
565 --disable-decoder=AAC \
566 %endif
567 --disable-libdvdcss-internal \
568 --enable-dvdnav \
569 --disable-dvdread-internal \
570 --enable-dvdread \
571 %if %build_lirc
572 --enable-lirc \
573 %else
574 --disable-lirc \
575 %endif
576 --enable-tv \
577 %if ! %build_v4l2
578 --disable-tv-v4l2 \
579 %endif
580 --enable-joystick \
581 \
582 --enable-gl \
583 --disable-svga \
584 %if ! %build_mga
585 --disable-mga \
586 %endif
587 %if ! %build_fbdev
588 --disable-fbdev \
589 %endif
590 %if %build_directfb
591 --enable-directfb \
592 %else
593 --disable-directfb \
594 %endif
595 %if %build_mencoder
596 --enable-mencoder \
597 %else
598 --disable-mencoder \
599 %endif
600 %if ! %build_live
601 --disable-live \
602 %endif
603 %if ! %build_vesa
604 --disable-vesa \
605 %endif
606 %if %build_theora
607 --enable-theora \
608 %else
609 --disable-theora \
610 %endif
611 --enable-menu \
612 %if %build_xmms
613 --enable-xmms --with-xmmslibdir=%{_libdir} \
614 %endif
615 %if %build_smb
616 --enable-smb \
617 %endif
618 %if ! %build_dvb
619 --disable-dvb \
620 %endif
621 %if ! %build_ggi
622 --disable-ggi \
623 %endif
624 --codecsdir=%{_libdir}/codecs \
625 %if ! %build_arts
626 --disable-arts \
627 %endif
628 %if ! %build_jack
629 --disable-jack \
630 %endif
631 %if ! %build_aa
632 --disable-aa \
633 %endif
634 %if ! %build_cdda
635 --disable-cdparanoia \
636 %endif
637 %if ! %build_dv
638 --disable-libdv \
639 %endif
640 %if ! %build_lzo
641 --disable-liblzo \
642 %endif
643 %if ! %build_sdl
644 --disable-sdl \
645 %endif
646 %if ! %build_alsa
647 --disable-alsa \
648 %endif
649 %if ! %build_fribidi
650 --disable-fribidi \
651 %endif
652 %if !%build_enca
653 --disable-enca \
654 %endif
655 %if %build_pulse
656 --enable-pulse \
657 %endif
658 %if !%build_openal
659 --disable-openal \
660 %endif
661 %if %build_zr
662 --enable-zr \
663 %endif
664 %if %build_xvmc
665 --enable-xvmc \
666 %endif
667 %if ! %build_ivtv
668 --disable-ivtv \
669 %endif
670 %if ! %build_vdpau
671 --disable-vdpau
672 %endif
673
674
675 # Keep this line before empty end %%configure (ppc conditionnal pb)
676 make EXESUF=%{pkgext}
677 #gw make sure we have our version string included:
678 fgrep %{release} version.h
679
680 %install
681 rm -rf %{buildroot}
682 install -d -m 755 %{buildroot}%{_bindir}
683 install -d -m 755 %{buildroot}%{_datadir}/%{name}
684 install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
685 install -m 755 mplayer%{pkgext} -D %{buildroot}%{_bindir}/mplayer%{pkgext}
686 for lang in en de fr hu pl zh_CN es it; do
687 install -m 644 DOCS/man/$lang/mplayer.1 -D %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mplayer%{pkgext}.1
688 done
689 %find_lang mplayer%{pkgext} --with-man
690
691 %if %build_mencoder
692 install -m 755 mencoder%{pkgext} -D %{buildroot}%{_bindir}/mencoder%{pkgext}
693
694 for lang in en de fr hu pl zh_CN es it; do
695 ln -s mplayer%{pkgext}.1 %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mencoder%{pkgext}.1
696 done
697 %find_lang mencoder%{pkgext} --with-man
698 install -m 755 TOOLS/mencvcd.sh %{buildroot}%_bindir/mencvcd%{pkgext}
699 install -m 755 TOOLS/divx2svcd.sh %{buildroot}%_bindir/divx2svcd%{pkgext}
700 install -m 755 TOOLS/wma2ogg.pl %{buildroot}%_bindir/wma2ogg%{pkgext}.pl
701 install -m 755 TOOLS/midentify.sh %{buildroot}%_bindir/midentify%{pkgext}
702 %endif
703 install -m 644 etc/example.conf %{buildroot}%{_sysconfdir}/%{name}/mplayer.conf
704 install -m 644 etc/menu.conf %{buildroot}%{_sysconfdir}/%{name}
705
706 %if %build_gui
707 # default Skin
708 install -d -m 755 %{buildroot}%{_datadir}/%{name}/skins/
709 cp -r Blue %{buildroot}%{_datadir}/%{name}/skins/
710 ln -s Blue %{buildroot}%{_datadir}/%{name}/skins/default
711 # gmplayer equals mplayer -gui
712 ln -s mplayer%{pkgext} %{buildroot}%{_bindir}/gmplayer%{pkgext}
713 # icons
714 mkdir -p %{buildroot}{%_liconsdir,%_iconsdir,%{_miconsdir}}
715 convert -transparent white Blue/icons/icon48x48.png %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
716 convert -transparent white Blue/icons/icon32x32.png %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
717 convert -transparent white -scale 16x16 Blue/icons/icon48x48.png %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
718 install -D -m 644 etc/mplayer.desktop %{buildroot}%{_datadir}/applications/mplayer%{pkgext}.desktop
719 perl -pi -e 's@mplayer$@mplayer%{pkgext}@g' %{buildroot}%{_datadir}/applications/mplayer%{pkgext}.desktop
720 %endif
721 %if %{build_3264bit}
722 if [ -e %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png ]; then
723 convert %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png -channel green -negate \
724 %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
725 fi
726 if [ -e %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png ]; then
727 convert %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png -channel green -negate \
728 %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
729 fi
730 if [ -e %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png ]; then
731 convert %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png -channel green -negate \
732 %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
733 fi
734 %endif
735
736 %if %build_debug
737 export DONT_STRIP=1
738 %endif
739
740 %if %build_gui
741 %pre gui
742 if [ -d %{_datadir}/%{name}/skins/default ]
743 then rm -rf %{_datadir}/%{name}/skins/default
744 fi
745 %endif
746
747 %clean
748 rm -rf %{buildroot}
749
750 %files -f mplayer%{pkgext}.lang
751 %doc AUTHORS Changelog README Copyright
752 %dir %{_sysconfdir}/%{name}
753 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/mplayer.conf
754 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/menu.conf
755 %{_bindir}/midentify%{pkgext}
756 %{_bindir}/mplayer%{pkgext}
757 %{_mandir}/man1/mplayer%{pkgext}.1*
758 %dir %{_datadir}/%{name}
759
760 %files doc
761 %defattr(-,root,root,755)
762 %doc README.DOCS
763 %doc DOCS/default.css DOCS/xml DOCS/tech/
764
765 %if %build_mencoder
766 %files -n mencoder%{pkgext} -f mencoder%{pkgext}.lang
767 %{_bindir}/mencoder%{pkgext}
768 %{_bindir}/divx2svcd%{pkgext}
769 %{_bindir}/mencvcd%{pkgext}
770 %{_bindir}/wma2ogg%{pkgext}.pl
771 %{_mandir}/man1/mencoder%{pkgext}.1*
772 %endif
773
774 %if %build_gui
775 %files gui
776 %{_bindir}/gmplayer%{pkgext}
777 %{_datadir}/applications/mplayer%{pkgext}.desktop
778 %{_datadir}/%{name}/skins/
779 %{_iconsdir}/mplayer%{pkgext}.png
780 %{_miconsdir}/mplayer%{pkgext}.png
781 %{_liconsdir}/mplayer%{pkgext}.png
782 %endif
783
784
785
786

  ViewVC Help
Powered by ViewVC 1.1.30