updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / mplayer-mt-lite / PKGBUILD
blob8b8eb3663aa5db3caa82ee4f476d78fc99af0b71
1 # Contributor: Jason <jason52lh # gmail com>
2 pkgname=mplayer-mt-lite
3 pkgver=20110226
4 pkgrel=1
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)"
6 arch=('i686' 'x86_64')
7 license=('GPL')
8 url="http://www.mplayerhq.hu/"
10 # set 1 to force mplayer not to use alsa-lib.
11 _noalsa=0
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')
23 provides=("mplayer")
24 conflicts=('mplayer')
25 replaces=()
26 install=mplayer.install
27 source=('mplayer.desktop' 'mplayer.png')
28 md5sums=(e47466075b85db7bbb432acaa253c75c 0ba60fdc9d7e9e73a844a3134925d66f)
30 _gitroot="git://repo.or.cz/mplayer.git"
31 _gitname="mplayer-mt"
33 build() {
34   # Custom CFLAGS break the mplayer build
35   unset CFLAGS
36   unset LDFLAGS
38   cd "$srcdir"
39   msg "Connecting to GIT server...."
41   if [ -d $_gitname ] ; then
42     cd $_gitname && git pull origin
43     msg "The local files are updated."
44   else
45     git clone $_gitroot $_gitname
46   fi
48   msg "GIT checkout done or server timeout"
49   msg "Starting make..."
50   cd $srcdir/$_gitname
51   
52   _options=""
53   [ ! -z $_xvmc ] && _options="$_options --enable-xvmc"
54   [ ! -z $_faad2 ] && _options="$_options --enable-faad"
55   [ "x$_noalsa" == "x1" ] && _options="$_options --disable-alsa"
56   
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
68   make
70 package(){
71   cd $srcdir/$_gitname
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