# Template file for 'topgrade'
pkgname=topgrade
version=17.9.0
revision=1
build_style=cargo
build_helper=qemu
short_desc="Meta upgrade tool for pip, flatpak, your distro and everything else"
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/topgrade-rs/topgrade"
distfiles="https://github.com/topgrade-rs/topgrade/archive/refs/tags/v${version}.tar.gz"
checksum=58d86e921cbe25aa4e913ae3a24ff95c3ab7aad46fe0cc5f0c8d9b4bd38a8929

post_install() {
	local _topgrade="${DESTDIR}/usr/bin/topgrade"
	for _shell in bash fish zsh; do
		vtargetrun ${_topgrade} --gen-completion ${_shell} > topgrade.${_shell}
		vcompletion topgrade.${_shell} ${_shell}
	done

	vtargetrun ${_topgrade} --gen-manpage > topgrade.1
	vman topgrade.1
}
