summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3cf0827a555184143f8f42dcf1aa4966627b542a (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
# Maintainer: Mark Vainomaa <mikroskeem@mikroskeem.eu>
pkgname=python-etcd-git
pkgver=r263.f9edc6f
pkgrel=1
pkgdesc="A python client for Etcd"
arch=("any")
url="https://github.com/jplana/python-etcd"
license=('MIT')
depends=("python" "python-dnspython3" "python-urllib3")
makedepends=("python-setuptools")
provides=("python-etcd")
conflicts=("python-etcd")
replaces=("python-etcd")
source=("python-etcd-git::git+https://github.com/jplana/python-etcd.git")
md5sums=('SKIP')

pkgver() {
    cd "$pkgname"
    ( set -o pipefail
        git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

build() {
    cd "$pkgname"
    python setup.py build
}

package() {
    cd "$pkgname"
    python setup.py install --root="${pkgdir}/" --optimize=1
    install -d -m 755 ${pkgdir}/usr/share/licenses/${pkgname}
    install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim: ft=sh