summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/knot/APKBUILD63
-rw-r--r--testing/knot/knot.confd7
-rw-r--r--testing/knot/knot.initd35
3 files changed, 105 insertions, 0 deletions
diff --git a/testing/knot/APKBUILD b/testing/knot/APKBUILD
new file mode 100644
index 000000000..939c9957b
--- /dev/null
+++ b/testing/knot/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer:
+pkgname=knot
+pkgver=1.5.3
+pkgrel=0
+pkgdesc="An high-performance authoritative-only DNS server"
+url="https://www.knot-dns.cz"
+arch="all"
+license="GPL3"
+options="libtool"
+depends=""
+depends_dev="autoconf flex bison zlib-dev openssl-dev liburcu-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz
+ knot.confd
+ knot.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 \
+ --prefix /usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --libexecdir=/usr/lib/knot \
+ --with-rundir=/run/knot \
+ --with-storage=/var/lib/knot \
+ --enable-recvmmsg=yes \
+ --disable-silent-rules
+
+ make
+ make check
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="${pkgdir}/" install
+ install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot"
+ install -Dm 644 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot"
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="dff8d562f7ab4541c8094155170bdcce knot-1.5.3.tar.xz
+5fb8fd53d39fc6ddc1e0982c75dc2d7e knot.confd
+36263b9cdb8664cba6325c7dd85c79a0 knot.initd"
+sha256sums="defc5da9920d755354f6233e099d619424371fe03e78ff7b520f2fbad0ba70ec knot-1.5.3.tar.xz
+3f539ffd67cbcda1ef9e7acb68a2a3f1c3443ad9b5af14d2f96ccd74b0cd585a knot.confd
+946df3e80355b2dd488fd072d4fe8e85e63db75d9a23c6dd3bb3fead9070532d knot.initd"
+sha512sums="c7fd280d701e529964bd00e1f4de2129d28774c76864a67a64880e29f43ac403d1a863e865adacd1db5d7a3736e3762ce8449926892c3a21a2e5d042bce682e2 knot-1.5.3.tar.xz
+298bc9ae612de56f2a0b629f9241b42f7086f45964dbd7ee3ecb503ec5cc9ae83ff21fccc522bb022ffdbe16997a1b2b1273cf56cac4dfecfdb2fe26a42b9f78 knot.confd
+633724a7dee5f856895a5af7e3a2f4313feca4413ad75530b825b1e94dda6542f3eb0bee1442d465edd62420aba6c341738a84c88997a131cf39ba22a7c4609f knot.initd"
diff --git a/testing/knot/knot.confd b/testing/knot/knot.confd
new file mode 100644
index 000000000..4e6182e52
--- /dev/null
+++ b/testing/knot/knot.confd
@@ -0,0 +1,7 @@
+command=/usr/sbin/knotd
+command_args="-d"
+pidfile=/var/run/knot/knot.pid
+required_files=/etc/knot/knot.conf
+extra_started_commands="reload"
+description_reload="Reload configuration and changed zones."
+
diff --git a/testing/knot/knot.initd b/testing/knot/knot.initd
new file mode 100644
index 000000000..1de82d9d6
--- /dev/null
+++ b/testing/knot/knot.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/knot/files/knot.init,v 1.2 2013/08/21 09:23:59 scarabeus Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/
+
+ ebegin "Starting knot"
+ start-stop-daemon --start \
+ --pidfile $pidfile --exec $command -- $command_args
+ eend $?
+}
+
+stop() {
+ ebegin "Stoping knot"
+ /usr/sbin/knotc stop >/dev/null 2>&1
+ # In case remote control is not working
+ if [ "$?" != 0 ]; then
+ if [ -f $pidfile ]; then
+ start-stop-daemon --stop --pidfile $pidfile
+ fi
+ fi
+ ewend $?
+}
+
+reload() {
+ ebegin "Reloading knot"
+ /usr/sbin/knotc reload >/dev/null
+ eend $?
+}