# Template file for 'moor'
pkgname=moor
version=2.12.1
revision=1
build_style=go
go_import_path=github.com/walles/moor/v2
go_ldflags="-X main.versionString=${version}"
go_package="${go_import_path}/cmd/moor"
short_desc="Drop-in replacement for the less pager"
maintainer="Diego Magdaleno <diegomagdaleno@pm.me>"
license="BSD-2-Clause"
homepage="https://github.com/walles/moor"
changelog="https://github.com/walles/moor/releases"
distfiles="https://github.com/walles/moor/archive/refs/tags/v${version}.tar.gz"
checksum=807c36867ea07878143236ed1bd2053aba1064529401b730639be4d028dc7648

post_install() {
	vman moor.1
	vlicense LICENSE

	ln -s moor ${DESTDIR}/usr/bin/moar
	ln -s moor.1 ${DESTDIR}/usr/share/man/man1/moar.1
}

moar_package() {
	conflicts="MoarVM"
	short_desc+=" - transitional dummy package"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/bin/moar
		vmove usr/share/man/man1/moar.1
	}
}
