# Template file for 'dnsdist'
pkgname=dnsdist
version=2.1.0
revision=1
build_style=meson
build_helper="meson"
configure_args="-Ddnscrypt=enabled -Dreproducible=true -Dsnmp=enabled
 -Dyaml=disabled --sysconfdir=/etc/dnsdist"
conf_files="/etc/dnsdist/dnsdist.conf"
hostmakedepends="cmake pkg-config python3 python3-yaml tar"
makedepends="boost-headers fstrm-devel libcap-devel libedit-devel
 libsodium-devel lua54-devel net-snmp-devel nghttp2-devel openssl-devel
 re2-devel"
short_desc="Dynamic DNS loadbalancer"
maintainer="JailBird <jailbird@fdf.net>"
license="GPL-2.0-only"
homepage="https://dnsdist.org/"
changelog="https://dnsdist.org/changelog.html"
distfiles="https://downloads.powerdns.com/releases/${pkgname}-${version}.tar.xz"
checksum=8714b7ca065b2d7ae5da980bc81a94d2baaa725a9b3c2c23b3a0fadb7c6a8335

system_accounts="_dnsdist"

# (y2k38) This can be removed once musl is updated to 1.2.x
if [ "$XBPS_TARGET_LIBC" = "musl" ] && [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
	broken="no y2038 support"
fi

post_install() {
	vinstall dnsdist.conf-dist 644 etc/dnsdist dnsdist.conf
	vsv dnsdist
}
