updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / python2-google-api-python-client-hg / PKGBUILD
blob65716deb137a5363b2f82faac27b021703a68520
1 # Maintainer: Matthew Bauer <mjbauer95@gmail.com>
2 _realname=google-api-python-client
3 _pkgname=python2-$_realname
4 pkgname=$_pkgname-hg
5 pkgver=302
6 pkgrel=2
7 pkgdesc="Google API Client for Python"
8 url="http://code.google.com/p/$_realname/"
9 arch=('i686' 'x86_64')
10 license=('APACHE')
11 depends=('python2')
12 makedepends=('python2-distribute' 'mercurial')
13 conflicts=("$_pkgname")
15 _hgroot="https://$_realname.googlecode.com/hg"
16 _hgrepo="$_realname"
18 build(){
19   cd "$srcdir"
20   msg "Connecting to Mercurial server...."
22   if [[ -d "$_hgrepo" ]]; then
23     cd "$_hgrepo"
24     hg pull -u
25     msg "The local files are updated."
26   else
27     hg clone "$_hgroot" "$_hgrepo"
28   fi
30   msg "Mercurial checkout done or server timeout"
31   msg "Starting build..."
33   rm -rf "$srcdir/$_hgrepo-build"
34   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
35   cd "$srcdir/$_hgrepo-build"
37   python2 setup.py build
40 package(){
41   cd "$srcdir/$_hgrepo-build"
43   python2 setup.py install --root=$pkgdir --optimize=1