# Contributor: Jakub Jirutka # Contributor: tcely # Maintainer: _upstream="knot-resolver" pkgname="${_upstream}" pkgver="4.2.2" pkgrel=1 pkgdesc="Minimalistic caching DNS resolver implementation" url="https://www.knot-resolver.cz/" # luajit is not available for disabled architectures arch="all !s390x" license="GPL-3.0" pkgusers="kresd" pkggroups="kresd" depends="dns-root-hints dnssec-root lua5.1-sec lua5.1-socket" _depends_dnstap_dev="fstrm-dev protobuf-dev protobuf-c-dev" _depends_http="$pkgname lua5.1-http" depends_dev="knot-dev>=2.8.0 libedit-dev libuv-dev>=1.7 lmdb-dev luajit-dev>=2.0 $_depends_dnstap_dev" depends_static="$pkgname-dev" makedepends="$depends_dev bash cmake gnutls-dev luacheck meson>=0.46 ninja pkgconf py3-flake8" checkdepends="cmocka-dev" install="$pkgname.pre-install" subpackages="$pkgname-mod-http:http:noarch $pkgname-mod-dnstap:dnstap $pkgname-libs-static $pkgname-dev $pkgname-doc $pkgname-openrc" source=" https://secure.nic.cz/files/${_upstream}/${_upstream}-$pkgver.tar.xz ${pkgname}.logrotate ${pkgname}.confd ${pkgname}.initd " builddir="${srcdir}/${_upstream}-${pkgver}" # secfixes: # 4.1.0-r0: # - CVE-2019-10190 # - CVE-2019-10191 # 2.3.0-r0: # - CVE-2018-1110 build() { meson build \ --prefix=/usr \ --buildtype=release \ --default-library=both \ -Dclient=enabled \ -Dgroup="$pkggroups" \ -Dinstall_kresd_conf=enabled \ -Dunit_tests=enabled \ -Duser="$pkgusers" \ -Droot_hints=/usr/share/dns-root-hints/named.root \ -Dmanaged_ta=disabled \ -Dkeyfile_default=/usr/share/dnssec-root/trusted-key.key ninja -C build } check() { meson test -C build } package() { DESTDIR="$pkgdir" ninja install -C build cd "$pkgdir" install -m 755 -D "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname install -m 644 -D "$srcdir"/$pkgname.confd ./etc/conf.d/$pkgname install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname } http() { pkgdesc="Knot Resolver - HTTP/2 services" depends="$_depends_http" local moddir moddir="usr/lib/${_upstream}/kres_modules" mkdir -p "$subpkgdir"/$moddir mv "$pkgdir"/$moddir/http* "$subpkgdir"/$moddir/ } dnstap() { pkgdesc="Knot Resolver - dnstap logging" depends="$_depends_dnstap" local moddir moddir="usr/lib/${_upstream}/kres_modules" mkdir -p "$subpkgdir"/$moddir mv "$pkgdir"/$moddir/dnstap.so "$subpkgdir"/$moddir/ } gpg_signature_extensions="asc" gpgfingerprints=" good:BE26 EBB9 CBE0 59B3 910C A35B CE8D D6A1 A50A 21E4 good:4A8B A48C 2AED 933B D495 C509 A1FB A5F7 EF8C 4869 B600 6460 B60A 80E7 8206 2449 E747 DF1F 9575 A3AA " sha256sums="03b68dff16429aed7a5b0cea7189276c8056e8ecd567b678c2595d48d9a51458 knot-resolver-4.2.2.tar.xz 1907cad39d355c03f84997272271933476d335b0e84c4f71490c98b7a2631f20 knot-resolver.logrotate 357a277602d998bebabb806178c96dd71dc14a73945000480788a9b5cef10a57 knot-resolver.confd 2c3978a7366a04aba7bac0308d778af4c93ca9497fe10bb96658050a3080cf62 knot-resolver.initd" sha512sums="53a7cb9419f090609c3ca31f606d40c6b023a1356de79899bc867b0511cc23474ac66af0dbd78cca0a48759ddf95cab6762bb17b24b4d1a376ad8cfdd4042fda knot-resolver-4.2.2.tar.xz 688aeacb0c1f21c7e532533b402e67068897217713fb668636df7533000b493981ddfa0497f8dba7da7c804ee4ab8d587a4f52155b4e2bf1f4025d2588d314bb knot-resolver.logrotate 0bfab48f3a182eb396c039c932698f9a4bb7d11f5ecd87336fe803cf6e0ef2923c2e516dc6a5cec19595945d24b3b24795d0119fb8560c42b0d268b2c3be6c20 knot-resolver.confd 902e7773c404ab4862453233e16ec8ccc415759d73aea795062e945034d28537b13397b14dec3b6ef8ec3ea58604e77258e1381e9b62d93ddb9ec3e3e0031244 knot-resolver.initd"