# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dnsrecon
pkgver=1.2.0
pkgrel=0
pkgdesc="DNS Enumeration Script"
url="https://github.com/darkoperator/dnsrecon"
arch="noarch"
license="GPL-2.0-only"
depends="py3-dnspython py3-lxml py3-netaddr py3-setuptools"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
options="!check"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/darkoperator/dnsrecon/archive/$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
}

sha512sums="
2b178a2618f1f7b0bfd17dc3fec652df9042a219a8dc0cd157db07502e6bafad8e0971380d75a473cf3af2fde37f798ac1bcf2a1b8a512715cbb8b991ae59c9b  dnsrecon-1.2.0.tar.gz
"
