aports/data/bindzone/APKBUILD

75 lines
1.6 KiB
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-data.template
pkgver=2021.08.11.03
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="
e80bb3e2c0840d5b9f2050ff8db5d8a7b212c1af81f7691e88a6324fd7f9825ffcc68e8c97e89a74a6261b9e6fcc75d40672087380fd595968826622e6da3d1c redxen.eu
f6e43a72d91106319151c614f12d2f3a498a0378870901d9e7e2ecacf62b40060c4f314a6e6cdd1683ec56067e014182e4389f1c9387c58e381bad64349bda15 internal
"