# Template file for 'pizauth'
pkgname=pizauth
version=1.1.0
revision=1
build_style=cargo
configure_args="--all-features"
short_desc="Command-line OAuth2 authentication daemon"
maintainer="dkwo <npiazza@disroot.org>"
license="MIT AND Apache-2.0"
homepage="https://tratt.net/laurie/src/pizauth/"
distfiles="https://github.com/ltratt/pizauth/archive/refs/tags/pizauth-${version}.tar.gz"
checksum=1e7219795937160f74fabfe98e948818a1fa28cfc9dc9b7bcfb6853bce5fb72d

if [ "$XBPS_TARGET_LIBC" = "glibc" ] && [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
	broken="boot-time crate fails"
fi

do_install() {
	vbin target/${RUST_TARGET}/release/pizauth

	vlicense LICENSE-MIT
	vlicense LICENSE-APACHE
	vlicense COPYRIGHT

	vman pizauth.1
	vman pizauth.conf.5
	vsconf examples/pizauth.conf

	vcompletion share/bash/completion.bash bash
	vcompletion share/fish/pizauth.fish fish
	vcompletion share/zsh/_pizauth zsh
}
