abuild: add default_nftrules helper
As proposed here: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16177
This commit is contained in:
parent
15b9496135
commit
ca9bc0a9e9
13
abuild.in
13
abuild.in
|
@ -2173,6 +2173,19 @@ pyc() {
|
|||
default_pyc
|
||||
}
|
||||
|
||||
default_nftrules() {
|
||||
pkgdesc="$pkgdesc (nftables ruleset)"
|
||||
install_if="nftables-rulesets ${subpkgname%-nftrules}=$pkgver-r$pkgrel"
|
||||
|
||||
if [ -d "$pkgdir"/etc/nftables.d ]; then
|
||||
amove 'etc/nftables.d/*.nft'
|
||||
fi
|
||||
}
|
||||
|
||||
nftrules() {
|
||||
default_nftrules
|
||||
}
|
||||
|
||||
is_function() {
|
||||
type "$1" 2>&1 | head -n 1 | grep -E -q "is a (shell )?function"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue