PKGBUILDs/community/unbound/PKGBUILD

100 lines
4.4 KiB
Bash
Raw Normal View History

2020-11-21 17:15:45 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
2021-07-24 18:33:51 +00:00
# Maintainer: Bruno Pagani <archange@archlinux.org>
2020-11-21 17:15:45 +00:00
# Contributor: Gaetan Bisson <bisson@archlinux.org>
2015-12-06 17:37:32 +00:00
# Contributor: Hisato Tatekura <hisato_tatekura@excentrics.net>
# Contributor: Massimiliano Torromeo <massimiliano DOT torromeo AT google mail service>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable LTO (--disable-flto)
pkgname=unbound
2021-08-25 12:46:31 +00:00
pkgver=1.13.2
pkgrel=1
2020-11-21 17:15:45 +00:00
pkgdesc="Validating, recursive, and caching DNS resolver"
2021-07-24 18:33:51 +00:00
arch=(x86_64)
2020-11-21 17:15:45 +00:00
url="https://unbound.net/"
2021-07-24 18:33:51 +00:00
license=(BSD)
depends=(dnssec-anchors fstrm hiredis openssl ldns libevent libnghttp2 libsodium)
makedepends=(expat protobuf-c systemd python swig)
2021-02-11 15:01:49 +00:00
optdepends=(
'expat: for unbound-anchor'
'sh: for unbound-control-setup'
2021-07-24 18:33:51 +00:00
'python: python-bindings'
2021-02-11 15:01:49 +00:00
)
2021-07-24 18:33:51 +00:00
provides=(libunbound.so)
backup=(etc/${pkgname}/${pkgname}.conf)
2017-04-24 23:45:34 +00:00
source=("https://unbound.net/downloads/${pkgname}-${pkgver}.tar.gz"{,.asc}
2021-08-25 12:46:31 +00:00
"${pkgname}-1.13.2-fix_libpython_linking.patch"
2021-07-24 18:33:51 +00:00
${pkgname}-sysusers.conf
${pkgname}-tmpfiles.conf
${pkgname}-trusted-key.hook)
2021-08-25 12:46:31 +00:00
sha512sums=('1e89441446e7a25c6a49bded645f8b348c1758c3be54e3a986041cb1f00c45d152fd469dc52666fb820574db9d51b16f1627dc8afcb9519508d4833ca358191a'
2018-06-11 18:05:49 +00:00
'SKIP'
2021-08-25 12:46:31 +00:00
'836ec61c79f91e429feed7fca7b8df64c0233aa621b3c49011ad39854b231bbc7ab73408785278b0b8b7d1038bd2c9c57548d973ce796cccdb575307ff5318c6'
2020-11-21 17:15:45 +00:00
'ef71d4e9b0eb0cc602d66bd0573d9424578fe33ef28a852c582d56f0fd34fdd63046c365ef7aed8b84a461b81254240af7ad3fd539da72f9587817d21bd6c585'
'6b1849ae9d7cf427f6fa6cd0590e8f8c3f06210d2d6795e543b0f325a9e866db0f5db2275a29fa90f688783c0dd16f19c8a49a9817d5f5444e13f8f2df3ff712'
'613826cdf5ab6e77f2805fa2aa65272508dcd11090add1961b3df6dfac3b67db016bc9f45fbcf0ef0de82b2d602c153d5263a488027a6cf13a72680b581b266d')
2021-08-25 12:46:31 +00:00
b2sums=('71806edc86b323ff1f9f2d7bd3f699b15da2cd1cfefe9ca6008d74915dd6c7b45690026fb0244531ae563a3ca1b142f21fc8aed97ba4bb0015d8ab9196ff045a'
2020-11-21 17:15:45 +00:00
'SKIP'
2021-08-25 12:46:31 +00:00
'b2b7f27f1d339ea8ded8733cb71cbdb0d4b11c925a412fe78a0848c80fa401fc381a1c041b85879999a2c3f273021e6ff0bd748af479d914df2eb4b94614b821'
2020-11-21 17:15:45 +00:00
'292a3c2e5fde292a03b6c9b2ddabd5089f52e73b50a404c3d9f54c1a43184924b661a21eea61cc521c594c1005a3b40b630fa585a38195c61298f9b24b248b92'
'd3951006b43068be904c6b91a9e0563d56228225854e12b40abbdd4ba9b47338e97265837297a6de879acbc8051bb749163f9457683f5e12fc29ac2e7b687fd3'
'd28785390eb6c125bd26ca11f097fe8864b080482157deeb7c70e9bee47ff2844abaed574db59a7c152ed3ec0acba05cfee4c3751f7a9f553320b064578f86c7')
2021-07-24 18:33:51 +00:00
validpgpkeys=(EDFAA3F2CA4E6EB05681AF8E9F6F1C2D7E045F8D) # W.C.A. Wijngaards <wouter@nlnetlabs.nl>
2019-09-17 03:52:16 +00:00
prepare() {
2021-07-24 18:33:51 +00:00
cd ${pkgname}-${pkgver}
2020-11-21 17:15:45 +00:00
# set default location of trusted-key.key
sed '/# trust-anchor-file:/c\\ttrust-anchor-file: /etc/unbound/trusted-key.key' \
-i doc/example.conf.in
2021-07-24 18:33:51 +00:00
# backport https://github.com/NLnetLabs/unbound/pull/511
2021-08-25 12:46:31 +00:00
patch -Np1 -i ../"${pkgname}-1.13.2-fix_libpython_linking.patch"
2020-11-21 17:15:45 +00:00
autoreconf -vfi
2019-09-17 03:52:16 +00:00
}
2015-12-06 17:37:32 +00:00
build() {
2021-07-24 18:33:51 +00:00
cd ${pkgname}-${pkgver}
2020-11-21 17:15:45 +00:00
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
--disable-rpath \
--enable-dnscrypt \
--enable-dnstap \
--enable-pie \
--enable-relro-now \
--enable-subnet \
--enable-systemd \
--enable-tfo-client \
--enable-tfo-server \
--enable-cachedb \
--with-libhiredis \
--with-conf-file=/etc/unbound/unbound.conf \
--with-pidfile=/run/unbound.pid \
--with-rootkey-file=/etc/trusted-key.key \
--with-libevent \
--with-libnghttp2 \
2021-07-24 18:33:51 +00:00
--with-pyunbound \
2020-11-21 17:15:45 +00:00
--disable-flto
make
}
2015-12-06 17:37:32 +00:00
2020-11-21 17:15:45 +00:00
check() {
2021-07-24 18:33:51 +00:00
cd ${pkgname}-${pkgver}
2020-11-21 17:15:45 +00:00
make -k check
2015-12-06 17:37:32 +00:00
}
package() {
2021-07-24 18:33:51 +00:00
depends+=(libprotobuf-c.so libsystemd.so)
cd ${pkgname}-${pkgver}
2020-11-21 17:15:45 +00:00
make DESTDIR="${pkgdir}" install
2021-07-24 18:33:51 +00:00
install -vDm 644 contrib/${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
install -vDm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
cd ..
install -vDm 644 ${pkgname}-sysusers.conf "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
install -vDm 644 ${pkgname}-tmpfiles.conf "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
2020-11-21 17:15:45 +00:00
# libalpm hook to copy the dnssec-anchors provided key to /etc/unbound
2021-07-24 18:33:51 +00:00
install -vDm 644 unbound-trusted-key.hook -t "${pkgdir}"/usr/share/libalpm/hooks/
2015-12-06 17:37:32 +00:00
}