aboutsummaryrefslogtreecommitdiffstats
path: root/community/knot
diff options
context:
space:
mode:
Diffstat (limited to 'community/knot')
-rw-r--r--community/knot/APKBUILD59
-rw-r--r--community/knot/knot.post-upgrade15
2 files changed, 67 insertions, 7 deletions
diff --git a/community/knot/APKBUILD b/community/knot/APKBUILD
index 477916b396..1398b4a3c7 100644
--- a/community/knot/APKBUILD
+++ b/community/knot/APKBUILD
@@ -1,23 +1,30 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Dennis Przytarski <dennis@przytarski.com>
# Contributor: Francesco Zanini <francesco@zanini.me>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=knot
pkgver=2.3.0
-pkgrel=0
+pkgrel=1
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 jansson-dev libcap-ng-dev libidn-dev
- lmdb-dev openssl-dev userspace-rcu-dev zlib-dev"
-makedepends="$depends_dev m4 bison flex perl libtool"
-install="$pkgname.pre-install $pkgname.post-install"
+depends_dev="gnutls-dev libedit-dev libcap-ng-dev libidn-dev lmdb-dev
+ openssl-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-dev $pkgname-doc"
-source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz
+subpackages="$pkgname-libs
+ $pkgname-utils
+ $pkgname-bash-completion:bashcomp
+ $pkgname-zsh-completion:zshcomp
+ $pkgname-dev
+ $pkgname-doc
+ "
+source="https://secure.nic.cz/files/knot-dns/$pkgname-$pkgver.tar.xz
knotd.confd
knotd.initd
"
@@ -62,6 +69,44 @@ package() {
"$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"
+ arch="noarch"
+ 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"
+ arch="noarch"
+ 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
+}
+
md5sums="7ca754f972fb07faa4f30e50d8a4385b knot-2.3.0.tar.xz
66f3111080662280d95bc928d6ca92d5 knotd.confd
f79e35b48c3afc236cf7a9dc20dc3d11 knotd.initd"
diff --git a/community/knot/knot.post-upgrade b/community/knot/knot.post-upgrade
new file mode 100644
index 0000000000..f86b42f941
--- /dev/null
+++ b/community/knot/knot.post-upgrade
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "2.3.0-r1")" = "<" ]; then
+ cat 1>&2 <<-EOF
+ *
+ * Knot utilities kdig, khost, knsec3hash, and knsupdate have been moved
+ * to subpackage knot-utils. If you use them, run: apk add knot-utils.
+ *
+ EOF
+fi
+
+exit 0