# Template file for 'ouch'
pkgname=ouch
version=0.8.1
revision=1
build_style=cargo
configure_args="--no-default-features --features=use_zlib,use_zstd_thin"
hostmakedepends="pkg-config clang"
makedepends="liblzma-devel bzip2-devel libzip-devel libzstd-devel"
checkdepends="git"
short_desc="CLI utility for easily compressing and decompressing files and dirs"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/ouch-org/ouch"
changelog="https://raw.githubusercontent.com/ouch-org/ouch/main/CHANGELOG.md"
distfiles="https://github.com/ouch-org/ouch/archive/refs/tags/${version}.tar.gz"
checksum=920f73d4b162bd1814b67c57906b7322345f198d763f28d04722a406f8352246

pre_build() {
	export OUCH_ARTIFACTS_FOLDER=artifacts
}

post_install() {
	vlicense LICENSE
	vcompletion "artifacts/_ouch" zsh
	vcompletion "artifacts/ouch.fish" fish
	vcompletion "artifacts/ouch.bash" bash

	for page in artifacts/*.1; do
		vman ${page}
	done
}
