summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 100497b732b39d82a72ea691febe7639666da10d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $Id$
# Maintainer: Fabien Devaux <fdev31 at gmail dot com>
pkgname=python2-behave-git
pkgver=20111208
pkgrel=1
pkgdesc="BDD, Python style."
arch=('any')
url="http://pypi.python.org/pypi/behave"
license=('MIT')
depends=('python2' 'python2-distribute' 'python2-parse>=1.3.1')
makedepends=('git')
provides=('behave')
conflicts=('python2-behave')

_gitroot="git://github.com/jeamland/behave.git"
_gitname="behave"

build() {
    cd $srcdir

    msg "Connecting to GIT server..."
    if [[ -d ${_gitname} ]]; then
        (cd ${_gitname} && git pull origin)
    else
        git clone --depth=1 ${_gitroot} ${_gitname}
    fi

    msg "GIT checkout done or server timeout"
    msg "Starting make..."

    rm -rf ${_gitname}-build
    cp -r ${_gitname} ${_gitname}-build

    cd ${srcdir}/${_gitname}-build

    rm -fr test
    python2 setup.py build || exit 1
    python2 setup.py install --root="${pkgdir}" --optimize=1

    rm -rf ${_gitname}-build
}