ports/main/nnd-nft/APKBUILD

35 lines
853 B
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../../APKBUILD.template
pkgrel=3
pkgdesc="Basic generic nftables template"
options="!check" # check requires root?
subpackages=""
for i in "$startdir"/nft/inet/nnd-base/*/*/*/*; do
subpackages="$subpackages $pkgname-$(echo "${i##*/nft/inet/nnd-base/}" | sed 's/\//-/g'):_mod"
done
check() {
msg "Checking if commands are valid"
nft -c -I "$builddir/nft" -f "$builddir"/nft/loadall
}
prepare() {
default_prepare
cp -r "$startdir"/nft "$builddir"/nft # abuild doesn't support hierarchical includes yet, no hashes will be computed
}
package() {
mkdir -p "$pkgdir"/etc/nnd
cp -r "$builddir"/nft "$pkgdir"/etc/nnd/nftables
}
_mod() {
local _modname="${subpkgname##$pkgname-}"
amove etc/nnd/nftables/inet/nnd-base/"$(echo $_modname | sed 's/-/\//g')"
}