# Template file for 'cocogitto'
pkgname=cocogitto
version=7.0.0
revision=1
build_style=cargo
build_helper=qemu
make_install_args="--path crates/cocogitto"
hostmakedepends="pkg-config"
makedepends="libgit2-1.9-devel"
depends="gnupg"
short_desc="Conventional Commits toolbox"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/cocogitto/cocogitto"
changelog="https://raw.githubusercontent.com/cocogitto/cocogitto/main/CHANGELOG.md"
distfiles="https://github.com/cocogitto/cocogitto/archive/refs/tags/${version}.tar.gz"
checksum=cc00dacf1dd12b63976b0ca3c4ec383f902a95ed148968ccd35d9a174f66966f
# Test suite is not atomic, relies on user environment such as git user configuration
make_check=no

post_install() {
	local cog="${DESTDIR}/usr/bin/cog"
	for shell in bash zsh fish; do
		vtargetrun ${cog} generate-completions ${shell} > cog.${shell}
		vcompletion cog.${shell} ${shell} cog
	done

	vtargetrun ${cog} generate-manpages "${XBPS_BUILDDIR}/${pkgname}-${version}/gen"
	for manpage in gen/*.1; do
		vman ${manpage}
	done

	vdoc README.md
	vlicense LICENSE
}
