# Template file for 'git-absorb'
pkgname=git-absorb
version=0.9.0
revision=1
build_style=cargo
build_helper="qemu"
hostmakedepends="pkg-config asciidoc"
makedepends="libgit2-1.9-devel"
short_desc="Like git commit --fixup, but automatic"
maintainer="icp <pangolin@vivaldi.net>"
license="BSD-3-Clause"
homepage="https://github.com/tummychow/git-absorb"
distfiles="https://github.com/tummychow/git-absorb/archive/refs/tags/${version}.tar.gz"
checksum=a0f74e6306d7fbd746d2b4a6856621d46a7f82e3e88b6bb8b6fc0480cf811f53
make_check_pre="env PATH=/usr/libexec/chroot-git:${PATH}"

post_install() {
	vlicense LICENSE.md

	a2x -L -d manpage -f manpage Documentation/git-absorb.adoc --attribute man-version=${version}
	vman Documentation/git-absorb.1

	for sh in bash fish zsh; do
		vtargetrun ${DESTDIR}/usr/bin/git-absorb --gen-completions $sh > git-absorb.$sh
		vcompletion git-absorb.$sh $sh
	done
}
