# Template file for 'asncounter'
pkgname=asncounter
version=0.7.0
revision=1
build_style=python3-pep517
hostmakedepends="pandoc python3-setuptools python3-setuptools_scm python3-wheel"
makedepends="python3-devel"
depends="python3-pyasn"
checkdepends="python3-pyasn python3-pytest python3-prometheus_client"
short_desc="Tool to group IP addresses by ASN, useful for fighting bot farms"
maintainer="Orphaned <orphan@voidlinux.org>"
license="AGPL-3.0-or-later"
homepage="https://gitlab.com/anarcat/asncounter"
distfiles="https://gitlab.com/anarcat/asncounter/-/archive/$version/asncounter-$version.tar.gz"
checksum=600084c1d9b2665fa3e48c1472a0668ba6481a988ca58b3947e88a7c178780e0

pre_build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ASNCOUNTER="$version"
}

post_install() {
	pandoc --standalone --to man asncounter.1.md > asncounter.1
	vman asncounter.1
	rm ${DESTDIR}/${py3_sitelib}/asncounter-${version}.dist-info/licenses/LICENSE
	vlicense LICENSE
}
