1 # Contributor: Jason <jason52lh # gmail com>
2 pkgname=mplayer-mt-lite
5 pkgdesc="A movie player for linux (Multithreaded, git version just like mplayer-mt-git but no need git clone ffmpeg, use as much external libs as possible, such as ffmpeg)"
8 url="http://www.mplayerhq.hu/"
10 # set 1 to force mplayer not to use alsa-lib.
13 # depnds only you already have, others should contained in ffmpeg's depends.
14 [ "x$_noalsa" == "x0" ] && _alsa=$(pacman -Q alsa-lib 2>/dev/null | awk '{print $1}')
15 _smbclient=$(pacman -Q smbclient 2>/dev/null | awk '{print $1}')
16 _libxvmc=$(pacman -Q libxvmc 2>/dev/null | awk '{print $1}')
17 _faad2=$(pacman -Q faad2 2>/dev/null | awk '{print $1}')
18 _libpulse=$(pacman -Q libpulse 2>/dev/null | awk '{print $1}')
20 depends=('libjpeg' 'libmad' 'libxv' 'libxss' 'ffmpeg-mt-lite' 'libass' 'libdvdread' 'libgl' $_alsa $_smbclient $_libxvmc $_libpulse $_faad2)
21 makedepends=('mesa' 'git' 'yasm' 'live-media>=2010.01.13')
22 backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
26 install=mplayer.install
27 source=('mplayer.desktop' 'mplayer.png')
28 md5sums=(e47466075b85db7bbb432acaa253c75c 0ba60fdc9d7e9e73a844a3134925d66f)
30 _gitroot="git://repo.or.cz/mplayer.git"
34 # Custom CFLAGS break the mplayer build
39 msg "Connecting to GIT server...."
41 if [ -d $_gitname ] ; then
42 cd $_gitname && git pull origin
43 msg "The local files are updated."
45 git clone $_gitroot $_gitname
48 msg "GIT checkout done or server timeout"
49 msg "Starting make..."
53 [ ! -z $_xvmc ] && _options="$_options --enable-xvmc"
54 [ ! -z $_faad2 ] && _options="$_options --enable-faad"
55 [ "x$_noalsa" == "x1" ] && _options="$_options --disable-alsa"
57 ./configure --prefix=/usr --confdir=/etc/mplayer \
58 --disable-runtime-cpudetection --yasm=yasm --language=all \
59 --disable-gui --disable-libdv --disable-gif --disable-mng --disable-speex \
60 --disable-libdca --disable-musepack --disable-dga2 --disable-dga1 \
61 --disable-vesa --disable-svga --disable-sdl --disable-aa --disable-caca --disable-ggi \
62 --disable-ggiwmh --disable-dvb --disable-mga --disable-xmga --enable-xv \
63 --disable-arts --disable-esd --disable-pulse --disable-jack --disable-openal \
64 --enable-dynamic-plugins $_options
66 [ "$CARCH" = "i686" ] && sed 's|-march=i486|-march=i686|g' -i config.mak
72 make -j1 DESTDIR=${pkgdir} install
74 install -d ${pkgdir}/etc/mplayer/
75 install -Dm644 etc/{codecs.conf,input.conf,example.conf} ${pkgdir}/etc/mplayer/
76 install -Dm644 ${srcdir}/mplayer.png ${pkgdir}/usr/share/pixmaps/mplayer.png
77 install -Dm644 ${srcdir}/mplayer.desktop ${pkgdir}/usr/share/applications/mplayer.desktop