# Template file for 'nitro'
pkgname=nitro
version=0.8.1
revision=1
build_style=gnu-makefile
checkdepends="ruby"
short_desc="Tiny but flexible init system and process supervisor"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="0BSD"
homepage="https://github.com/leahneukirchen/nitro"
changelog="https://github.com/leahneukirchen/nitro/blob/master/NEWS.md"
distfiles="https://github.com/leahneukirchen/nitro/archive/refs/tags/v${version}.tar.gz"
checksum=201ad4eeea18f0a499296a9251d6145ffe63951673a6d5a8d955c5353fe9e632

CPPFLAGS="-DREOPEN_USE_DUP_HACK"

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
	CFLAGS="-Os -Wl,--gc-sections"
	LDFLAGS="-static"
fi

do_install() {
	vbin nitro
	vbin nitroctl
	vman nitro.8
	vman nitroctl.1
	vcompletion contrib/_nitroctl zsh
	vlicense LICENSE
}
