/[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 194380 - (show annotations) (download)
Tue Jan 10 01:34:32 2012 UTC (12 years, 3 months ago) by luigiwalser
File size: 21965 byte(s)
- security fix for CVE-2009-4636 (P45, mdv)
- security fix for CVE-2011-0722 (P46, mdv)
- security fix for ffmpeg-mov_bad_timings (P47, google)
- security fix for ffmpeg-mp3_outlen (P48, google)
- security fix for ffmpeg-vorbis_zero_samplerate (P49, google)

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

  ViewVC Help
Powered by ViewVC 1.1.30