/[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 390693 - (show annotations) (download)
Tue Jan 22 06:49:53 2013 UTC (11 years, 3 months ago) by fwang
File size: 21686 byte(s)
rebuild for ffmpeg 1.1.1
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 r35756
16 %define ffmpegversion 1.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 10.%{svn}.1
31 %else
32 %define rel 10
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 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 %if %build_debug
523 export CFLAGS="$CFLAGS -g"
524 %endif
525 %ifarch ppc
526 export CFLAGS="$CFLAGS -mcpu=7450 -maltivec"
527 %endif
528 %if %build_directfb
529 export CPPFLAGS="-I%_includedir/directfb"
530 %endif
531 %if %{build_3264bit}
532 export EXESUF=32
533 %endif
534 export LDFLAGS="%{?ldflags}"
535 ./configure \
536 --prefix=%{_prefix} \
537 --datadir=%{_datadir}/%{name} \
538 --confdir=%{_sysconfdir}/%{name} \
539 --libdir=%{_libdir} \
540 %if !%build_optimization
541 --enable-runtime-cpudetection \
542 %ifarch %ix86
543 --enable-mmx \
544 --enable-3dnow \
545 --enable-sse \
546 --enable-sse2 \
547 --enable-fastmemcpy \
548 %endif
549 %endif
550 --enable-freetype \
551 --enable-nas \
552 %if %build_debug
553 --enable-debug=3 \
554 %else
555 --disable-sighandler \
556 %endif
557 %if %build_gui
558 --enable-gui \
559 %endif
560 %if %build_system_ffmpeg
561 --disable-ffmpeg_a \
562 %endif
563 --language=all \
564 %if ! %build_faad
565 --disable-faad \
566 --disable-decoder=AAC \
567 %endif
568 --disable-libdvdcss-internal \
569 --enable-dvdnav \
570 --disable-dvdread-internal \
571 --enable-dvdread \
572 %if %build_lirc
573 --enable-lirc \
574 %else
575 --disable-lirc \
576 %endif
577 --enable-tv \
578 %if ! %build_v4l2
579 --disable-tv-v4l2 \
580 %endif
581 --enable-joystick \
582 \
583 --enable-gl \
584 --disable-svga \
585 %if ! %build_mga
586 --disable-mga \
587 %endif
588 %if ! %build_fbdev
589 --disable-fbdev \
590 %endif
591 %if %build_directfb
592 --enable-directfb \
593 %else
594 --disable-directfb \
595 %endif
596 %if %build_mencoder
597 --enable-mencoder \
598 %else
599 --disable-mencoder \
600 %endif
601 %if ! %build_live
602 --disable-live \
603 %endif
604 %if ! %build_vesa
605 --disable-vesa \
606 %endif
607 %if %build_theora
608 --enable-theora \
609 %else
610 --disable-theora \
611 %endif
612 --enable-menu \
613 %if %build_xmms
614 --enable-xmms --with-xmmslibdir=%{_libdir} \
615 %endif
616 %if %build_smb
617 --enable-smb \
618 %endif
619 %if ! %build_dvb
620 --disable-dvb \
621 %endif
622 %if ! %build_ggi
623 --disable-ggi \
624 %endif
625 --codecsdir=%{_libdir}/codecs \
626 %if ! %build_arts
627 --disable-arts \
628 %endif
629 %if ! %build_jack
630 --disable-jack \
631 %endif
632 %if ! %build_aa
633 --disable-aa \
634 %endif
635 %if ! %build_cdda
636 --disable-cdparanoia \
637 %endif
638 %if ! %build_dv
639 --disable-libdv \
640 %endif
641 %if ! %build_lzo
642 --disable-liblzo \
643 %endif
644 %if ! %build_sdl
645 --disable-sdl \
646 %endif
647 %if ! %build_alsa
648 --disable-alsa \
649 %endif
650 %if ! %build_fribidi
651 --disable-fribidi \
652 %endif
653 %if !%build_enca
654 --disable-enca \
655 %endif
656 %if %build_pulse
657 --enable-pulse \
658 %endif
659 %if !%build_openal
660 --disable-openal \
661 %endif
662 %if %build_zr
663 --enable-zr \
664 %endif
665 %if %build_xvmc
666 --enable-xvmc \
667 %endif
668 %if ! %build_ivtv
669 --disable-ivtv \
670 %endif
671 %if ! %build_vdpau
672 --disable-vdpau
673 %endif
674
675
676 # Keep this line before empty end %%configure (ppc conditionnal pb)
677 make EXESUF=%{pkgext}
678 #gw make sure we have our version string included:
679 fgrep %{release} version.h
680
681 %install
682 rm -rf %{buildroot}
683 install -d -m 755 %{buildroot}%{_bindir}
684 install -d -m 755 %{buildroot}%{_datadir}/%{name}
685 install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
686 install -m 755 mplayer%{pkgext} -D %{buildroot}%{_bindir}/mplayer%{pkgext}
687 for lang in en de fr hu pl zh_CN es it; do
688 install -m 644 DOCS/man/$lang/mplayer.1 -D %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mplayer%{pkgext}.1
689 done
690 %find_lang mplayer%{pkgext} --with-man
691
692 %if %build_mencoder
693 install -m 755 mencoder%{pkgext} -D %{buildroot}%{_bindir}/mencoder%{pkgext}
694
695 for lang in en de fr hu pl zh_CN es it; do
696 ln -s mplayer%{pkgext}.1 %{buildroot}%{_mandir}/$([ "$lang" != "en" ] && echo $lang)/man1/mencoder%{pkgext}.1
697 done
698 %find_lang mencoder%{pkgext} --with-man
699 install -m 755 TOOLS/mencvcd.sh %{buildroot}%_bindir/mencvcd%{pkgext}
700 install -m 755 TOOLS/divx2svcd.sh %{buildroot}%_bindir/divx2svcd%{pkgext}
701 install -m 755 TOOLS/wma2ogg.pl %{buildroot}%_bindir/wma2ogg%{pkgext}.pl
702 install -m 755 TOOLS/midentify.sh %{buildroot}%_bindir/midentify%{pkgext}
703 %endif
704 install -m 644 etc/example.conf %{buildroot}%{_sysconfdir}/%{name}/mplayer.conf
705 install -m 644 etc/menu.conf %{buildroot}%{_sysconfdir}/%{name}
706
707 %if %build_gui
708 # default Skin
709 install -d -m 755 %{buildroot}%{_datadir}/%{name}/skins/
710 cp -r Blue %{buildroot}%{_datadir}/%{name}/skins/
711 ln -s Blue %{buildroot}%{_datadir}/%{name}/skins/default
712 # gmplayer equals mplayer -gui
713 ln -s mplayer%{pkgext} %{buildroot}%{_bindir}/gmplayer%{pkgext}
714 # icons
715 mkdir -p %{buildroot}{%_liconsdir,%_iconsdir,%{_miconsdir}}
716 convert -transparent white Blue/icons/icon48x48.png %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
717 convert -transparent white Blue/icons/icon32x32.png %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
718 convert -transparent white -scale 16x16 Blue/icons/icon48x48.png %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
719 install -D -m 644 etc/mplayer.desktop %{buildroot}%{_datadir}/applications/mplayer%{pkgext}.desktop
720 perl -pi -e 's@mplayer$@mplayer%{pkgext}@g' %{buildroot}%{_datadir}/applications/mplayer%{pkgext}.desktop
721 %endif
722 %if %{build_3264bit}
723 if [ -e %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png ]; then
724 convert %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png -channel green -negate \
725 %{buildroot}%{_liconsdir}/mplayer%{pkgext}.png
726 fi
727 if [ -e %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png ]; then
728 convert %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png -channel green -negate \
729 %{buildroot}%{_iconsdir}/mplayer%{pkgext}.png
730 fi
731 if [ -e %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png ]; then
732 convert %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png -channel green -negate \
733 %{buildroot}%{_miconsdir}/mplayer%{pkgext}.png
734 fi
735 %endif
736
737 %if %build_debug
738 export DONT_STRIP=1
739 %endif
740
741 %if %build_gui
742 %pre gui
743 if [ -d %{_datadir}/%{name}/skins/default ]
744 then rm -rf %{_datadir}/%{name}/skins/default
745 fi
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