# Template file for 'fail2ban'
pkgname=fail2ban
version=1.0.2
revision=3
build_style=python3-module
hostmakedepends="pkg-config python3-setuptools"
depends="python3-pyasynchat"
short_desc="Authentication failure monitor system"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://www.fail2ban.org/"
changelog="https://raw.githubusercontent.com/fail2ban/fail2ban/master/ChangeLog"
distfiles="https://github.com/fail2ban/fail2ban/archive/${version}.tar.gz"
checksum=ae8b0b41f27a7be12d40488789d6c258029b23a01168e3c0d347ee80b325ac23
conf_files="
 /etc/fail2ban/fail2ban.conf
 /etc/fail2ban/jail.conf
 /etc/fail2ban/action.d/*.conf
 /etc/fail2ban/filter.d/*.conf"
make_dirs="/var/lib/fail2ban 0700 root root"

pre_build() {
	./fail2ban-2to3
}

post_install() {
	rm -rf ${DESTDIR}/${py3_sitelib}/fail2ban/tests
	vsv fail2ban
}
