unbound-redis-apk/unbound/APKBUILD

116 lines
2.4 KiB
Text
Raw Normal View History

2023-10-20 13:06:49 +02:00
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=unbound
pkgver=0.0.0
pkgrel=0
pkgdesc="Unbound is a validating, recursive, and caching DNS resolver"
url="https://nlnetlabs.nl/projects/unbound/about/"
arch="all"
license="BSD-3-Clause"
depends="dnssec-root"
depends_dev="expat-dev"
_depends_migrate="
/bin/sh
apk-tools
openrc
"
makedepends="$depends_dev
libevent-dev
linux-headers
openssl-dev>3
protobuf-c-dev
python3-dev
swig
"
checkdepends="
bind-tools
ldns-tools
"
install="$pkgname.pre-install"
pkgusers="unbound"
pkggroups="unbound"
subpackages="
$pkgname-dbg
$pkgname-dev
$pkgname-doc
$pkgname-libs
$pkgname-openrc
py-unbound:py
$pkgname-migrate::noarch
"
source="https://unbound.net/downloads/unbound-$pkgver.tar.gz
conf.patch
migrate-dnscache-to-unbound
$pkgname.initd
$pkgname.confd
"
build() {
export CFLAGS="$CFLAGS -flto=auto"
PYTHON_VERSION=3 ./configure \
--build="$CBUILD" \
--host="$CHOST" \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--with-username=unbound \
--with-run-dir="" \
--with-pidfile="" \
--with-rootkey-file=/usr/share/dnssec-root/trusted-key.key \
--with-libevent \
--with-pthreads \
--disable-static \
--disable-rpath \
--enable-dnstap \
--with-ssl \
--without-pythonmodule \
--with-pyunbound \
--with-libhiredis \
--enable-cachedb
# do not link to libpython
sed -i -e '/^LIBS=/s/-lpython.*[[:space:]]/ /' Makefile
make
}
check() {
make test
}
package() {
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" unbound-event-install
install -Dm755 contrib/update-anchor.sh \
"$pkgdir"/usr/share/$pkgname/update-anchor.sh
install -D -m644 doc/CREDITS doc/Changelog doc/FEATURES \
doc/README doc/TODO -t "$pkgdir"/usr/share/doc/$pkgname/
cd "$pkgdir"
install -Dm755 "$srcdir"/unbound.initd ./etc/init.d/unbound
install -Dm644 "$srcdir"/unbound.confd ./etc/conf.d/unbound
}
py() {
pkgdesc="Python bindings to libunbound"
depends="$depends_py"
amove usr/lib/python*
}
migrate() {
pkgdesc="Simple tool to migrate from dnscache to unbound"
depends="$_depends_migrate"
install -m755 -D "$srcdir"/migrate-dnscache-to-unbound \
"$subpkgdir"/usr/bin/migrate-dnscache-to-unbound
}
sha512sums=""