# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dnsrecon
pkgver=1.3.1
pkgrel=1
pkgdesc="DNS Enumeration Script"
url="https://github.com/darkoperator/dnsrecon"
arch="noarch"
license="GPL-2.0-only"
depends="py3-dnspython py3-loguru py3-lxml py3-netaddr py3-requests 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="
41969f2b1323c06e14ad4df7bfdf5d76cb804b2de68f0dd8697464e49ff9f5eb259b7b964bbfa11334db6e92db4a471b3fd176d9307b9b0460b3fc75c9c1b764  dnsrecon-1.3.1.tar.gz
"
