updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / python-redis-git / PKGBUILD
blob20f4aba62c1de7843d2c6652e5e0c828f510bd8b
1 # Contributor: Felipe Morales <hel.sheep@gmail.com>
2 # Based on the packaging of Frank Smit <frank@61924.nl> (redis-py-git on AUR)
3 pkgname=python-redis-git
4 pkgver=20110309
5 pkgrel=1
6 pkgdesc='Redis Python Client'
7 arch=(any)
8 url='http://github.com/algebraic-brain/redis-py'
9 license=('MIT')
10 depends=('python' 'redis')
11 makedepends=('git' 'setuptools')
12 source=('LICENSE')
13 md5sums=('f6df3f49a749da1f9e12816eda900b61')
15 _gitroot='git://github.com/algebraic-brain/redis-py.git'
16 _gitname='python-redis'
18 build() {
19     cd "$srcdir"
20     msg "Connecting to GIT server...."
22     if [ -d $_gitname ] ; then
23         cd $_gitname && git pull origin
24         msg "The local files are updated."
25     else
26                 # if we don't clone into python-redis instead of redis-py (as in redis-py-git), 
27                 # files in the python2 version and the python3 version might mix, I think
28         git clone $_gitroot $_gitname
29     fi
31     msg "GIT checkout done or server timeout"
32     msg "Starting make..."
34     rm -rf "$srcdir/$_gitname-build"
35     git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36     cd "$srcdir/$_gitname-build"
38     python setup.py install --root="$pkgdir" --prefix=/usr || return 1
39     install -D -m644 $startdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE