2018-10-20 16:43:09 +02:00
|
|
|
VERSION="1.8.1"
|
2018-01-22 17:11:15 +01:00
|
|
|
SRCDIR="unbound-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
|
|
URL="https://www.unbound.net/downloads"
|
2018-10-20 16:43:09 +02:00
|
|
|
SHA256SUM="c362b3b9c35d1b8c1918da02cdd5528d729206c14c767add89ae95acae363c5d"
|
2018-05-22 21:36:56 +02:00
|
|
|
DEPENDS="openssl expat libbsd"
|
2018-01-22 17:11:15 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-09-02 14:19:23 +02:00
|
|
|
run_configure "$1" --with-pidfile=/run/unbound.pid \
|
|
|
|
--with-libexpat="$TCDIR/$TARGET" \
|
2018-02-16 23:22:04 +01:00
|
|
|
--with-ssl="$TCDIR/$TARGET"
|
2018-01-22 17:11:15 +01:00
|
|
|
|
|
|
|
make -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-06-04 01:29:44 +02:00
|
|
|
local tag alg type digest
|
2018-01-22 17:11:15 +01:00
|
|
|
|
|
|
|
make DESTDIR="$DEPLOY" install
|
2018-06-16 17:46:17 +02:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
2018-01-22 17:11:15 +01:00
|
|
|
|
2018-05-22 21:36:56 +02:00
|
|
|
cat_file_override "unbound.conf" > "$DEPLOY/etc/unbound/unbound.conf"
|
2018-02-20 21:30:34 +01:00
|
|
|
|
2018-06-04 01:29:44 +02:00
|
|
|
echo "generating trust anchor root.key"
|
|
|
|
|
|
|
|
curl --silent -L https://data.iana.org/root-anchors/root-anchors.xml |\
|
|
|
|
sed ':a;N;$!ba;s/\n//g' |\
|
|
|
|
grep -o -P -e "<KeyDigest.*?</KeyDigest>" |\
|
|
|
|
while read line; do
|
|
|
|
tag=$(echo $line | grep -o -e "<KeyTag>[0-9]*</" | grep -o -w "[0-9]*")
|
|
|
|
alg=$(echo $line | grep -o -e "<Algorithm>[0-9]*</" | grep -o -w "[0-9]*")
|
|
|
|
type=$(echo $line | grep -o -e "<DigestType>[0-9]*</" | grep -o -w "[0-9]*")
|
|
|
|
digest=$(echo $line | grep -o -e "<Digest>[A-F0-9]*</" | grep -o -w "[A-F0-9]*")
|
|
|
|
|
2018-06-04 16:25:47 +02:00
|
|
|
echo ". IN DS $tag $alg $type $digest" >> "$DEPLOY/etc/unbound/root.key"
|
2018-06-04 01:29:44 +02:00
|
|
|
done
|
2018-01-22 17:11:15 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
curl --silent -L "$URL" | grep -o ">unbound-[0-9.]*tar.gz<" | \
|
|
|
|
sed 's/>unbound-//g' | sed 's/.tar.gz<//g' | \
|
|
|
|
verson_find_greatest "$VERSION"
|
|
|
|
}
|