# Maintainer: Thomas Liske <thomas@fiasko-nw.net>
pkgname=rosh
pkgver=0.1.8
pkgrel=1
pkgdesc="diagnostic shell for Linux-based routers"
url="https://codeberg.org/liske/rosh"
arch="noarch"
license="GPL-3.0-or-later"
depends="iproute2
	python3
	py3-cachetools
	py3-prettytable3
	py3-prompt_toolkit
	py3-pyroute2
	py3-fuzzyfinder
	py3-setproctitle"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
options="!check" # no tests available
source="https://files.pythonhosted.org/packages/source/r/rosh/rosh-$pkgver.tar.gz
	rosh.conf
"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
	install -Dm644 "$srcdir"/rosh.conf "$pkgdir"/etc/rosh.conf
}

sha512sums="
df3df3e07d4ce3e54696b8a72e708e60aa8a10c2d77567ae8fb9ab49d12f645df70af522a47228300a91395f6a00d67f1ff75345e15aee412fb014e474c863d7  rosh-0.1.8.tar.gz
f24f77bce5adf218b54e74f5d9c5ed88042327fdc2bc68f66a9b336ede024bbb7c0526215de6ca310f169acf5f1934d7790f5f93eadb1b599f2a582a58ee1b33  rosh.conf
"
