2018-06-19 20:55:07 +02:00
|
|
|
VERSION="1.7.2"
|
2018-01-22 17:11:15 +01:00
|
|
|
SRCDIR="unbound-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
|
|
URL="https://www.unbound.net/downloads"
|
2018-06-19 20:55:07 +02:00
|
|
|
SHA256SUM="a85fc7bb34711992cf128b2012638ebb8dc1fe15818baa381f6489240845eaa0"
|
2018-05-22 21:36:56 +02:00
|
|
|
DEPENDS="openssl expat libbsd"
|
2018-01-22 17:11:15 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-02-16 23:22:04 +01:00
|
|
|
$1/configure --prefix="" --host="$TARGET" --disable-static \
|
|
|
|
--sysconfdir=/etc --with-pidfile=/run/unbound.pid \
|
|
|
|
--sbindir=/bin --with-libexpat="$TCDIR/$TARGET" \
|
|
|
|
--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"
|
|
|
|
}
|