# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=ssh-audit
pkgver=3.2.0
pkgrel=0
pkgdesc="SSH server and client configuration auditing"
url="https://github.com/jtesta/ssh-audit"
license="MIT"
arch="noarch"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/jtesta/ssh-audit/archive/v$pkgver/ssh-audit-$pkgver.tar.gz"

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
	install -Dm644 -t "$pkgdir"/usr/share/man/man1 ssh-audit.1
}

sha512sums="
66544b631eee07d02f2c15324016bbe1d6504e70032659f7610fd25aa248285a0ac20d43c4ae8958f434adab079a551baad4f7fabebdde51d0ff7b7047082abe  ssh-audit-3.2.0.tar.gz
"
