# Template file for 'git-cliff'
pkgname=git-cliff
version=2.13.1
revision=1
build_style=cargo
build_helper=qemu
configure_args="--no-default-features --features=integrations"
make_install_args="--path git-cliff"
# These tests fail without a git repo
make_check_args="-- --skip repo::"
hostmakedepends="pkg-config libzstd-devel"
makedepends="libgit2-1.9-devel libzstd-devel"
short_desc="Changelog generator based on conventional commits"
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
license="Apache-2.0 OR MIT"
homepage="https://github.com/orhun/git-cliff"
changelog="https://raw.githubusercontent.com/orhun/git-cliff/main/CHANGELOG.md"
distfiles="https://github.com/orhun/git-cliff/archive/refs/tags/v${version}.tar.gz"
checksum=3dd3138a009ade1085dd2f001f836c2bb406462a99512dbcb573bda1f2166274

post_install() {
	vdoc README.md

	OUT_DIR=${PWD} vtargetrun ${DESTDIR}/usr/bin/git-cliff-completions

	vcompletion "_git-cliff" zsh
	vcompletion "git-cliff.fish" fish
	vcompletion "git-cliff.bash" bash

	OUT_DIR=${PWD} vtargetrun ${DESTDIR}/usr/bin/git-cliff-mangen
	vman git-cliff.1

	rm ${DESTDIR}/usr/bin/git-cliff-{completions,mangen}

	vlicense LICENSE-MIT
}
