# Template file for 'git-filter-repo'
pkgname=git-filter-repo
version=2.33.0
revision=1
depends="git python3"
checkdepends="git python3 perl rsync dos2unix"
short_desc="Versatile tool for rewriting git history"
maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="MIT"
homepage="https://github.com/newren/git-filter-repo/"
distfiles="https://github.com/newren/git-filter-repo/releases/download/v${version}/git-filter-repo-${version}.tar.xz"
checksum=7bcf11da134bbd82a4171f7fb28a3ab7bc4d478fe8ec3a3d9580e4bbdc32e6e9

do_check() {
	t/run_tests
}

do_install() {
	vlicense COPYING.mit
	vinstall git-filter-repo 0755 "${py3_sitelib}" git_filter_repo.py
	vmkdir usr/libexec/git-core
	ln -s "/${py3_sitelib}/git_filter_repo.py" \
		"${DESTDIR}/usr/libexec/git-core/git-filter-repo"
	vman Documentation/man1/git-filter-repo.1
	vdoc Documentation/html/git-filter-repo.html
}
