# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
# Contributor: Laurent Bercot <ska-devel@skarnet.org>
pkgname=s6-linux-init
pkgver=0.3.1.0
pkgrel=0
pkgdesc="A set of tools to create and run an s6-based init system."
url="http://skarnet.org/software/$pkgname/"
arch="all"
license="ISC"
options="!check"
makedepends="skalibs-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="http://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--enable-shared \
		--enable-static \
		--disable-allstatic \
		--prefix=/usr \
		--libdir=/usr/lib
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

doc() {
	default_doc
	mkdir -p "$subpkgdir"/usr/share/doc
	cp -a "$builddir"/doc "$subpkgdir"/usr/share/doc/$pkgname
}

sha512sums="f9c9b35daf8c7322c2146fb14f4df61131fafb6144a71666cfb77f5684e0669abee9689b238d1d1adfea04795a8cd1e88e61920b6c42432cb8a53c0861b776d8  s6-linux-init-0.3.1.0.tar.gz"
