# Template file for 'containers.image'
pkgname=containers.image
version=5.38.0
revision=1
build_wrksrc=image
conf_files="/etc/containers/registries.conf /etc/containers/policy.json"
hostmakedepends="go-md2man"
short_desc="Configuration shared by podman, buildah, and skopeo"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/containers/container-libs"
changelog="https://github.com/containers/container-libs/tags"
distfiles="https://github.com/containers/container-libs/archive/refs/tags/image/v${version}.tar.gz"
checksum=10d6deb6cafa6f95a516049a63ee68804ba68d2f7d8541f970e6a8ca3fe5d26a

do_build() {
	mkdir -p build
	for doc in docs/*.*.md; do
		docbase="${doc##*/}"
		go-md2man -in "${doc}" -out "build/${docbase/.md/}"
	done
}

do_install() {
	for man in build/*; do
		vman "${man}"
	done
	vinstall registries.conf 0644 etc/containers
	vinstall default-policy.json 0644 etc/containers policy.json
}
