# Template file for 'ouch'
pkgname=ouch
version=0.3.1
revision=1
build_style=cargo
makedepends="liblzma-devel bzip2-devel libzip-devel"
short_desc="CLI utility for easily compressing and decompressing files and dirs"
maintainer="Savoy <savoy@liberation.red>"
license="MIT"
homepage="https://github.com/ouch-org/ouch"
distfiles="https://github.com/ouch-org/ouch/archive/refs/tags/${version}.tar.gz"
checksum=269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d

pre_build() {
	export GEN_COMPLETIONS=1
	export OUCH_COMPLETIONS_DIR=completions
}

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