mirror of
https://github.com/pygos/build.git
synced 2024-11-14 15:37:11 +01:00
David Oberhollenzer
fa4eff263b
This commit adds an "emptypackage" template that implements defaults for all package functions and is included before every package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
41 lines
1.3 KiB
Text
41 lines
1.3 KiB
Text
VERSION="1.10.0"
|
|
SRCDIR="unbound-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
URL="https://www.unbound.net/downloads"
|
|
SHA256SUM="152f486578242fe5c36e89995d0440b78d64c05123990aae16246b7f776ce955"
|
|
DEPENDS="openssl-dev expat-dev libbsd-dev toolchain"
|
|
SUBPKG="unbound libunbound libunbound-dev"
|
|
|
|
build() {
|
|
run_configure "$1" --with-pidfile=/run/unbound.pid \
|
|
--with-libexpat="$SYSROOT" --with-ssl="$SYSROOT"
|
|
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
local tag alg type digest
|
|
|
|
make DESTDIR="$PKGDEPLOYDIR" install
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
|
|
cat_file_override "unbound.conf" > "$PKGDEPLOYDIR/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" >> "$PKGDEPLOYDIR/etc/unbound/root.key"
|
|
done
|
|
}
|
|
|
|
check_update() {
|
|
check_update_simple "$URL" "unbound" "tar.gz"
|
|
}
|