aboutsummaryrefslogtreecommitdiffstats
path: root/testing/knot
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2014-10-20 13:53:28 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2014-10-20 13:53:39 +0000
commite386afe4aee7c05f1129807f7ee585168960c763 (patch)
tree781ad0ef32a3cc4af72a2ea13a96092fc3f3f6c1 /testing/knot
parente35bf250f404601f87d960ffaac3ce4ea589d7f9 (diff)
downloadaports-e386afe4aee7c05f1129807f7ee585168960c763.tar.bz2
aports-e386afe4aee7c05f1129807f7ee585168960c763.tar.xz
testing/knot: new aport. Fixes #3466
Diffstat (limited to 'testing/knot')
-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 0000000000..939c9957b9
--- /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 0000000000..4e6182e525
--- /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 0000000000..1de82d9d6d
--- /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 $?
+}