]> git.pld-linux.org Git - packages/mplayer.git/blame - mplayer.spec
- rel 15; rebuild with new libx264
[packages/mplayer.git] / mplayer.spec
CommitLineData
5e37db9a 1# TODO:
8a72e936 2# - nut support (http://www.nut.hu/ - currently down, but see svn.mplayerhq.hu/nut/)
b8145877 3# - update for lzo 2
841cb995 4# - try to use external lrmi and few other libs:
4d75c49f 5# http://www.cyberlink.com/english/products/powercinema/pcm-linux/license/mplayer-10_copyright.htm
bef18474
ER
6# - segfaults on amd64:
7# mencoder -oac pcm -af dummy -ovc raw -vf format=yv12 -of ogg -mc 0 -quiet -o /tmp/out1 l.avi
8# avi: RIFF (little-endian) data, AVI, 480 x 360, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
5e37db9a 9#
94cb018b 10# Conditional build:
8cc223f8 11%bcond_with directfb # with DirectFB video output
8cc223f8
JB
12%bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder
13%bcond_with ggi # with ggi video output
8cc223f8
JB
14%bcond_with nas # with NAS audio output
15%bcond_with svga # with svgalib video output
01a889a4 16%bcond_without osd # with osd menu support
93ab9715 17%bcond_without altivec # without altivec support
d6014b54 18%bcond_without x264 # without x264 support
2af58a38 19%bcond_with xmms # with XMMS inputplugin support
8cc223f8 20%bcond_without aalib # without aalib video output
e5b91f83 21%bcond_without jack # without JACKD support
8cc223f8
JB
22%bcond_without alsa # without ALSA audio output
23%bcond_without arts # without arts audio output
dd153a0d 24%bcond_without caca # without libcaca video output
3c3fdfcc 25%bcond_without cdparanoia # without cdparanoia support
3c3fdfcc
JB
26%bcond_without enca # disable using ENCA charset oracle library
27%bcond_without esd # disable EsounD sound support
28%bcond_without faad # disable FAAD2 (AAC) support
29%bcond_without gif # disable GIF support
8d7378f8 30%bcond_without gui # without GTK+ GUI
8cc223f8 31%bcond_without joystick # disable joystick support
3c3fdfcc 32%bcond_without libdts # disable libdts support
a4298e0c 33%bcond_without libdv # disable libdv en/decoding support
8cc223f8 34%bcond_without lirc # without lirc support
841cb995
ER
35%bcond_with live # without LIVE555 libraries
36%bcond_without lzo # with LZO support (requires lzo 2.x)
8cc223f8 37%bcond_without mad # without mad (audio MPEG) support
7d814b48 38%bcond_without pulseaudio # without pulseaudio output
8cc223f8
JB
39%bcond_without quicktime # without binary quicktime dll support
40%bcond_without real # without Real* 8/9 codecs support
41%bcond_without runtime # disable runtime cpu detection, just detect CPU
11421384
ER
42 # in compile time (advertised by mplayer authors as working faster); in this case
43 # mplayer may not work on machine other then where it was compiled
44%bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver)
a4298e0c 45%bcond_without smb # disable Samba (SMB) input support
de0c2d91 46%bcond_without theora # without theora support
8cc223f8 47%bcond_without win32 # without win32 codecs support
1087e996 48%bcond_without vidix # disable vidix
3b930ad6 49%bcond_without vorbis # without Ogg-Vorbis audio support
3c3fdfcc 50%bcond_without xvid # disable XviD codec
2af58a38 51%bcond_without mencoder # disable mencoder (a/v encoder) compilation
906bf13b 52%bcond_without sdl # disable SDL
aab7d90d 53%bcond_without doc # don't build docs (slow)
59a38ff4 54%bcond_with shared # experimental libmplayer.so support
439df4dd 55%bcond_with amr # enable 3GPP Adaptive Multi Rate (AMR) speech codec support
0256d486 56%bcond_without gnomess # disable controling gnome screensaver
7d814b48 57%bcond_with ssse3 # sse3 optimizations (needs binutils >= 2.16.92)
1f8d8779 58%bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (needs more work or mplayer snapshot)
2dfabf36 59
94cb018b
JB
60%ifnarch %{ix86}
61%undefine with_win32
7a82c266 62%undefine with_quicktime
1087e996 63%undefine with_vidix
94cb018b
JB
64%endif
65
38c74592 66%ifnarch %{ix86} %{x8664} ppc ppc64
906bf13b
JB
67%undefine with_runtime
68%endif
1a8df7bd 69
70%if %{_lib} == "lib64"
422903c7 71%define _suf 64
1a8df7bd 72%else
422903c7 73%define _suf 32
1a8df7bd 74%endif
75
879e9f7b 76%define subver rc2
3e33b534 77%define rel 15
135255b8 78
906bf13b 79Summary: MPlayer - THE Movie Player for UN*X
eeb91a66
ER
80Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
81Summary(es.UTF-8): Otro reproductor de películas
82Summary(ko.UTF-8): 리눅스용 미디어플레이어
83Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych
84Summary(pt_BR.UTF-8): Reprodutor de filmes
2adea73e 85Name: mplayer
9cb1ef87 86Version: 1.0
879e9f7b 87Release: 5.%{subver}.%{rel}
1f85fd72
ER
88# DO NOT increase epoch unless it's really neccessary!
89# especially such changes like pre7->pre7try2, increase Release instead!
90# PS: $ rpmvercmp pre7try2 pre7
91# pre7try2 > pre7
59476b48 92Epoch: 3
bc426a7f 93License: GPL
906bf13b 94Group: Applications/Multimedia
879e9f7b 95Source0: ftp://ftp2.mplayerhq.hu/MPlayer/releases/MPlayer-%{version}%{subver}.tar.bz2
841cb995 96# Source0-md5: 7e27e535c2d267637df34898f1b91707
031c3c7c 97Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
0a38bda8 98# Source3-md5: 7b47904a925cf58ea546ca15f3df160c
e601cd91 99Source5: g%{name}.desktop
623ea2d1 100Source6: ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
0a38bda8 101# Source6-md5: 1ecd31d17b51f16332b1fcc7da36b312
11b89ef7 102Source7: %{name}.png
24481cd2 103Source8: %{name}.desktop
dfd680ce 104# http://www.on2.com/gpl/mplayer/
841cb995
ER
105Source9: http://www.on2.com/gpl/mplayer/2007-10-09-mencoder-on2flixenglinux.tar.bz2
106# Source9-md5: 2361e56b40f52dfc20131e458e2aed38
aee40e50 107Patch1: %{name}-cp1250-fontdesc.patch
e63fb437
ER
108#Patch2: %{name}-codec.patch
109#Patch3: %{name}-home_etc.patch
aee40e50 110Patch4: %{name}-350.patch
111Patch5: %{name}-configure.patch
f10ca1d7
PG
112# outdated via ffmpeg?
113Patch6: %{name}-system-amr.patch
8cc223f8 114Patch8: %{name}-altivec.patch
e63fb437
ER
115#Patch10: %{name}-pcmsplit.patch
116#Patch13: %{name}-mythtv.patch
11421384 117Patch14: %{name}-shared.patch
30e3739f 118#http://www.openchrome.org/snapshots/mplayer/
e63fb437 119#Patch15: %{name}-xvmc.patch
c7699e1b 120Patch17: %{name}-auto-expand.patch
f10ca1d7 121# update
e63fb437 122#Patch18: %{name}-gnome-screensaver.patch
dfd680ce 123Patch19: %{name}-on2flix.patch
841cb995
ER
124Patch22: %{name}-ffmpeg.patch
125Patch23: %{name}-live.patch
2b6e0df5 126Patch24: %{name}-fontconfig_sub.patch
879e9f7b 127Patch25: http://www.mplayerhq.hu/MPlayer/patches/stream_cddb_fix_20080120.diff
38c74592 128Patch26: %{name}-check-byteswap.patch
f10ca1d7 129Patch27: http://www.mplayerhq.hu/MPlayer/patches/demux_mov_fix_20080129.diff
a2070445 130Patch28: http://www.ocert.org/patches/2008-013/mplayer_demux_real.patch
3e33b534 131Patch29: %{name}-x264.patch
c5b97685 132URL: http://www.mplayerhq.hu/
33c4efab 133%{?with_directfb:BuildRequires: DirectFB-devel}
aeb67db6 134BuildRequires: OpenAL-devel
b458005d 135BuildRequires: OpenGL-devel
11421384 136%{?with_sdl:BuildRequires: SDL-devel >= 1.1.7}
dd6c659c
JB
137%{?with_aalib:BuildRequires: aalib-devel}
138%{?with_alsa:BuildRequires: alsa-lib-devel}
e4268e0b
JB
139%if %{with amr}
140BuildRequires: amrnb-devel
4d75c49f 141BuildRequires: amrwb-devel >= 5.3.0
e4268e0b 142%endif
dd6c659c 143%{?with_arts:BuildRequires: artsc-devel}
841cb995 144%{?with_ssse3:BuildRequires: binutils >= 3:2.16.92}
3c3fdfcc 145%{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
aab7d90d 146%{?with_doc:BuildRequires: docbook-style-xsl}
dd6c659c 147%{?with_dxr3:BuildRequires: em8300-devel}
3c3fdfcc
JB
148%{?with_enca:BuildRequires: enca-devel}
149%{?with_esd:BuildRequires: esound-devel}
30e3739f 150BuildRequires: faac-devel
3c3fdfcc 151%{?with_faad:BuildRequires: faad2-devel >= 2.0}
1f8d8779 152%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-3.20070626.1.1}
d23c171d 153BuildRequires: freetype-devel
30e3739f 154BuildRequires: fribidi-devel
1087e996 155%{?with_vidix:BuildRequires: vidix-devel}
8cc223f8
JB
156%ifarch ppc
157%{?with_altivec:BuildRequires: gcc >= 5:3.3.2-3}
158%endif
3c3fdfcc 159%{?with_gif:BuildRequires: giflib-devel}
dd6c659c 160%if %{with gui}
aeb67db6 161BuildRequires: gtk+2-devel
dd6c659c 162%endif
1087e996 163%{?with_gnomess:BuildRequires: dbus-glib-devel}
d336e259 164%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
422903c7 165%{?with_jack:%requires_eq jack-audio-connection-kit-libs}
a8a0c1d1 166BuildRequires: lame-libs-devel
dd6c659c 167%{?with_caca:BuildRequires: libcaca-devel}
49aed190 168%{?with_libdts:BuildRequires: libdts-devel}
a4298e0c 169%{?with_libdv:BuildRequires: libdv-devel}
4d75c49f 170BuildRequires: libdvdnav-devel
dd6c659c 171%{?with_ggi:BuildRequires: libggi-devel}
af480c75 172BuildRequires: libjpeg-devel
dd6c659c 173%{?with_mad:BuildRequires: libmad-devel}
30e3739f 174BuildRequires: libmpcdec-devel >= 1.2.1
af480c75 175BuildRequires: libpng-devel
a4298e0c 176%{?with_smb:BuildRequires: libsmbclient-devel}
de0c2d91 177%{?with_theora:BuildRequires: libtheora-devel}
1130ecb8 178# tremor is used by default, internal as we don't have system one
281ac7d0 179#%{?with_vorbis:BuildRequires: libvorbis-devel}
3e33b534 180%{?with_x264:BuildRequires: libx264-devel >= 0.1.2-1.20081023_2245.1}
ceb01d0e 181BuildRequires: libxslt-progs
dd6c659c
JB
182%{?with_lirc:BuildRequires: lirc-devel}
183%{?with_live:BuildRequires: live}
841cb995 184%{?with_lzo:BuildRequires: lzo-devel >= 2.0}
dd6c659c 185%{?with_nas:BuildRequires: nas-devel}
b458005d 186BuildRequires: ncurses-devel
e9d22b19 187BuildRequires: pkgconfig
86bc294f 188%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9}
aeb67db6 189BuildRequires: speex-devel >= 1.1
dd6c659c
JB
190%{?with_svga:BuildRequires: svgalib-devel}
191%{?with_xmms:BuildRequires: xmms-libs}
627a7a97
ER
192BuildRequires: xorg-lib-libX11-devel
193BuildRequires: xorg-lib-libXext-devel
194BuildRequires: xorg-lib-libXinerama-devel
195BuildRequires: xorg-lib-libXv-devel
196BuildRequires: xorg-lib-libXvMC-devel
197BuildRequires: xorg-lib-libXxf86dga-devel
198BuildRequires: xorg-lib-libXxf86vm-devel
3c3fdfcc 199%{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0}
c2eb8d00 200BuildRequires: zlib-devel
4d75c49f 201Requires: %{name}-common = %{epoch}:%{version}-%{release}
b458005d 202Requires: OpenGL
0f2a502d 203BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
2adea73e 204
a8e3a9a7 205%define _noautoreqdep libGL.so.1 libGLU.so.1
bb27cfbd 206%define specflags_ia32 -fomit-frame-pointer
198487b4 207%if %{with altivec}
adfd0023 208%define specflags_ppc -maltivec
20a66bdb 209%endif
2adea73e
AM
210
211%description
c902f7c6 212Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
213AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
6db4b1ea 214MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
215MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
c902f7c6 216devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
217optionally with SHM extension, X11 using overlays with the Xvideo
218extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
219Voodoo2/3 hardware, SDL v1.1.7 driver etc.
2adea73e 220
8b146837 221If you want to use win32 codecs install w32codec package.
4228a246 222
e011d408 223%description -l de.UTF-8
deba608c 224MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player.
225Kennzeichnend ist die herausragende Format- und
e011d408 226Plattform-Kompatibilität.
deba608c 227
e011d408
JR
228Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch
229plattformexklusive, wodurch etwa Windows Media auch außerhalb von
230Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB.
231Eine besondere Fehlertoleranz ermöglicht es dem mehrfach
deba608c 232ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere
e011d408
JR
233Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits
234installierte Codecs nicht mit MPlayer kollidieren können.
deba608c 235
e011d408 236%description -l es.UTF-8
c902f7c6 237Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
238MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
239(uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
240de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
241Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
e011d408
JR
242G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
243overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
c902f7c6 244G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
245v1.1.7 etc.
33c4efab 246
8b146837 247Si quiere usar codecs Win32, instale el paquete w32codec.
33c4efab 248
e011d408
JR
249%description -l ko.UTF-8
250MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf
251파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다.
252MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11,
253Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나
254(Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할
255수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인
256크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수
257있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의
258부드러운(antialiased) 자막폰트도 사용할 수 있습니다.
af480c75 259
e011d408
JR
260%description -l pl.UTF-8
261Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2,
c902f7c6 262RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
263(nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
264Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
e011d408 265Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z
c902f7c6 266rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
e011d408 267G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp.
2adea73e 268
e011d408 269Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec.
4228a246 270
e011d408
JR
271%description -l pt_BR.UTF-8
272MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
273áudio. Diferentes mecanismos de reprodução podem também ser
2abc285c 274escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
275
11421384
ER
276%package -n gmplayer
277Summary: MPlayer with GTK+ GUI interface
eeb91a66 278Summary(pl.UTF-8): MPlayer z graficznym interfejsem GTK+
11421384 279Group: X11/Applications/Multimedia
11421384 280Requires: %{name}-common = %{epoch}:%{version}-%{release}
deba608c 281Requires: %{name}-skin
11421384
ER
282
283%description -n gmplayer
284MPlayer with GUI GTK+ interface.
285
e011d408 286%description -n gmplayer -l pl.UTF-8
906bf13b
JB
287MPlayer z graficznym interfejsem GTK+.
288
11421384 289%package common
906bf13b 290Summary: Configuration files and documentation for MPlayer
eeb91a66 291Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera
11421384 292Group: Applications/Multimedia
1087e996 293Obsoletes: mplayer-vidix
11421384
ER
294
295%description common
906bf13b
JB
296Configuration files, man page and HTML documentation for MPlayer.
297
e011d408 298%description common -l pl.UTF-8
906bf13b 299Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera.
11421384
ER
300
301%package -n mencoder
906bf13b 302Summary: MEncoder - a movie encoder for Linux
eeb91a66 303Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa
11421384
ER
304Group: Applications/Multimedia
305Requires: %{name}-common = %{epoch}:%{version}-%{release}
306
307%description -n mencoder
906bf13b
JB
308MEncoder is a movie encoder for Linux and is a part of the MPlayer
309package.
310
e011d408
JR
311%description -n mencoder -l pl.UTF-8
312MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer.
11421384 313
2adea73e 314%prep
879e9f7b 315%setup -q -n MPlayer-%{version}%{subver} -a3 -a6 -a9
833dbe20 316cp -f etc/codecs.conf etc/codecs.win32.conf
aee40e50 317%patch1 -p0
d1732085
ER
318#%%patch2 -p1 -- still needed?
319##%%patch3 -p1 -- old home_etc behavior
aee40e50 320%patch4 -p1
dd6c659c 321%patch5 -p1
d1732085 322#%%patch6 -p1 # - try ffmpeg
2dfabf36 323%patch8 -p1
2b8c25a3 324#%%patch10 -p1
d1732085 325#%%patch13 -p1 # TODO
11421384
ER
326%if %{with shared}
327%patch14 -p1
328%endif
d1732085 329#%%patch15 -p0 # TODO
c7699e1b 330%patch17 -p1
0256d486 331%if %{with gnomess}
d1732085 332#%%patch18 -p1
0992d783 333%endif
59ba0205 334
dfd680ce
ER
335# on2flix
336cp -a mencoder-on2flixenglinux/new_files/libmpdemux/* libmpdemux
841cb995 337rm -f mencoder-on2flixenglinux/version.diff
dfd680ce
ER
338%patch19 -p1
339for a in mencoder-on2flixenglinux/*.diff; do
340 patch -p0 < $a
341done
342
1f8d8779 343%{?with_system_ffmpeg:%patch22 -p1}
841cb995 344%patch23 -p1
2b6e0df5 345%patch24 -p0
879e9f7b 346%patch25 -p0
38c74592 347%patch26 -p1
f10ca1d7 348%patch27 -p0
a2070445 349%patch28 -p0
3e33b534 350%patch29 -p1
7c31e935 351
52641151
PS
352# recent dvdnav-config doesn't support --minilibs.
353sed -i 's:--minilibs:--libs:g' configure
354
d1732085
ER
355sed -e '/Delete this default/d' etc/example.conf > etc/mplayer.conf
356rm -f font-*/runme
357
1f8d8779
ER
358%if %{with system_ffmpeg}
359# using external ffmpeg, but mplayer adds these to includepath
360rm -rf libavcodec libavdevice libavformat libavutil libpostproc libswscale
361%endif
362
2adea73e 363%build
68dd28e8 364%if %{with shared}
11421384 365CFLAGS="%{rpmcflags} -fPIC"
68dd28e8
ER
366%else
367CFLAGS="%{rpmcflags}"
68dd28e8 368%endif
4ed9dec4 369CC="%{__cc}"
ce8a4f6d
JB
370LDFLAGS="%{rpmldflags}"
371export CC CFLAGS LDFLAGS
11421384
ER
372
373build() {
374set -x
375 ./configure \
376 %{?debug:--enable-debug=3} \
dd6c659c
JB
377 --prefix=%{_prefix} \
378 --confdir=%{_sysconfdir}/mplayer \
dd6c659c 379 --with-extraincdir=%{_includedir}/xvid \
d1732085 380 --with-extralibdir=%{?_x_libraries}%{!?_x_libraries:%{_libdir}} \
1f8d8779 381%if %{with system_ffmpeg}
841cb995
ER
382 --disable-libavutil_a \
383 --disable-libavcodec_a \
384 --disable-libavformat_a \
385 --disable-libpostproc_a \
386 --enable-libavutil_so \
387 --enable-libavcodec_so \
388 --enable-libavformat_so \
389 --enable-libpostproc_so \
1f8d8779 390%endif
57f87bc2 391%ifnarch %{ix86} %{x8664}
dd6c659c 392 --disable-mmx \
a14f4270 393 --disable-mmxext \
dd6c659c 394 --disable-3dnow \
a14f4270 395 --disable-3dnowext \
dd6c659c
JB
396 --disable-sse \
397 --disable-sse2 \
398 --disable-fastmemcpy \
dfeec30a 399%endif
841cb995 400 %{!?with_ssse3:--disable-ssse3} \
1837afdf 401%ifarch ppc
d1732085 402 %{!?with_altivec:--disable-altivec} \
1837afdf 403%endif
d1732085
ER
404 %{!?with_amr:--disable-libamr_nb --disable-libamr_wb} \
405 %{?with_amr:--enable-libamr_nb --enable-libamr_wb} \
406 %{?with_directfb:--enable-directfb} \
407 %{!?with_directfb:--disable-directfb} \
408 %{!?with_dxr3:--disable-dxr3} \
409 %{!?with_ggi:--disable-ggi} \
410 %{?with_live:--enable-live --with-extraincdir=/usr/include/liveMedia} \
411 %{!?with_live:--disable-live} \
412 %{!?with_lzo:--disable-liblzo} \
413 %{!?with_nas:--disable-nas} \
414 %{!?with_svga:--disable-svga} \
415 %{!?with_aalib:--disable-aa} \
416 %{!?with_jack:--disable-jack} \
417 %{!?with_alsa:--disable-alsa} \
418 %{?with_alsa:--enable-alsa --disable-select} \
419 %{!?with_arts:--disable-arts} \
420 %{!?with_caca:--disable-caca} \
421 %{!?with_cdparanoia:--disable-cdparanoia} \
d1732085
ER
422 %{!?with_enca:--disable-enca} \
423 %{!?with_esd:--disable-esd} \
424 %{!?with_faad:--disable-faad-external --disable-faad-internal} \
425 %{?with_faad:--disable-faad-internal} \
426 %{!?with_gif:--disable-gif} \
427 %{?with_joystick:--enable-joystick} \
428 %{!?with_libdv:--disable-libdv} \
429 %{!?with_libdts:--disable-libdts} \
430 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
431 %{!?with_mad:--disable-mad} \
7d814b48 432 %{!?with_pulseaudio:--disable-polyp} \
d1732085
ER
433 %{!?with_quicktime:--disable-qtx} \
434 %{!?with_real:--disable-real} \
435 --%{?with_runtime:en}%{!?with_runtime:dis}able-runtime-cpudetection \
436 %{!?with_select:--disable-select} \
437 %{!?with_smb:--disable-smb} \
438 %{!?with_win32:--disable-win32dll} \
439 %{!?with_vorbis:--disable-vorbis} \
440 %{?with_osd:--enable-menu} \
441 %{!?with_theora:--disable-theora} \
442 %{!?with_x264:--disable-x264} \
443 %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
444 %{!?with_xvid:--disable-xvid} \
445 %{!?with_vidix:--disable-vidix-external --disable-vidix-internal} \
446 %{?with_vidix:--disable-vidix-internal} \
447 %{!?with_mencoder:--disable-mencoder} \
841cb995
ER
448 --enable-dga1 \
449 --enable-dga2 \
52641151 450 --enable-dvdnav \
dd6c659c
JB
451 --enable-fbdev \
452 --enable-gl \
453 --enable-mga \
e7261209
KK
454 --enable-radio \
455 --enable-radio-capture \
11421384 456 --%{?with_sdl:en}%{!?with_sdl:dis}able-sdl \
dd6c659c
JB
457 --enable-tdfxfb \
458 --enable-vm \
459 --enable-x11 \
460 --enable-xmga \
461 --enable-xv \
462 --enable-xvmc \
3c3fdfcc 463 --enable-dynamic-plugins \
dd6c659c
JB
464 --enable-largefiles \
465 --language=all \
841cb995 466 --codecsdir=%{_libdir}/codecs \
3c3fdfcc 467 --with-xvmclib=XvMCW \
11421384 468 "$@"
eb52750a 469
11421384
ER
470 %{__make}
471}
2adea73e 472
11421384
ER
473%if %{with gui}
474# build GUI version
841cb995 475build --enable-gui --disable-mencoder
11421384 476mv -f mplayer gmplayer
aeb67db6 477%{__make} distclean
11421384
ER
478%endif
479
480# now build regular version
481build --disable-gui
482
aab7d90d 483%if %{with doc}
6eeeb8b4 484%{__make} -j1 -C DOCS/xml
11421384 485%endif
ceb01d0e 486
2adea73e
AM
487%install
488rm -rf $RPM_BUILD_ROOT
e0e4b963 489install -d \
d23c171d 490 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
59ba0205 491 $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
dd20ae16 492 $RPM_BUILD_ROOT%{_datadir}/mplayer/skins \
59ba0205 493 $RPM_BUILD_ROOT%{_desktopdir}
2adea73e 494
e0e4b963 495# default config files
c455a752 496install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
e0e4b963 497
498# executables
2af58a38 499%if %{with mencoder}
1a8df7bd 500install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf}
501ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder
2af58a38 502%endif
1a8df7bd 503install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf}
504ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer
11421384 505%if %{with gui}
1a8df7bd 506install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf}
507ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
11421384 508%endif
e0e4b963 509
510# fonts
9d62f689 511cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
6e933f9c 512ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
e0e4b963 513
11421384 514%if %{with gui}
d1732085 515touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
f0d8c47e 516install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
68dd28e8 517%endif
24481cd2 518install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
11b89ef7 519install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
e0e4b963 520
521# man pages
59ba0205 522install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
aee40e50 523install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
524install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
525install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
526install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
527install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
8cda16b8 528install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
aee40e50 529install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
841cb995 530#install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
e66a8169 531install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
6db4b1ea 532
2adea73e
AM
533%clean
534rm -rf $RPM_BUILD_ROOT
535
a69eaaef 536%post -n gmplayer
cd748ae6 537umask 022
cd748ae6 538[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
539
a69eaaef 540%postun -n gmplayer
cd748ae6 541umask 022
75b3147a 542[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
2ea7d522 543
2adea73e
AM
544%files
545%defattr(644,root,root,755)
1a8df7bd 546%attr(755,root,root) %{_bindir}/mplayer*
11421384
ER
547
548%if %{with gui}
549%files -n gmplayer
550%defattr(644,root,root,755)
1a8df7bd 551%attr(755,root,root) %{_bindir}/gmplayer*
11421384 552%{_desktopdir}/gmplayer.desktop
dd20ae16 553%dir %{_datadir}/%{name}/skins
d1732085 554%ghost %{_datadir}/%{name}/skins/default
11421384
ER
555%endif
556
0fb5a7ee 557%if %{with mencoder}
11421384
ER
558%files -n mencoder
559%defattr(644,root,root,755)
aeb67db6 560%doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt
561%doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt
562%doc DOCS/tech/colorspaces.txt
1a8df7bd 563%attr(755,root,root) %{_bindir}/mencoder*
0fb5a7ee 564%endif
11421384
ER
565
566%files common
567%defattr(644,root,root,755)
11421384
ER
568%doc DOCS/tech
569%if %{with win32}
35ac5af9 570%doc etc/codecs.win32.conf
11421384 571%endif
841cb995
ER
572%if %{with doc}
573# HTML and XML-generated docs
574%doc DOCS/HTML/en
0ffd4cd0 575%lang(cs) %doc DOCS/HTML/cs
aeb67db6 576%lang(de) %doc DOCS/HTML/de
aee40e50 577%lang(es) %doc DOCS/HTML/es
578%lang(fr) %doc DOCS/HTML/fr
8cda16b8 579%lang(hu) %doc DOCS/HTML/hu
aee40e50 580%lang(pl) %doc DOCS/HTML/pl
581%lang(ru) %doc DOCS/HTML/ru
841cb995
ER
582#%lang(zh_CN) %doc DOCS/zh
583%endif
584%doc AUTHORS README
11421384 585
906bf13b
JB
586%dir %{_sysconfdir}/%{name}
587%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
2adea73e 588%{_mandir}/man1/*
59ba0205 589%lang(cs) %{_mandir}/cs/man1/*
20e1052d 590%lang(de) %{_mandir}/de/man1/*
aee40e50 591%lang(es) %{_mandir}/es/man1/*
2a9a2b75 592%lang(fr) %{_mandir}/fr/man1/*
daef2f4a 593%lang(hu) %{_mandir}/hu/man1/*
8cda16b8 594%lang(it) %{_mandir}/it/man1/*
2a6ed516 595%lang(pl) %{_mandir}/pl/man1/*
841cb995 596#%lang(sv) %{_mandir}/sv/man1/*
90413e82 597%lang(zh_CN) %{_mandir}/zh_CN/man1/*
24481cd2 598%{_desktopdir}/mplayer.desktop
1087e996 599%{_pixmapsdir}/mplayer.png
11421384
ER
600%dir %{_datadir}/%{name}
601%{_datadir}/%{name}/font*
This page took 0.238781 seconds and 4 git commands to generate.