2019-01-09 15:47:08 +01:00
|
|
|
VERSION="1.8.3"
|
2018-01-22 17:11:15 +01:00
|
|
|
SRCDIR="unbound-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
|
|
URL="https://www.unbound.net/downloads"
|
2019-01-09 15:47:08 +01:00
|
|
|
SHA256SUM="2b692b8311edfad41e7d0380aac34576060d4176add81dc5db419c79b2a4cecc"
|
2019-02-27 14:22:03 +01:00
|
|
|
DEPENDS="openssl-dev expat-dev libbsd-dev crt-dev"
|
2019-02-27 20:39:06 +01:00
|
|
|
SUBPKG="unbound libunbound libunbound-dev"
|
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() {
|
2018-06-04 01:29:44 +02:00
|
|
|
local tag alg type digest
|
2018-01-22 17:11:15 +01:00
|
|
|
|
2019-03-06 10:03:12 +01:00
|
|
|
make DESTDIR="$PKGDEPLOYDIR" install
|
|
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
2018-01-22 17:11:15 +01:00
|
|
|
|
2019-03-06 10:03:12 +01:00
|
|
|
cat_file_override "unbound.conf" > "$PKGDEPLOYDIR/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]*")
|
|
|
|
|
2019-03-06 10:03:12 +01:00
|
|
|
echo ". IN DS $tag $alg $type $digest" >> "$PKGDEPLOYDIR/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"
|
2019-02-27 20:39:06 +01:00
|
|
|
}
|