aports/data/bindzone/APKBUILD

75 lines
1.6 KiB
Plaintext
Raw Normal View History

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-data.template
pkgver=2022.02.03.01
pkgrel=0
checkdepends="bind-tools"
makedepends="
bind-dnssec-tools
redxen-secret-opendkim-dns~2021.05.31.01
redxen-secret-dnssec~2021.05.31.01
"
subpackages="$pkgname-redxen $pkgname-internal"
options=""
source="
redxen.eu
internal
"
# crxn # NOTE: Outdated
prepare() {
default_prepare
# Create a copy for every zone
for i in $source; do
cp "$i" "$i"-mod
done
}
check() {
msg "Checking zone validity"
for i in $source; do
/usr/sbin/named-checkzone "$i" ./"$i"-mod
done
}
build() {
# Set SOA to pkgver
for i in $source; do
rx_replace "CURRENTSOA" "$(echo $pkgver | sed 's/\.//g')" "$i"-mod
done
# Add OpenDKIM to redxen.eu
cat /etc/redxen/opendkim/dns-record >> redxen.eu-mod
# Add KSK/ZSK keys to redxen.eu
cat /etc/redxen/dnssec/redxen.eu/*.key >> redxen.eu-mod
# Sign redxen.eu zone
msg "Signing redxen.eu zone"
dnssec-signzone -K /etc/redxen/dnssec/redxen.eu -f redxen.eu-mod -e "+90d" -o redxen.eu -t redxen.eu-mod
}
package() {
mkdir -p "$(rx_cpkgdir)"
}
redxen() {
rx_install "redxen.eu-mod" "redxen.eu"
}
#crxn() {
# rx_install "crxn-mod" "crxn"
#}
internal() {
rx_install "internal-mod" "internal"
}
sha512sums="
7232c54d1b07910631af39424ae58e7749b9411ba79aae31e8ff90547faadc9219a7c878fc48d3380aee80eb57dea4493781cfdaae3bf55bfc25411a7412d1b2 redxen.eu
154ba153566d198159ec4f007677e3a595a4ba9949ae9246b89a3ebfceac0b6c37296fc1b2f1d4cc0f23175736f3ac975213605dfe3026723ad098f10574aa68 internal
"