2021-06-19 22:08:51 +00:00
|
|
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
|
|
|
|
|
|
|
. ../APKBUILD-config.template
|
|
|
|
|
2021-08-11 14:17:40 +00:00
|
|
|
pkgver=2021.08.11.02
|
2021-06-19 22:08:51 +00:00
|
|
|
pkgrel=0
|
2021-06-20 14:20:08 +00:00
|
|
|
options="!check" # check requires root?
|
2021-06-19 22:08:51 +00:00
|
|
|
|
|
|
|
subpackages="
|
|
|
|
$pkgname-base
|
|
|
|
$pkgname-openssh
|
|
|
|
$pkgname-haproxy:_defmodule
|
|
|
|
$pkgname-murmur:_defmodule
|
|
|
|
$pkgname-dovecot:_defmodule
|
|
|
|
$pkgname-postfix:_defmodule
|
|
|
|
$pkgname-wireguard:_defmodule
|
|
|
|
$pkgname-unbound:_defmodule
|
|
|
|
$pkgname-transmission:_defmodule
|
|
|
|
"
|
|
|
|
|
|
|
|
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() {
|
|
|
|
rx_install "nft/loadall"
|
|
|
|
for x in "$builddir"/nft/*/*/table; do
|
|
|
|
fnc="${x##$builddir/nft/}"
|
|
|
|
_rx_installdir="$_rx_installdir/${fnc%/*}" rx_install "$x"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
base() {
|
|
|
|
_modname="${subpkgname##$pkgname-}"
|
|
|
|
install_if="$pkgname"
|
|
|
|
_module "$_modname"
|
|
|
|
}
|
|
|
|
|
|
|
|
openssh() {
|
|
|
|
_modname="${subpkgname##$pkgname-}"
|
|
|
|
install_if="$pkgname $_modname"
|
|
|
|
_module "$_modname"
|
|
|
|
}
|
|
|
|
|
|
|
|
_defmodule() {
|
|
|
|
_modname="${subpkgname##$pkgname-}"
|
|
|
|
install_if="$pkgname redxen-config-$_modname"
|
|
|
|
_module "$_modname"
|
|
|
|
}
|
|
|
|
|
|
|
|
_module() {
|
|
|
|
for x in $(find "$builddir"/nft -name "$1"); do
|
|
|
|
fnc="${x##$builddir/nft/}"
|
|
|
|
_rx_installdir="$_rx_installdir/${fnc%/*}" rx_install "$x"
|
|
|
|
done
|
|
|
|
}
|