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