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

  ViewVC Help
Powered by ViewVC 1.1.30