]> git.pld-linux.org Git - packages/mplayer.git/blob - mplayer.spec
- force gcc4 on ac-ppc
[packages/mplayer.git] / mplayer.spec
1 #
2 # Conditional build:
3 %bcond_with     directfb        # with DirectFB video output
4 %bcond_with     dxr3            # enable use of DXR3/H+ hardware MPEG decoder
5 %bcond_with     ggi             # with ggi video output
6 %bcond_with     nas             # with NAS audio output
7 %bcond_with     svga            # with svgalib video output
8 %bcond_without  osd             # with osd menu support
9 %bcond_without  altivec         # without altivec support
10 %bcond_without  x264            # without x264 support
11 %bcond_with     xmms            # with XMMS inputplugin support
12 %bcond_without  aalib           # without aalib video output
13 %bcond_without  jack            # without JACKD support
14 %bcond_without  alsa            # without ALSA audio output
15 %bcond_with     arts            # with arts audio output
16 %bcond_without  caca            # without libcaca video output
17 %bcond_without  cdparanoia      # without cdparanoia support
18 %bcond_without  dvdnav          # without dvdnav support
19 %bcond_without  enca            # disable using ENCA charset oracle library
20 %bcond_with     esd             # enable EsounD sound support
21 %bcond_without  faad            # disable FAAD2 (AAC) support
22 %bcond_without  gif             # disable GIF support
23 %bcond_without  gui             # without GTK+ GUI
24 %bcond_without  joystick        # disable joystick support
25 %bcond_without  libdts          # disable libdts support
26 %bcond_without  libdv           # disable libdv en/decoding support
27 %bcond_without  lirc            # without lirc support
28 %bcond_without  live            # without LIVE555 libraries
29 %bcond_without  lzo             # with LZO support (requires lzo 2.x)
30 %bcond_without  mad             # without mad (audio MPEG) support
31 %bcond_without  pulseaudio      # without pulseaudio output
32 %bcond_without  quicktime       # without binary quicktime dll support
33 %bcond_without  real            # without Real* 8/9 codecs support
34 %bcond_without  runtime         # disable runtime cpu detection, just detect CPU
35                                 #  in compile time (advertised by mplayer authors as working faster); in this case
36                                 #  mplayer may not work on machine other then where it was compiled
37 %bcond_without  select          # disable audio select() support (for example required this option ALSA or Vortex2 driver)
38 %bcond_without  smb             # disable Samba (SMB) input support
39 %bcond_without  theora          # without theora support
40 %bcond_without  win32           # without win32 codecs support
41 %bcond_without  vdpau           # disable vdpau
42 %bcond_without  vidix           # disable vidix
43 %bcond_without  vorbis          # without Ogg-Vorbis audio support
44 %bcond_with     system_vorbis   # use system libvorbis instead of internal tremor
45 %bcond_without  xvid            # disable XviD codec
46 %bcond_without  mencoder        # disable mencoder (a/v encoder) compilation
47 %bcond_without  sdl             # disable SDL
48 %bcond_without  doc             # don't build docs (slow)
49 %bcond_with     shared          # experimental libmplayer.so support
50 %bcond_without  amr             # enable Adaptive Multi Rate (AMR) speech codec support
51 %bcond_without  gnomess         # disable controling gnome screensaver
52 %bcond_without  ssse3           # sse3 optimizations (needs binutils >= 2.16.92)
53 %bcond_with     system_ffmpeg   # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer)
54 %bcond_with     on2             # with patches from On2 Flix Engine for Linux
55 %if "%{pld_release}" == "ac"
56 %bcond_with             hidden_visibility       # no gcc hidden visibility
57 %else
58 %bcond_without  hidden_visibility       # no gcc hidden visibility
59 %endif
60
61 %if %{with alsa}
62 %undefine       with_select
63 %endif
64
65 %if %{without vorbis}
66 %undefine       with_system_vorbis
67 %endif
68
69 %ifnarch %{ix86}
70 %undefine       with_win32
71 %undefine       with_quicktime
72 %undefine       with_vidix
73 %endif
74
75 %ifnarch %{ix86} %{x8664} ppc ppc64
76 %undefine       with_runtime
77 %endif
78
79 %ifnarch %{ix86} %{x8664}
80 %undefine       with_vdpau
81 %endif
82
83 %ifnarch ppc
84 %undefine       with_altivec
85 %endif
86
87 %if %{_lib} == "lib64"
88 %define         _suf    64
89 %else
90 %define         _suf    32
91 %endif
92
93 %define         subver  rc4
94 %define         svnver  31097
95 %define         rel     5
96 Summary:        MPlayer - THE Movie Player for UN*X
97 Summary(de.UTF-8):      MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
98 Summary(es.UTF-8):      Otro reproductor de películas
99 Summary(ko.UTF-8):      리눅스용 미디어플레이어
100 Summary(pl.UTF-8):      Odtwarzacz filmów dla systemów uniksowych
101 Summary(pt_BR.UTF-8):   Reprodutor de filmes
102 Name:           mplayer
103 Version:        1.0
104 Release:        5.%{subver}_svn%{svnver}.%{rel}
105 # DO NOT increase epoch unless it's really neccessary!
106 # especially such changes like pre7->pre7try2, increase Release instead!
107 # PS: $ rpmvercmp pre7try2 pre7
108 # pre7try2 > pre7
109 Epoch:          3
110 License:        GPL
111 Group:          Applications/Multimedia
112 # svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer-rXXX
113 # tar --exclude-vcs -cvJf mplayer-rXXX.tar.xz mplayer-rXXX
114 Source0:        %{name}-r%{svnver}.tar.xz
115 # Source0-md5:  7e70fb6582890c60329b8fb5f34423d5
116 Source3:        ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
117 # Source3-md5:  7b47904a925cf58ea546ca15f3df160c
118 Source5:        g%{name}.desktop
119 Source6:        ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
120 # Source6-md5:  1ecd31d17b51f16332b1fcc7da36b312
121 Source7:        %{name}.png
122 Source8:        %{name}.desktop
123 # http://www.on2.com/gpl/mplayer/
124 Source9:        http://support.on2.com/gpl/mplayer/2009-10-08-mencoder-on2flixenglinux.tar.bz2
125 # Source9-md5:  07774a2663a8fda07c308df0c6569b56
126
127 # build (configure / Makefile) related:
128 Patch10:        %{name}-ldflags.patch
129 Patch11:        %{name}-altivec.patch
130 Patch12:        %{name}-check-byteswap.patch
131 Patch13:        %{name}-visibility-hidden-fix.patch
132 Patch14:        %{name}-ffmpeg.patch
133 Patch15:        %{name}-shared_live.patch
134 Patch16:        %{name}-shared.patch
135
136 # codecs, outputs, demuxers:
137 Patch20:        %{name}-auto-expand.patch
138 Patch21:        %{name}-release_directfb.patch
139
140 # goodies:
141 Patch30:        %{name}-cp1250-fontdesc.patch
142 Patch31:        %{name}-350.patch
143 # update, hard to fix right now because of gnome bug 579430:
144 # https://bugzilla.gnome.org/show_bug.cgi?id=579430
145 #Patch32:       %{name}-gnome-screensaver.patch
146
147 Patch100:       %{name}-on2flix.patch
148
149 URL:            http://www.mplayerhq.hu/
150 %{?with_directfb:BuildRequires: DirectFB-devel}
151 BuildRequires:  OpenAL-devel
152 BuildRequires:  OpenGL-devel
153 %{?with_sdl:BuildRequires:      SDL-devel >= 1.1.7}
154 %{?with_aalib:BuildRequires:    aalib-devel}
155 %{?with_alsa:BuildRequires:     alsa-lib-devel}
156 %{?with_arts:BuildRequires:     artsc-devel}
157 %{?with_ssse3:BuildRequires:    binutils >= 3:2.16.92}
158 %{?with_cdparanoia:BuildRequires:       cdparanoia-III-devel}
159 BuildRequires:  dirac-devel
160 %{?with_doc:BuildRequires:      docbook-dtd412-xml}
161 %{?with_doc:BuildRequires:      docbook-style-xsl}
162 %{?with_dxr3:BuildRequires:     em8300-devel}
163 %{?with_enca:BuildRequires:     enca-devel}
164 %{?with_esd:BuildRequires:      esound-devel}
165 BuildRequires:  faac-devel
166 %{?with_faad:BuildRequires:     faad2-devel >= 2.0}
167 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 0.4.9-4.20081024.3}
168 BuildRequires:  freetype-devel >= 2.0.9
169 BuildRequires:  fribidi-devel
170 BuildRequires:  tar >= 1:1.22
171 %{?with_vidix:BuildRequires:    vidix-devel}
172 %{?with_altivec:BuildRequires:  gcc >= 5:4.1}
173 %{?with_gnomess:BuildRequires:  dbus-glib-devel}
174 %{?with_gif:BuildRequires:      giflib-devel}
175 %{?with_gui:BuildRequires:      gtk+2-devel}
176 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
177 %{?with_jack:%requires_eq       jack-audio-connection-kit-libs}
178 BuildRequires:  lame-libs-devel
179 %{?with_caca:BuildRequires:     libcaca-devel}
180 %{?with_libdts:BuildRequires:   libdts-devel}
181 %{?with_libdv:BuildRequires:    libdv-devel > 0.9.5}
182 %{?with_dvdnav:BuildRequires:   libdvdnav-devel >= 4.1.3}
183 %{?with_ggi:BuildRequires:      libggi-devel}
184 BuildRequires:  libjpeg-devel
185 %{?with_mad:BuildRequires:      libmad-devel}
186 BuildRequires:  libmng-devel
187 BuildRequires:  libmpcdec-devel >= 1.2.1
188 BuildRequires:  libpng-devel
189 %{?with_smb:BuildRequires:      libsmbclient-devel}
190 %{?with_theora:BuildRequires:   libtheora-devel}
191 %{?with_vdpau:BuildRequires:    libvdpau-devel}
192 %{?with_system_vorbis:BuildRequires:    libvorbis-devel}
193 %{?with_x264:BuildRequires:     libx264-devel >= 0.1.3}
194 BuildRequires:  libxslt-progs
195 %{?with_lirc:BuildRequires:     lirc-devel}
196 %{?with_live:BuildRequires:     live-devel}
197 %{?with_lzo:BuildRequires:      lzo-devel >= 2.0}
198 %{?with_nas:BuildRequires:      nas-devel}
199 BuildRequires:  ncurses-devel
200 %{?with_amr:BuildRequires:      opencore-amr-devel}
201 BuildRequires:  pkgconfig
202 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel >= 0.9}
203 BuildRequires:  rpm >= 4.4.9-56
204 BuildRequires:  rpmbuild(macros) >= 1.527
205 BuildRequires:  schroedinger-devel
206 BuildRequires:  speex-devel >= 1.1
207 %{?with_svga:BuildRequires:     svgalib-devel}
208 BuildRequires:  twolame-devel
209 %{?with_xmms:BuildRequires:     xmms-devel}
210 %{?with_xvid:BuildRequires:     xvid-devel >= 1:0.9.0}
211 %ifarch %{ix86} %{x8664}
212 BuildRequires:  yasm
213 %endif
214 BuildRequires:  zlib-devel
215 %if "%{pld_release}" == "ac"
216 BuildRequires:  XFree86-devel >= 4.0.2
217 %else
218 BuildRequires:  xorg-lib-libX11-devel
219 BuildRequires:  xorg-lib-libXScrnSaver-devel
220 BuildRequires:  xorg-lib-libXext-devel
221 BuildRequires:  xorg-lib-libXinerama-devel
222 BuildRequires:  xorg-lib-libXv-devel
223 BuildRequires:  xorg-lib-libXvMC-devel
224 BuildRequires:  xorg-lib-libXxf86dga-devel
225 BuildRequires:  xorg-lib-libXxf86vm-devel
226 %endif
227 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
228 Requires:       OpenGL
229 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
230
231 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
232 %define         specflags_ia32  -fomit-frame-pointer
233 %if %{with altivec}
234 %define         specflags_ppc   -maltivec
235 %endif
236
237 %if "%{pld_release}" == "ac"
238 %ifarch ppc
239 %define         __cc    gcc4
240 %endif
241 %endif
242
243 %description
244 Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
245 AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
246 MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
247 MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
248 devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
249 optionally with SHM extension, X11 using overlays with the Xvideo
250 extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
251 Voodoo2/3 hardware, SDL v1.1.7 driver etc.
252
253 If you want to use win32 codecs install w32codec package.
254
255 %description -l de.UTF-8
256 MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player.
257 Kennzeichnend ist die herausragende Format- und
258 Plattform-Kompatibilität.
259
260 Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch
261 plattformexklusive, wodurch etwa Windows Media auch außerhalb von
262 Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB.
263 Eine besondere Fehlertoleranz ermöglicht es dem mehrfach
264 ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere
265 Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits
266 installierte Codecs nicht mit MPlayer kollidieren können.
267
268 %description -l es.UTF-8
269 Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
270 MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
271 (uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
272 de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
273 Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
274 G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
275 overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
276 G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
277 v1.1.7 etc.
278
279 Si quiere usar codecs Win32, instale el paquete w32codec.
280
281 %description -l ko.UTF-8
282 MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf
283 파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다.
284 MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11,
285 Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나
286 (Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할
287 수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인
288 크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수
289 있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의
290 부드러운(antialiased) 자막폰트도 사용할 수 있습니다.
291
292 %description -l pl.UTF-8
293 Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2,
294 RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
295 (nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
296 Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
297 Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z
298 rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
299 G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp.
300
301 Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec.
302
303 %description -l pt_BR.UTF-8
304 MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
305 áudio. Diferentes mecanismos de reprodução podem também ser
306 escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
307
308 %package -n gmplayer
309 Summary:        MPlayer with GTK+ GUI interface
310 Summary(pl.UTF-8):      MPlayer z graficznym interfejsem GTK+
311 Group:          X11/Applications/Multimedia
312 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
313 Requires:       %{name}-skin
314
315 %description -n gmplayer
316 MPlayer with GUI GTK+ interface.
317
318 %description -n gmplayer -l pl.UTF-8
319 MPlayer z graficznym interfejsem GTK+.
320
321 %package common
322 Summary:        Configuration files and documentation for MPlayer
323 Summary(pl.UTF-8):      Pliki konfiguracyjne i dokumentacja dla MPlayera
324 Group:          Applications/Multimedia
325 Suggests:       unrar
326 Obsoletes:      mplayer-vidix
327
328 %description common
329 Configuration files, man page and HTML documentation for MPlayer.
330
331 %description common -l pl.UTF-8
332 Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera.
333
334 %package -n mencoder
335 Summary:        MEncoder - a movie encoder for Linux
336 Summary(pl.UTF-8):      MEncoder - koder filmów dla Linuksa
337 Group:          Applications/Multimedia
338 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
339
340 %description -n mencoder
341 MEncoder is a movie encoder for Linux and is a part of the MPlayer
342 package.
343
344 %description -n mencoder -l pl.UTF-8
345 MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer.
346
347 %prep
348 %setup -q -n %{name}-r%{svnver} -a3 -a6 -a9
349 cp -f etc/codecs.conf etc/codecs.win32.conf
350
351 # build (configure / Makefile) related:
352 %patch10 -p1
353 %patch11 -p1
354 %patch12 -p1
355 %patch13 -p1
356 %{?with_system_ffmpeg:%patch14 -p1}
357 %{?with_live:%patch15 -p1}
358 %{?with_shared:%patch16 -p1}
359
360 # codecs, outputs, demuxers:
361 %patch20 -p1
362 %patch21 -p1
363
364 # goodies:
365 %patch30 -p0
366 %patch31 -p1
367 #%{with_gnomess:%patch32 -p1}
368
369 # on2flix
370 mv mencoder-on2flixenglinux{-*-*-*,}
371 %if %{with on2}
372 #%%patch100 -p1
373 cp -a mencoder-on2flixenglinux/patch/new_files/libmpdemux/* libmpdemux
374 # remove broken patches:
375 # - first set does not apply
376 # - second set beakes build
377 for PATCH in    asf-correct_movielength avi_check_idxflags \
378                 demux_lavf-add_dv_mts_preferred demux_lavf-probe_small_files \
379                 mencoder_07_demux_update_pts mencoder_10_correct_pts \
380                 mpegvideo-revert_r18381 \
381                 \
382                 reduce_spurious_logging
383 do
384         rm mencoder-on2flixenglinux/patch/$PATCH.diff
385 done
386 for a in mencoder-on2flixenglinux/patch/*.diff; do
387         patch -p0 < $a
388 done
389 %endif
390
391 # Set version
392 %if "x%{svnver}" != "x%{nil}"
393         echo "SVN-r%{svnver}%{?with_on2:-on2}" > VERSION
394 %endif
395
396 cat etc/example.conf > etc/mplayer.conf
397 cat <<'CONFIGADD' >> etc/mplayer.conf
398
399 ######################
400 # PLD Linux Defaults #
401 ######################
402 [default]
403
404 # alternate solution for CP1250-encoded subtitles
405 fontconfig = yes
406 subcp = cp1250
407
408 # ...or if you prefer native bitmap fonts shipped with mplayer
409 #fontconfig = no
410 #subcp = iso-8859-1
411
412 # Standard location
413 unrarexec = "%{_bindir}/unrar"
414
415 CONFIGADD
416
417 %if %{with system_ffmpeg}
418 # using external ffmpeg, but mplayer adds these to includepath
419 rm -r libavcodec libavdevice libavformat libavutil libpostproc libswscale
420 %endif
421
422 # *** HOT FIXES ***
423
424 # typo, fixed in recent svn
425 sed 's/STREAM_NONCACHEABLE/STREAM_NON_CACHEABLE/' -i stream/stream_live555.c
426
427 # mjpeg encoder is required for Zoran hardware
428 sed '/_libavencoders="MPEG/s/"$/ MJPEG_ENCODER"/' -i configure
429
430 %build
431 CFLAGS="%{rpmcflags} %{?with_hidden_visibility:-fvisibility=hidden} %{?with_shared:-fvisibility=default -fPIC}"
432 CFLAGS="$CFLAGS -I%{_includedir}/xvid%{?with_directfb::%{_includedir}/directfb}"
433 %{?with_live:CFLAGS="$CFLAGS -I/usr/include/liveMedia"}
434
435 build() {
436         set -x
437
438         ./configure \
439         %{?debug:--enable-debug=3} \
440         --prefix=%{_prefix} \
441         --confdir=%{_sysconfdir}/mplayer \
442         --cc="%{__cc}" \
443         --extra-cflags="$CFLAGS" \
444         --real-ldflags="%{rpmldflags}" \
445         --extra-ldflags="%{?_x_libraries:-L%{_x_libraries}}" \
446 %if %{with system_ffmpeg}
447         --disable-libavutil_a \
448         --disable-libavcodec_a \
449         --disable-libavformat_a \
450         --disable-libpostproc_a \
451         --enable-libavutil_so \
452         --enable-libavcodec_so \
453         --enable-libavformat_so \
454         --enable-libpostproc_so \
455 %endif
456 %ifnarch %{ix86} %{x8664}
457         --disable-mmx \
458         --disable-mmxext \
459         --disable-3dnow \
460         --disable-3dnowext \
461         --disable-sse \
462         --disable-sse2 \
463         --disable-fastmemcpy \
464 %endif
465         %{__disable ssse3} \
466 %ifarch ppc
467         %{__disable altivec} \
468 %endif
469         %{__enable_disable amr libopencore_amrnb} %{__enable_disable amr libopencore_amrwb} \
470         %{__enable_disable directfb} \
471         %{__disable dxr3} \
472         %{__disable ggi} \
473         %{__disable live} \
474         %{__disable lzo liblzo} \
475         %{__disable nas} \
476         %{__disable svga} \
477         %{__disable aalib aa} \
478         %{__disable jack} \
479         %{__enable_disable alsa} \
480         %{__disable arts} \
481         %{__disable caca} \
482         %{__disable cdparanoia} \
483         %{__disable enca} \
484         %{__disable esd} \
485         --disable-faad-internal \
486         %{__disable faad} \
487         %{__disable gif} \
488         %{__enable joystick} \
489         %{__disable libdv} \
490         %{__disable libdts libdca} \
491         %{__enable_disable lirc} \
492         %{__disable mad} \
493         %{__disable pulseaudio pulse} \
494         %{__disable quicktime qtx} \
495         %{__disable real} \
496         %{__enable_disable runtime runtime-cpudetection} \
497         %{__disable select} \
498         %{__disable smb} \
499         %{__disable win32 win32dll} \
500         %{__disable vorbis tremor-internal} --disable-tremor %{__disable vorbis libvorbis} \
501         %{__disable_if system_vorbis tremor-internal} \
502         %{__enable osd menu} \
503         %{__disable theora} \
504         %{__disable x264} \
505         %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
506         %{__disable xvid} \
507         %{__disable vidix} \
508         %{__disable vdpau} \
509         %{__disable mencoder} \
510         --enable-dga1 \
511         --enable-dga2 \
512         %{__enable_disable dvdnav} \
513         --enable-fbdev \
514         --enable-gl \
515         --enable-mga \
516         --enable-radio \
517         --enable-radio-capture \
518         %{__enable_disable sdl} \
519         --enable-tdfxfb \
520         --enable-vm \
521         --enable-x11 \
522         --enable-xmga \
523         --enable-xv \
524         --enable-xvmc \
525         --with-xvmclib=XvMCW \
526         --enable-zr \
527         --enable-unrarexec \
528         --enable-dynamic-plugins \
529         --enable-largefiles \
530         --language=all \
531         --codecsdir=%{_libdir}/codecs \
532         "$@"
533
534         %{__make}
535 }
536
537 %if %{with gui}
538 # build GUI version
539 build --enable-gui --disable-mencoder
540 mv -f mplayer gmplayer
541 %{__make} distclean
542 %endif
543
544 # now build regular version
545 build --disable-gui
546
547 %if %{with doc}
548 %{__make} -j1 -C DOCS/xml
549 %endif
550
551 %install
552 rm -rf $RPM_BUILD_ROOT
553 install -d \
554         $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
555         $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
556         $RPM_BUILD_ROOT%{_datadir}/%{name}/skins \
557         $RPM_BUILD_ROOT%{_desktopdir}
558
559 # default config files
560 install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
561
562 # executables
563 %if %{with mencoder}
564 install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf}
565 ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder
566 %endif
567 install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf}
568 ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer
569 %if %{with gui}
570 install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf}
571 ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
572 %endif
573
574 %if %{with shared}
575 install -d $RPM_BUILD_ROOT%{_libdir}
576 install libmplayer.so $RPM_BUILD_ROOT%{_libdir}
577 %endif
578
579 # fonts
580 cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
581 ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
582
583 %if %{with gui}
584 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
585 %endif
586 touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
587 install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
588 install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
589
590 # man pages
591 install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
592 install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
593 install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
594 install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
595 install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
596 install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
597 install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
598 install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
599 #install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
600 #install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
601
602 %clean
603 rm -rf $RPM_BUILD_ROOT
604
605 %post -n gmplayer
606 umask 022
607 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
608
609 %postun -n gmplayer
610 umask 022
611 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
612
613 %files
614 %defattr(644,root,root,755)
615 %attr(755,root,root) %{_bindir}/mplayer*
616
617 %if %{with gui}
618 %files -n gmplayer
619 %defattr(644,root,root,755)
620 %attr(755,root,root) %{_bindir}/gmplayer*
621 %{_desktopdir}/gmplayer.desktop
622 %endif
623
624 %if %{with mencoder}
625 %files -n mencoder
626 %defattr(644,root,root,755)
627 %doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt
628 %doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt
629 %doc DOCS/tech/colorspaces.txt
630 %attr(755,root,root) %{_bindir}/mencoder*
631 %endif
632
633 %files common
634 %defattr(644,root,root,755)
635 %doc DOCS/tech
636 %{?with_shared:%attr(755,root,root) %{_libdir}/libmplayer.so}
637 %if %{with win32}
638 %doc etc/codecs.win32.conf
639 %endif
640 %if %{with doc}
641 # HTML and XML-generated docs
642 %doc DOCS/HTML/en
643 %lang(cs) %doc DOCS/HTML/cs
644 %lang(de) %doc DOCS/HTML/de
645 %lang(es) %doc DOCS/HTML/es
646 %lang(fr) %doc DOCS/HTML/fr
647 %lang(hu) %doc DOCS/HTML/hu
648 %lang(pl) %doc DOCS/HTML/pl
649 %lang(ru) %doc DOCS/HTML/ru
650 #%lang(zh_CN) %doc DOCS/zh
651 %endif
652 %doc AUTHORS README
653
654 %dir %{_sysconfdir}/%{name}
655 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
656 %{_mandir}/man1/*
657 %lang(cs) %{_mandir}/cs/man1/*
658 %lang(de) %{_mandir}/de/man1/*
659 %lang(es) %{_mandir}/es/man1/*
660 %lang(fr) %{_mandir}/fr/man1/*
661 %lang(hu) %{_mandir}/hu/man1/*
662 %lang(it) %{_mandir}/it/man1/*
663 %lang(pl) %{_mandir}/pl/man1/*
664 #%lang(sv) %{_mandir}/sv/man1/*
665 #%lang(zh_CN) %{_mandir}/zh_CN/man1/*
666 %{_desktopdir}/mplayer.desktop
667 %{_pixmapsdir}/mplayer.png
668 %dir %{_datadir}/%{name}
669 %{_datadir}/%{name}/font*
670 %dir %{_datadir}/%{name}/skins
671 %ghost %{_datadir}/%{name}/skins/default
This page took 0.083236 seconds and 4 git commands to generate.