void-packages/srcpkgs/NetAuth/template
2022-01-14 21:11:32 -06:00

42 lines
1.1 KiB
Bash

# Template file for 'NetAuth'
pkgname=NetAuth
version=0.6.0
revision=1
wrksrc=netauth-$version
build_style="go"
go_import_path="github.com/netauth/netauth"
go_package="${go_import_path}/cmd/netauth
${go_import_path}/cmd/netauthd"
hostmakedepends="git"
short_desc="Network authentication and identity system"
maintainer="Michael Aldridge <maldridge@netauth.org>"
license="MIT"
homepage="https://netauth.org"
distfiles="https://github.com/NetAuth/NetAuth/archive/v$version.tar.gz"
checksum=6964f313ffa558f225734926ef220a7fb573747ed841a629e006d159003871da
do_check() {
# Flaky test in 0.5.0, deflaked in next release.
go test -v ./... || return 0
}
post_install() {
vlicense LICENSE
vsv netauthd
}
NetAuth-server_package() {
short_desc+=" - server"
depends="${sourcepkg}>=${version}_${revision}"
make_dirs="/var/lib/netauth 0755 _netauth _netauth"
system_group="_netauth"
system_accounts="_netauth"
_netauth_homedir="/var/lib/netauth"
_netauth_shell="/bin/nologin"
_netauth_descr="Unprivileged service account"
_netauth_pgroup="_netauth"
pkg_install() {
vmove usr/bin/netauthd
vmove etc/sv/netauthd
}
}