# Template file for 'earlyoom'
pkgname=earlyoom
version=1.8.2
revision=1
build_style=gnu-makefile
make_check_target=test
hostmakedepends="$(vopt_if man pandoc)"
checkdepends="go"
short_desc="Userspace Early OOM Daemon for Linux"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="https://github.com/rfjakob/earlyoom"
distfiles="https://github.com/rfjakob/${pkgname}/archive/v${version}.tar.gz"
checksum=13869413dc0d973e454854077be7a2049d350f77a97f6911b654e88dc4b20346
CFLAGS="-DVERSION='\"${version}\"'"

build_options="man"
desc_option_man="Use pandoc for manpages"

case "$XBPS_MACHINE" in
	x86_64*|i686|ppc64le*|ppc64) build_options_default="man" ;;
esac

do_install() {
	vbin earlyoom
	if [ "$build_option_man" ]; then
		vman earlyoom.1
	fi
	vsv earlyoom
	vlicense LICENSE
}
