# Template file for 'charliecloud'
pkgname=charliecloud
version=0.45
revision=1
build_style=gnu-configure
configure_args="--disable-bundled-lark --disable-html
 --with-gc --with-json --with-squashfuse"
hostmakedepends="automake python3-Sphinx python3-sphinx_rtd_theme pkg-config"
makedepends="cJSON-devel fuse-devel gc-devel python3 python3-lark
 squashfuse-devel"
depends="python3 python3-lark python3-requests"
checkdepends="wget"
short_desc="Lightweight, fully unprivileged container implementation"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="https://charliecloud.io/"
changelog="https://gitlab.com/charliecloud/charliecloud/-/tree/main/doc/releases"
distfiles="https://gitlab.com/charliecloud/charliecloud/-/archive/v${version}/charliecloud-v${version}.tar.gz"
checksum=9e7a86d5655f6bb5d4325af150599fef6ec5bafd7f31847e648695421f43786b
nocross="not supported"

CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
	makedepends+=" argp-standalone"
fi

pre_configure() {
	autoreconf -fi
}

post_install() {
	# don't remove examples, ch-test needs them

	rm -f ${DESTDIR}/usr/share/man/man7/ch-completion.bash.7
	vcompletion bin/ch-completion.bash bash
	vlicense NOTICE
}
