updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / django-keyedcache-hg / PKGBUILD
blob999270e00c83af2c8a43b8f5a3c8e43e8329f6c1
1 # Contributor: Andrew Grigorev <andrew@ei-grad.ru>
3 pkgname=django-keyedcache-hg
4 pkgver=11
5 pkgrel=1
6 pkgdesc="Speedy way to manage caching in Django apps."
7 arch=(any)
8 url="http://bitbucket.org/bkroeze/django-keyedcache"
9 license=('BSD')
10 depends=('django')
11 source=()
12 md5sums=()
14 _hgroot='http://bitbucket.org/bkroeze'
15 _hgrepo='django-keyedcache'
17 build() { 
18     cd $srcdir
20     if [ -d $_hgrepo/.hg ]; then
21         (cd $_hgrepo && hg up -r $pkgver)
22     else
23         hg clone -r $pkgver $_hgroot/$_hgrepo $_hgrepo
24     fi
26     msg 'Mercurial checkout done or server timeout'
28     if [ -d $_hgrepo-build ]; then
29         msg 'Removing old build directory'
30         rm -rf $_hgrepo-build
31     fi
32     
33     msg 'Copying repository to another build directory'
34     cp -r $srcdir/$_hgrepo $srcdir/$_hgrepo-build
35     
36     msg 'Starting build'
37     cd $srcdir/$_hgrepo-build
39     msg 'Running setup.py'
40     
41     python2 setup.py build || return 1
42     python2 setup.py install --root=$pkgdir --optimize=1 || return 1
43     rm -rf $pkgdir/usr/lib/python2.7/site-packages/tests