Refactor structure
This commit is contained in:
parent
1661b35268
commit
5cc73dc1dd
@ -1,8 +1,8 @@
|
||||
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||
pkgname=nnd-s6-linux-init
|
||||
pkgver=1.3
|
||||
pkgrel=0
|
||||
pkgver=1.5
|
||||
pkgrel=4
|
||||
pkgdesc="Skeleton for nnd-s6-services and symlinks"
|
||||
url="none"
|
||||
arch="noarch"
|
||||
@ -17,29 +17,26 @@ options="!check"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp -R "$startdir"/skel "$builddir"/skel
|
||||
cp -R "$startdir"/skel "$builddir"/nnd-skel
|
||||
}
|
||||
|
||||
build() {
|
||||
s6-linux-init-maker -1 -f "nnd-skel" "current"
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/etc/s6-linux-init
|
||||
mv "$builddir"/skel "$pkgdir"/etc/s6-linux-init/nnd-skel
|
||||
for x in nnd-skel current; do
|
||||
mv "$builddir"/"$x" "$pkgdir"/etc/s6-linux-init/"$x"
|
||||
done
|
||||
}
|
||||
|
||||
_default() {
|
||||
# TODO: How do we distribute the default in apkv3?
|
||||
local base="/etc/s6-linux-init"
|
||||
depends="$depends nnd-s6-linux-init"
|
||||
|
||||
local \
|
||||
skel="$pkgdir/$base/nnd-skel" \
|
||||
dest="$subpkgdir/$base/current"
|
||||
local base="/etc/s6-linux-init"
|
||||
amove "$base/current"
|
||||
|
||||
mkdir -p "${dest%/*}"
|
||||
s6-linux-init-maker -1 -f "$skel" "$dest"
|
||||
|
||||
mkdir -p "$subpkgdir/sbin"
|
||||
for i in "$dest"/bin/*; do
|
||||
local bin="${i##*/}"
|
||||
ln -sf "$base/current/bin/$bin" "$subpkgdir/sbin/$bin"
|
||||
done
|
||||
mkdir -p "$subpkgdir"
|
||||
mv -v "$subpkgdir/$base/current/bin" "$subpkgdir/sbin"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user