# Template file for 'fastd'
pkgname=fastd
version=23
revision=1
build_style=meson
hostmakedepends="bison pkg-config"
makedepends="json-c-devel libcap-devel libuecc-devel libsodium-devel libmnl-devel openssl-devel"
short_desc="Fast and Secure Tunneling Daemon"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-2-Clause AND BSD-3-Clause"
homepage="https://github.com/NeoRaider/fastd"
distfiles="https://github.com/NeoRaider/fastd/releases/download/v${version}/fastd-${version}.tar.xz"
checksum=dcab54485c79dda22ce6308a2a48764d53977a518952facd1204ba21af1c86e0

conf_files="
 /etc/fastd/secret.conf
 /etc/fastd/fastd.conf"

make_dirs="/etc/fastd/peers	755	root 	root"

CFLAGS="-I$XBPS_CROSS_BASE/usr/include/sodium"

post_install() {
	vmkdir etc/fastd
	vinstall ${FILESDIR}/fastd.conf 644 etc/fastd
	vinstall ${FILESDIR}/secret.conf 600 etc/fastd
	vsv fastd
	vman doc/fastd.1
	vlicense LICENSE
}
