mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
5bbaffbd58
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
50 lines
No EOL
1.5 KiB
Text
50 lines
No EOL
1.5 KiB
Text
VERSION="1.7.2"
|
|
SRCDIR="unbound-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
URL="https://www.unbound.net/downloads"
|
|
SHA256SUM="a85fc7bb34711992cf128b2012638ebb8dc1fe15818baa381f6489240845eaa0"
|
|
DEPENDS="openssl expat libbsd"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
$1/configure --prefix="" --host="$TARGET" --disable-static \
|
|
--sysconfdir=/etc --with-pidfile=/run/unbound.pid \
|
|
--sbindir=/bin --with-libexpat="$TCDIR/$TARGET" \
|
|
--with-ssl="$TCDIR/$TARGET"
|
|
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
local tag alg type digest
|
|
|
|
make DESTDIR="$DEPLOY" install
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
|
|
|
cat_file_override "unbound.conf" > "$DEPLOY/etc/unbound/unbound.conf"
|
|
|
|
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]*")
|
|
|
|
echo ". IN DS $tag $alg $type $digest" >> "$DEPLOY/etc/unbound/root.key"
|
|
done
|
|
}
|
|
|
|
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"
|
|
} |