Add baseconfig package and depend on nftables

This commit is contained in:
Alex D. 2024-12-22 17:22:58 +00:00
parent 2b65ec596b
commit d1ef2a8d34
Signed by: caskd
GPG Key ID: F92BA85F61F4C173

View File

@ -3,10 +3,13 @@
. ../../APKBUILD.template
pkgrel=0
pkgrel=3
pkgdesc="Basic generic nftables template"
options="!check" # check requires root?
subpackages=""
depends="nftables"
subpackages="
$pkgname-baseconfig
"
for i in "$startdir"/nft/inet/nnd-base/*/*/*/*; do
subpackages="$subpackages $pkgname-$(echo "${i##*/nft/inet/nnd-base/}" | sed 's/\//-/g'):_mod"
@ -32,3 +35,17 @@ _mod() {
local _modname="${subpkgname##$pkgname-}"
amove etc/nnd/nftables/inet/nnd-base/"$(echo $_modname | sed 's/-/\//g')"
}
baseconfig() {
pkgdesc="Base configuration set applicable to most hosts"
depends="
$pkgname
$pkgname-filter-input-iface-lo
$pkgname-filter-input-ct-established
$pkgname-filter-input-ct-invalid
$pkgname-filter-input-ct-related
$pkgname-filter-input-icmp-v4
$pkgname-filter-input-icmp-v6
"
mkdir -p "$subpkgdir"
}