APKBUILD 1.62 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
3 4
_name=python-openzwave
pkgname=py3-openzwave
5 6
pkgver=0.3.2
pkgrel=0
7 8 9 10
pkgdesc="Python wrapper for openzwave"
url="http://www.openzwave.com/"
arch="all"
license="GPL"
11
depends=" $pkgname-lib $pkgname-api $pkgname-manager"
12 13
makedepends="python3-dev linux-headers eudev-dev coreutils"
install=""
14
subpackages="$pkgname-lib $pkgname-api::noarch $pkgname-manager::noarch"
15 16 17 18 19 20 21 22 23 24 25 26 27 28
source="https://github.com/OpenZWave/python-openzwave/raw/master/archives/${_name}-${pkgver}.tgz"
builddir="$srcdir/python-openzwave-$pkgver"


build() {
	cd "$builddir"
	unset CFLAGS CPPFLAGS
	make build || return 1
	python3 setup-lib.py build || return 1
	python3 setup-api.py build || return 1
	python3 setup-manager.py build || return 1
}

package() {
29 30 31 32 33 34
	mkdir -p "$pkgdir"
}

lib() {
	pkgdesc="$pkgdesc (lib)"
	depends="python3 py3-six"
35 36
	cd "$builddir"
	python3 setup-lib.py install \
37 38 39
		--single-version-externally-managed --root ${subpkgdir}
	mkdir -p "$subpkgdir"/usr/share/"$pkgname"
	mv "$subpkgdir"/usr/config "$subpkgdir"/usr/share/"$pkgname"
40 41
}

42

43 44
api() {
	pkgdesc="$pkgdesc (api)"
45
	depends="python3 py3-dispatcher"
46 47
	cd "$builddir"
	python3 setup-api.py install \
48
		--single-version-externally-managed --root "$subpkgdir"
49 50 51 52
}

manager() {
	pkgdesc="$pkgdesc (manager)"
53
	depends="python3 py3-urwid"
54 55
	cd "$builddir"
	python3 setup-manager.py install \
56
		--single-version-externally-managed --root "$subpkgdir"
57 58
}

59

60
sha512sums="f495c2e41a67f715dbf0e312ee13d59ab6c907403dacb12d48c2becbb433ab458a53f3d634e21373e1aa0141ab71e418ec15ebd29f9d4506261700bcfadcbc79  python-openzwave-0.3.2.tgz"