# Template file for 'tpm2-tools'
pkgname=tpm2-tools
version=5.3
revision=1
build_style=gnu-configure
hostmakedepends="autoconf autoconf-archive automake libtool pkg-config $(vopt_if man pandoc)"
makedepends="libcurl-devel openssl-devel tpm2-tss-devel"
short_desc="Trusted Platform Module (TPM2.0) tools"
maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
license="BSD-3-Clause"
homepage="https://github.com/tpm2-software/tpm2-tools/"
changelog="https://raw.githubusercontent.com/tpm2-software/tpm2-tools/master/docs/CHANGELOG.md"
distfiles="https://github.com/tpm2-software/tpm2-tools/archive/refs/tags/${version}.tar.gz"
checksum=24a4113ad1aef589a48031ad448d019466294e0400c8382ffab3e8d4aff48c2d

build_options="man"
desc_option_man="Use pandoc for manpages"

case "$XBPS_MACHINE" in
	x86_64*|i686|ppc64le*|ppc64) build_options_default="man" ;;
esac

pre_configure() {
	echo "${version}" > VERSION
	./bootstrap
}

post_install() {
	vlicense docs/LICENSE
}
