# Contributor: John Regan <john@jrjrtech.com>
# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
pkgname=s6-portable-utils
pkgver=2.3.0.4
pkgrel=0
pkgdesc="skarnet.org's tiny portable generic utilities"
url=https://skarnet.org/software/s6-portable-utils/
arch="all"
license="ISC"
_skalibs_version=2.14.3
makedepends="skalibs-dev>=${_skalibs_version}"
options="!check"
subpackages="$pkgname-doc"
source="https://skarnet.org/software/s6-portable-utils/s6-portable-utils-$pkgver.tar.gz"

build() {
	./configure \
		--enable-shared \
		--disable-allstatic \
		--prefix=/usr \
		--enable-multicall
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/include/s6-portable-utils/config.h
	rmdir -p "$pkgdir"/usr/include/s6-portable-utils || :

	mkdir -p "$pkgdir/usr/share/doc"
	cp -a "$builddir/doc" "$pkgdir/usr/share/doc/$pkgname"
}

sha512sums="
0da4fb637f414d870e0476a01c08448b021d2c20c9a4746ab1c6c700e8eeb055d57f6e8326228694463483cd307e308f8fe148a615232039f32dcf351d5060ec  s6-portable-utils-2.3.0.4.tar.gz
"
