diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-20 13:53:28 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-20 13:53:39 +0000 |
commit | e386afe4aee7c05f1129807f7ee585168960c763 (patch) | |
tree | 781ad0ef32a3cc4af72a2ea13a96092fc3f3f6c1 | |
parent | e35bf250f404601f87d960ffaac3ce4ea589d7f9 (diff) | |
download | alpine_aports-e386afe4aee7c05f1129807f7ee585168960c763.tar.bz2 alpine_aports-e386afe4aee7c05f1129807f7ee585168960c763.tar.xz alpine_aports-e386afe4aee7c05f1129807f7ee585168960c763.zip |
testing/knot: new aport. Fixes #3466
-rw-r--r-- | testing/knot/APKBUILD | 63 | ||||
-rw-r--r-- | testing/knot/knot.confd | 7 | ||||
-rw-r--r-- | testing/knot/knot.initd | 35 |
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 @@ | |||
1 | # Contributor: Francesco Colista <fcolista@alpinelinux.org> | ||
2 | # Maintainer: | ||
3 | pkgname=knot | ||
4 | pkgver=1.5.3 | ||
5 | pkgrel=0 | ||
6 | pkgdesc="An high-performance authoritative-only DNS server" | ||
7 | url="https://www.knot-dns.cz" | ||
8 | arch="all" | ||
9 | license="GPL3" | ||
10 | options="libtool" | ||
11 | depends="" | ||
12 | depends_dev="autoconf flex bison zlib-dev openssl-dev liburcu-dev" | ||
13 | makedepends="$depends_dev" | ||
14 | install="" | ||
15 | subpackages="$pkgname-dev $pkgname-doc" | ||
16 | source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz | ||
17 | knot.confd | ||
18 | knot.initd" | ||
19 | _builddir="$srcdir"/$pkgname-$pkgver | ||
20 | |||
21 | prepare() { | ||
22 | local i | ||
23 | cd "$_builddir" | ||
24 | for i in $source; do | ||
25 | case $i in | ||
26 | *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; | ||
27 | esac | ||
28 | done | ||
29 | } | ||
30 | |||
31 | build() { | ||
32 | cd "$_builddir" | ||
33 | ./configure \ | ||
34 | --prefix /usr \ | ||
35 | --sysconfdir=/etc \ | ||
36 | --localstatedir=/var/lib \ | ||
37 | --libexecdir=/usr/lib/knot \ | ||
38 | --with-rundir=/run/knot \ | ||
39 | --with-storage=/var/lib/knot \ | ||
40 | --enable-recvmmsg=yes \ | ||
41 | --disable-silent-rules | ||
42 | |||
43 | make | ||
44 | make check | ||
45 | } | ||
46 | |||
47 | package() { | ||
48 | cd "$_builddir" | ||
49 | make DESTDIR="${pkgdir}/" install | ||
50 | install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot" | ||
51 | install -Dm 644 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot" | ||
52 | rm -f "$pkgdir"/usr/lib/*.la | ||
53 | } | ||
54 | |||
55 | md5sums="dff8d562f7ab4541c8094155170bdcce knot-1.5.3.tar.xz | ||
56 | 5fb8fd53d39fc6ddc1e0982c75dc2d7e knot.confd | ||
57 | 36263b9cdb8664cba6325c7dd85c79a0 knot.initd" | ||
58 | sha256sums="defc5da9920d755354f6233e099d619424371fe03e78ff7b520f2fbad0ba70ec knot-1.5.3.tar.xz | ||
59 | 3f539ffd67cbcda1ef9e7acb68a2a3f1c3443ad9b5af14d2f96ccd74b0cd585a knot.confd | ||
60 | 946df3e80355b2dd488fd072d4fe8e85e63db75d9a23c6dd3bb3fead9070532d knot.initd" | ||
61 | sha512sums="c7fd280d701e529964bd00e1f4de2129d28774c76864a67a64880e29f43ac403d1a863e865adacd1db5d7a3736e3762ce8449926892c3a21a2e5d042bce682e2 knot-1.5.3.tar.xz | ||
62 | 298bc9ae612de56f2a0b629f9241b42f7086f45964dbd7ee3ecb503ec5cc9ae83ff21fccc522bb022ffdbe16997a1b2b1273cf56cac4dfecfdb2fe26a42b9f78 knot.confd | ||
63 | 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 @@ | |||
1 | command=/usr/sbin/knotd | ||
2 | command_args="-d" | ||
3 | pidfile=/var/run/knot/knot.pid | ||
4 | required_files=/etc/knot/knot.conf | ||
5 | extra_started_commands="reload" | ||
6 | description_reload="Reload configuration and changed zones." | ||
7 | |||
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 @@ | |||
1 | #!/sbin/runscript | ||
2 | # Copyright 1999-2013 Gentoo Foundation | ||
3 | # Distributed under the terms of the GNU General Public License v2 | ||
4 | # $Header: /var/cvsroot/gentoo-x86/net-dns/knot/files/knot.init,v 1.2 2013/08/21 09:23:59 scarabeus Exp $ | ||
5 | |||
6 | depend() { | ||
7 | need net | ||
8 | } | ||
9 | |||
10 | start() { | ||
11 | checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/ | ||
12 | |||
13 | ebegin "Starting knot" | ||
14 | start-stop-daemon --start \ | ||
15 | --pidfile $pidfile --exec $command -- $command_args | ||
16 | eend $? | ||
17 | } | ||
18 | |||
19 | stop() { | ||
20 | ebegin "Stoping knot" | ||
21 | /usr/sbin/knotc stop >/dev/null 2>&1 | ||
22 | # In case remote control is not working | ||
23 | if [ "$?" != 0 ]; then | ||
24 | if [ -f $pidfile ]; then | ||
25 | start-stop-daemon --stop --pidfile $pidfile | ||
26 | fi | ||
27 | fi | ||
28 | ewend $? | ||
29 | } | ||
30 | |||
31 | reload() { | ||
32 | ebegin "Reloading knot" | ||
33 | /usr/sbin/knotc reload >/dev/null | ||
34 | eend $? | ||
35 | } | ||