updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / mpc-git / PKGBUILD
blob2730ad17c0cc4e2b69147a424c4d36a1dd5aecb3
1 # Contributor: Slash <demodevil5[at]yahoo[dot]com>
3 pkgname=mpc-git
4 pkgver=20091202
5 pkgrel=1
6 pkgdesc="A minimalist command line interface to MPD"
7 arch=('i686' 'x86_64')
8 url="http://mpd.wikia.com"
9 license=('GPL2')
10 depends=('libmpdclient-git')
11 makedepends=('git')
12 optdepends=('bash-completion')
13 conflicts=('mpc')
14 provides=('mpc')
15 replaces=('mpc-svn')
16 source=()
17 md5sums=()
19 _gitroot="git://git.musicpd.org/master/mpc.git"
20 _gitname="mpc"
22 build() {
23     cd ${srcdir}
25     msg "Connecting to GIT server..."
27     if [ -d ${srcdir}/$_gitname ] ; then
28         cd $_gitname && git pull origin
29         msg "The local files are updated."
30     else
31         git clone $_gitroot
32     fi
34     msg "GIT checkout done or server timeout"
35     msg "Starting make..."
37     # Copy Latest files to Build Directory
38     rm -rf ${srcdir}/$_gitname-build
39     git clone ${srcdir}/$_gitname ${srcdir}/$_gitname-build
40     cd ${srcdir}/$_gitname-build
42     # Configure Source
43     ./autogen.sh --prefix=/usr
45     # Build Source
46         make || return 1
48     # Install Source
49         make prefix=${pkgdir}/usr install || return 1
51     # Install Bash Completion File
52     install -D -m 644 ${srcdir}/$_gitname/doc/mpc-completion.bash \
53         ${pkgdir}/etc/bash_completion.d/mpc
55