# Contributor: Francesco Colista # Contributor: Dennis Przytarski # Contributor: Francesco Zanini # Maintainer: Francesco Colista pkgname=knot pkgver=2.2.1 pkgrel=0 pkgdesc="An high-performance authoritative-only DNS server" url="https://www.knot-dns.cz" arch="all" license="GPL3" options="" depends="" depends_dev="gnutls-dev libedit-dev jansson-dev libcap-ng-dev libidn-dev openssl-dev userspace-rcu-dev zlib-dev" makedepends="$depends_dev m4 bison flex perl libtool" install="$pkgname.pre-install $pkgname.post-install" pkgusers="knot" pkggroups="knot" subpackages="$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() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/knot \ --with-rundir=/var/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 install -Dm 644 "${srcdir}/knotd.confd" "${pkgdir}/etc/conf.d/knotd" install -Dm 755 "${srcdir}/knotd.initd" "${pkgdir}/etc/init.d/knotd" chown $pkgusers:$pkggroups "${pkgdir}"/var/lib/$pkgname chmod 750 "${pkgdir}"/var/lib/$pkgname chown $pkgusers:$pkggroups "${pkgdir}"/var/run/$pkgname chmod 750 "${pkgdir}"/var/run/$pkgname } md5sums="d573ecadedf4f15ec1f02671443520cb knot-2.2.1.tar.xz 66f3111080662280d95bc928d6ca92d5 knotd.confd 5bdbc22866a28caae068e65d53916915 knotd.initd" sha256sums="4b587bd8299445a29990ba89087b156ab9b6bf85cbd68846766c078e5b3481d3 knot-2.2.1.tar.xz ff384d428c9e67139ed21b0c78eabf6a26d96f31775f6143ce0c4f9c4f6beaf3 knotd.confd c7690f1c4f748f436faa9e305ecbbb3d05e5cc50493eb10ca92bc73365578428 knotd.initd" sha512sums="040fa8824e250d359d74a9d731e6667367ea7e764b06f07f4e737ba4f6a56f4651cd3db6465f3c69e79c89b27edeea8161d049ef7083a5bb26941a201c17ccfd knot-2.2.1.tar.xz 471d3c639a8235ba09491c99d36c0a4f1074d6055ccfd3807be02a30d3ed5bbe69a84f0414ea7810db6bbc1e38f5837108e5744fc59f949ed78a262a7de4597e knotd.confd b6cd5b52ba65f9726164b21003fe0a0fc54f4f51aa7bbbcfd5b83aa4466e5224567a26c9c8ede13ac6a8090706e975e3220456112b20eb45304c9d92be7fb3d3 knotd.initd"