# Template file for 'tacacs'
pkgname=tacacs
version=4.0.4.28
revision=4
build_style=gnu-configure
configure_args="--with-libwrap=no"
hostmakedepends="flex perl"
makedepends="libnsl-devel"
short_desc="Modified version of Cisco's tacacs+ (tac_plus) developer's kit"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom:Cisco"
homepage="http://www.shrubbery.net/tac_plus/"
distfiles="ftp://ftp.shrubbery.net/pub/tac_plus/tacacs-F$version.tar.gz"
checksum=147f2dc98d26d2f93f0aba76c988ced196ffe1c001dc2e91f788a1a2c747219e
python_version=3
disable_parallel_build=yes

if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
	makedepends+=" libxcrypt-devel"
fi

pre_configure() {
	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
		patch -Np0 -i ${FILESDIR}/no-reap-child-test-no-nsl.patch
	fi
}

post_install() {
	vlicense COPYING
}

tacacs-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
	}
}
