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