# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-nkdfu
pkgver=0.2
pkgrel=1
pkgdesc="DFU tool for updating Nitrokeys' firmware"
url="https://github.com/Nitrokey/nkdfu"
arch="noarch"
license="GPL-2.0-only"
depends="
	py3-fire
	py3-intelhex
	py3-usb
	py3-tqdm
	python3
	"
makedepends="
	py3-flit-core
	py3-gpep517
	py3-installer
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/n/nkdfu/nkdfu-$pkgver.tar.gz"
options="!check" # No tests
builddir="$srcdir/nkdfu-$pkgver"

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

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f99436c0f28077cbf26cfc6ced3b5f0b42ec6fca2f62cd55cd435c9200766899b4073791617731cc1dff0717d59943b5438a78692f7b6b66d398478d616c49e5  nkdfu-0.2.tar.gz
"
