aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-libvirt/APKBUILD
blob: 419723165d7a50b275f49f2e36cf55bba056cd52 (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
43
44
45
46
47
48
49
50
51
52
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-libvirt
_pkgname=libvirt-python
pkgver=3.5.0
pkgrel=0
pkgdesc="The libvirt virtualization API python binding"
url="http://libvirt.org"
arch="all"
license="LGPLv2+"
makedepends="python2-dev python3-dev libvirt-dev"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="http://libvirt.org/sources/python/$_pkgname-$pkgver.tar.gz
	musl-gnuc-prereq.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

check() {
	cd "$builddir"
	python2 setup.py check
	python3 setup.py check
}

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

package() {
	mkdir -p "$pkgdir"
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

sha512sums="31e0bf7604fe3e422fbad2acdfae1a50050bb4b45ed1e9596040e1c08607a772d62d88c1636c1c18de082d913fb549481aeb5e48f76276cb6ac6534a71f8f7b6  libvirt-python-3.5.0.tar.gz
8aa1d814f8388ebff0736ee138c780323381cd4cf39b4a4faed2e2a1fe5911facc34505a85b0977d8b4240b8ce2f4a6d0414790693c4f45ff7d9592e9d6a3ff8  musl-gnuc-prereq.patch"