# Contributor: Alex Denes # Maintainer: Alex Denes . ../../APKBUILD.template pkgname=nnd-s6-services pkgver=1.17 pkgrel=0 pkgdesc="Base services for s6" depends="s6-rc s6-portable-utils s6-linux-utils" builddir="$srcdir/" _distpfx="etc/s6/dist" prepare() { default_prepare cp -R "$startdir"/rc "$builddir"/rc cp -R "$startdir"/env "$builddir"/env cp "$startdir"/manage.sh "$builddir"/manage.sh } package() { # Distributed bundles mkdir -p "$pkgdir/$_distpfx" mv "$builddir"/rc "$pkgdir/$_distpfx"/rc mv "$builddir"/env "$pkgdir/$_distpfx"/env # Manager install -Dm755 "$builddir"/manage.sh "$pkgdir"/usr/bin/nnd-s6 # Defaults mkdir -p "$pkgdir"/etc/s6/sv mkdir -p "$pkgdir"/etc/s6/env mkdir -p "$pkgdir"/etc/s6/rc mkdir -p "$pkgdir"/etc/s6/rc/default/contents.d echo bundle > "$pkgdir"/etc/s6/rc/default/type } check() { s6-rc-compile "$builddir"/compiled "$builddir"/rc } _bundle() { local _BNAME="${subpkgname##$pkgname-}" [ -d "$pkgdir/$_distpfx/env/$_BNAME" ] && amove "$_distpfx/env/$_BNAME" amove "$_distpfx/rc/$_BNAME" }