updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / django-contact-form-hg / PKGBUILD
blob4af67f6f70b31566e3963a5e8d697c57cf234b61
1 # Contributor: Ryan Coyner <rcoyner@gmail.com>
2 # Contributor: RĂ©mi Audebert <quaero.galileo@gmail.com>
4 pkgname=django-contact-form-hg
5 pkgver=61
6 pkgrel=2
7 pkgdesc="An extensible contact-form application for Django"
8 arch=('any')
9 url="http://bitbucket.org/ubernostrum/django-contact-form"
10 license=('BSD')
11 depends=('python')
12 makedepends=('mercurial')
13 provides=('django-contact-form')
14 conflicts=('django-contact-form')
16 _hgroot="http://bitbucket.org/ubernostrum/django-contact-form"
17 _hgrepo="django-contact-form"
19 build() { 
20     cd "$srcdir"
21     msg "Connecting to Mercurial server...."
23     if [ -d $_hgrepo ] ; then
24         cd $_hgrepo
25         hg pull -u || return 1
26         msg "The local files are updated."
27     else
28         hg clone $_hgroot $_hgrepo || return 1
29     fi
31     msg "Mercurial checkout done or server timeout"
33     rm -rf "$srcdir/$_hgrepo-build"
34     cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
35     cd "$srcdir/$_hgrepo-build"
37     msg "Starting setup.py..."
39     python setup.py install --root=$pkgdir/ --optimize=1 || return 1
40     install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE