# Contributor: Francesco Colista # Contributor: Dennis Przytarski # Contributor: Francesco Zanini # Contributor: Jakub Jirutka # Maintainer: Francesco Colista pkgname=knot pkgver=2.4.1 pkgrel=0 pkgdesc="An high-performance authoritative-only DNS server" url="https://www.knot-dns.cz" arch="all" license="GPL3" depends="" depends_dev="gnutls-dev libedit-dev libcap-ng-dev libidn-dev lmdb-dev libressl-dev userspace-rcu-dev zlib-dev" makedepends="$depends_dev m4 bison flex perl jansson-dev libtool" install="$pkgname.pre-install $pkgname.post-install knot.post-upgrade" pkgusers="knot" pkggroups="knot" subpackages="$pkgname-libs $pkgname-utils $pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch $pkgname-dev $pkgname-doc " source="https://secure.nic.cz/files/knot-dns/$pkgname-$pkgver.tar.xz knotd.confd knotd.initd " builddir="$srcdir/$pkgname-$pkgver" prepare() { default_prepare || return 1 cd "$builddir" # Make sure embedded LMDB library is not used. rm -rf src/contrib/lmdb } build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/knot \ --with-rundir=/run/knot \ --with-storage=/var/lib/knot \ --disable-silent-rules \ || return 1 make || return 1 #make check || return 1 } package() { cd "$builddir" make DESTDIR="$pkgdir" install || return 1 rm -Rf "$pkgdir"/run chown $pkgusers:$pkggroups "$pkgdir"/var/lib/$pkgname || return 1 chmod 750 "$pkgdir"/var/lib/$pkgname || return 1 install -Dm 644 "$srcdir"/knotd.confd \ "$pkgdir"/etc/conf.d/knotd || return 1 install -Dm 755 "$srcdir"/knotd.initd \ "$pkgdir"/etc/init.d/knotd || return 1 } libs() { pkgdesc="Libraries used by the Knot DNS server and client applications" cd "$pkgdir" mkdir -p "$subpkgdir"/usr/lib mv ./usr/lib/libdnssec.so.* \ ./usr/lib/libknot.so.* \ ./usr/lib/libzscanner.so.* \ "$subpkgdir"/usr/lib/ } utils() { pkgdesc="DNS client utilities shipped with the Knot DNS server" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } bashcomp() { pkgdesc="Bash completions for knot" depends="bash" install_if="$pkgname=$pkgver-r$pkgrel bash" install -m 644 -D "$builddir"/samples/keymgr-completion.sh \ "$subpkgdir"/usr/share/bash-completion/completions/keymgr } zshcomp() { pkgdesc="ZSH completions for knot" depends="zsh" install_if="$pkgname=$pkgver-r$pkgrel zsh" install -m 644 -D "$builddir"/samples/keymgr-completion.zsh \ "$subpkgdir"/usr/share/zsh/site-functions/_keymgr } sha512sums="2b3e6c1a187538b218e3e915aaa91bc38ad4cdecb0f03f31b29bfa83c620d117c169a580ddcc8a33e6422109b422c72f3cf79f2a8d1e10e613edfe4437b4b29c knot-2.4.1.tar.xz 471d3c639a8235ba09491c99d36c0a4f1074d6055ccfd3807be02a30d3ed5bbe69a84f0414ea7810db6bbc1e38f5837108e5744fc59f949ed78a262a7de4597e knotd.confd 979f06a83dd4326920a682f8190319577faf904e0e379b3c55e0420eb43dcb55d86c6727015634fa0c2dff1dddac43bbd5a216ff04f217ad91d670eb899dbefa knotd.initd"