# Template file for 'charliecloud'
pkgname=charliecloud
version=0.44
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=1c2504f8a3f03f85d90e51de561da3b56a659af02f6b2fb732bfaf15d6de01a2
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
}
