# Template file for 'nsjail'
pkgname=nsjail
version=1.3
revision=1
build_style=gnu-makefile
hostmakedepends="libnl3-devel"
makedepends="${hostmakedepends}"
short_desc="A light-weight process isolation tool"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="Apache-2.0"
homepage="https://github.com/google/nsjail"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=8df57499c3512362283fb1663f37bfa687a64654a377800dfa6ea94486bf119c

CFLAGS="-Wno-error=format"

post_extract() {
	sed -i '/^CC/d' Makefile
	sed -i 's/\(C\|LD\)FLAGS +=/override &/' Makefile
}
pre_build() {
	case "$XBPS_TARGET_MACHINE" in
		*-musl)	CFLAGS+=" -include ${FILESDIR}/musl-compat.h" ;;
	esac
}
do_install() {
	vbin ${pkgname}
	vlicense LICENSE
}
