summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 675fe463bee93d84e36e50635d079c869340a45e (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
# Maintainer: Omar Pakker <archlinux@opakker.nl>

_pkgname=transip-api
pkgname=python-${_pkgname}-git
pkgver=v2.0.0.r1.g20e58b9
pkgrel=1
pkgdesc="Python implementation of TransIP's API (unofficial)"
arch=('any')
url="https://github.com/benkonrath/transip-api"
license=('MIT')
makedepends=('git' 'python-setuptools' 'python-sphinx')
depends=('python-cryptography' 'python-requests' 'python-suds')
provides=("python-${_pkgname}")
conflicts=("python-${_pkgname}")
source=("git+https://github.com/benkonrath/transip-api.git")
sha512sums=('SKIP')

pkgver() {
	cd "${_pkgname}"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "${_pkgname}"
	python3 setup.py build
	PYTHONPATH="..:${PYTHONPATH}" make -C docs man text
}

check() {
	cd "${_pkgname}"
	python3 setup.py test
}

package() {
	cd "${_pkgname}"
	python3 setup.py install --root="${pkgdir}" --optimize=1

	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	install -Dm644 docs/_build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
	install -Dm644 "docs/_build/man/${_pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
}