# Template file for 'ssh-tpm-agent'
pkgname=ssh-tpm-agent
version=0.9.0
revision=1
build_style=go
go_import_path="github.com/foxboron/ssh-tpm-agent"
go_package="
 ${go_import_path}/cmd/ssh-tpm-add
 ${go_import_path}/cmd/ssh-tpm-agent
 ${go_import_path}/cmd/ssh-tpm-hostkeys
 ${go_import_path}/cmd/ssh-tpm-keygen"
hostmakedepends="ruby-asciidoctor"
makedepends="openssl-devel"
checkdepends="openssh"
short_desc="SSH agent (ssh-agent) for TPMs"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
homepage="https://github.com/Foxboron/ssh-tpm-agent"
changelog="https://github.com/Foxboron/ssh-tpm-agent/releases"
distfiles="https://github.com/Foxboron/ssh-tpm-agent/releases/download/v${version}/ssh-tpm-agent-v${version}.tar.gz"
checksum=74682d750b3dfa97388d9334fd9f48b797c688642bec0f30d192bb5085c12577

post_install() {
	vlicense LICENSE
	make VERSION=${version} TAG=${version} man
	vman man/ssh-tpm-hostkeys.1
	vman man/ssh-tpm-agent.1
	vman man/ssh-tpm-keygen.1
	vman man/ssh-tpm-add.1
	vinstall contrib/services/system/ssh-tpm-agent.service 644 usr/lib/systemd/system
	vinstall contrib/services/system/ssh-tpm-agent.socket 644 usr/lib/systemd/system
	vinstall contrib/services/system/ssh-tpm-genkeys.service 644 usr/lib/systemd/system
	vinstall contrib/services/user/ssh-tpm-agent.service 644 usr/lib/systemd/user
	vinstall contrib/services/user/ssh-tpm-agent.socket 644 usr/lib/systemd/user
}
