# Template file for 'turnstile'
pkgname=turnstile
version=0.1.11
revision=1
build_style=meson
configure_args="-Ddinit=enabled -Drunit=enabled -Ddefault_backend=runit
 -Dmanage_rundir=true"
hostmakedepends="pkg-config scdoc"
makedepends="pam-devel"
short_desc="Independent session/login tracker and user service manager"
maintainer="classabbyamp <void@placeviolette.net>"
license="BSD-2-Clause"
homepage="https://github.com/chimera-linux/turnstile"
distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
checksum=04904eff68a726bed281820b3497e018ede55a5d745f31ceb9a502f905d0ed56
conf_files="/etc/turnstile/turnstiled.conf"
make_dirs="/var/lib/turnstiled/linger 0755 root root"

post_install() {
	vsv turnstiled
	vsconf "${FILESDIR}/dbus.run"
	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
	vsconf "${FILESDIR}/dbus.check"
	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.check"
	vdoc "${FILESDIR}/README.voidlinux"
	vlicense COPYING.md
}
