# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=awake
pkgver=1.0
pkgrel=10
pkgdesc="python command and library to 'wake on lan' a remote host"
url="https://github.com/cyraxjoe/awake"
arch="noarch"
license="GPL-3.0"
depends="py3-awake"
makedepends="py3-setuptools"
subpackages="py3-$pkgname-pyc py3-$pkgname:py3 $pkgname-doc"
source="https://files.pythonhosted.org/packages/source/a/awake/awake-$pkgver.tar.gz"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

py3() {
	pkgdesc="Python library for $pkgname"
	depends="python3"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

doc() {
	# Doc files
	_docs="LICENSE README"
	for _doc in $_docs; do
		install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/$_doc
	done
}

sha512sums="3b9a69d39c48ef139b6ea125f6f6de36fc861430b6ccd6341bdc82369947745f879e2776fbfda6e3dfae3c0384ecab3fc35f724a4abe760b21ec91ef27562f4d  awake-1.0.tar.gz"
