# Template file for 'gitoxide'
pkgname=gitoxide
version=0.55.0
revision=1
build_style=cargo
build_helper=qemu
configure_args="
 --no-default-features
 --features max-control,gix-features/zlib,gitoxide-core-tools-query,gitoxide-core-tools-corpus,gitoxide-core-blocking-client,http-client-curl,sha1"
hostmakedepends="pkg-config"
makedepends="sqlite-devel libcurl-devel"
short_desc="Idiomatic, lean, fast and safe pure Rust implementation of Git"
maintainer="Komeil Parseh <komeilparseh@disroot.org>"
license="Apache-2.0 OR MIT"
homepage="https://github.com/GitoxideLabs/gitoxide"
changelog="https://github.com/GitoxideLabs/gitoxide/raw/main/CHANGELOG.md"
distfiles="https://github.com/GitoxideLabs/gitoxide/archive/refs/tags/v${version}.tar.gz"
checksum=7274b65864995a3a889be69c571507345e5c2a748498e7fdcafb9924c1f89eb2

post_install() {
	vlicense LICENSE-APACHE
	vlicense LICENSE-MIT

	for _shell in bash fish zsh; do
		vtargetrun ${DESTDIR}/usr/bin/ein completions -s ${_shell} > ein.${_shell}
		vtargetrun ${DESTDIR}/usr/bin/gix completions -s ${_shell} > gix.${_shell}
		vcompletion ein.${_shell} ${_shell} ein
		vcompletion gix.${_shell} ${_shell} gix
	done
}
