# Template file for 'just'
pkgname=just
version=1.51.0
revision=1
build_style=cargo
build_helper=qemu
make_check_args="-- --skip completions::bash" # requires git repo
checkdepends="python3"
short_desc="Just a command runner"
maintainer="cinerea0 <cinerea0@protonmail.com>"
license="CC0-1.0"
homepage="https://github.com/casey/just"
changelog="https://raw.githubusercontent.com/casey/just/master/CHANGELOG.md"
distfiles="https://github.com/casey/just/archive/refs/tags/${version}.tar.gz"
checksum=ed424dcf55ec08e22a0c58f6cfb7333573775d69dac3802bf0c1d96f7557089d

# Fix failing test
pre_check() {
	export USER=void
	export XDG_RUNTIME_DIR="$(mktemp -d /tmp/runtimedir.XXXXXX)"
}

post_install() {
	vlicense LICENSE
	_just="${DESTDIR}/usr/bin/just"
	vtargetrun "${_just}" --man > just.1
	vman just.1
	for shell in bash fish zsh; do
		vcompletion "completions/just.${shell}" "${shell}"
	done
}
