summaryrefslogtreecommitdiff
path: root/pcr/knot
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-06-06 16:24:11 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-06-06 16:24:11 -0300
commitbd4c4c57884f910759693cc1957fa3ca133731d2 (patch)
treed8d1f559e5df260f12e7d1b08761875edbf62dd9 /pcr/knot
parentd1e161df4f6111d527c2570958ebaf637411e3e2 (diff)
downloadabslibre-bd4c4c57884f910759693cc1957fa3ca133731d2.tar.gz
abslibre-bd4c4c57884f910759693cc1957fa3ca133731d2.tar.bz2
abslibre-bd4c4c57884f910759693cc1957fa3ca133731d2.zip
knot: authoritative dns server
Diffstat (limited to 'pcr/knot')
-rw-r--r--pcr/knot/PKGBUILD57
-rw-r--r--pcr/knot/install12
-rw-r--r--pcr/knot/knot.service12
3 files changed, 60 insertions, 21 deletions
diff --git a/pcr/knot/PKGBUILD b/pcr/knot/PKGBUILD
index 546d3cdd8..831d6c2d3 100644
--- a/pcr/knot/PKGBUILD
+++ b/pcr/knot/PKGBUILD
@@ -1,31 +1,46 @@
-# Contributor (Arch): Otto Sabart <seberm[at]gmail[dot]com>
-# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io>
+# Maintainer: Ondřej Surý <ondrej@sury.
+# Contributor: Oleander Reis <oleander@oleander.cc>
+# Contributor: Otto Sabart <seberm[at]gmail[dot]com>
pkgname=knot
-pkgver=1.1.0
+pkgver=1.4.6
pkgrel=1
-pkgdesc="high-performance authoritative-only DNS server"
-url="http://www.knot-dns.cz/setlang/?language=en"
+pkgdesc='high-performance authoritative-only DNS server'
+url='https://www.knot-dns.cz/'
arch=('i686' 'x86_64')
-license=('GPLv3')
-depends=('liburcu>=0.5.4' 'flex>=2.5.3' 'libtool' 'bison>=2.3')
-optdepends=('libcap')
-makedepends=('autoconf>=2.65')
-conflicts=()
-replaces=()
-backup=()
-#install='foo.install'
-source=("http://public.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.gz")
-
-md5sums=('b2d4a53d8e98565ebb389531c2b66690')
+license=('GPL3')
+install=install
+depends=('liburcu>=0.5.4' 'openssl>=1.0.0' 'zlib')
+makedepends=('autoconf>=2.65' 'libtool' 'flex>=2.5.3' 'bison>=2.3')
+source=("https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz"
+ 'knot.service')
+sha256sums=('55d292467f5c622384ee25e20de094dc6dba7638f886b38dfba345ac1e6caa13'
+ 'caa870a9c93c57c6311f9e8fb5685a9179bb9839a27a30cc1712c91df0d15090')
build() {
-
cd "${srcdir}/${pkgname}-${pkgver}"
- #autoreconf -if
- ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc/knot
+ ./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
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
- make && make install DESTDIR="${pkgdir}" || return 1
- #ldconfig
+ make DESTDIR="${pkgdir}/" install
+ install -Dm 644 "${srcdir}/knot.service" "${pkgdir}/usr/lib/systemd/system/knot.service"
}
diff --git a/pcr/knot/install b/pcr/knot/install
new file mode 100644
index 000000000..90ece5b42
--- /dev/null
+++ b/pcr/knot/install
@@ -0,0 +1,12 @@
+post_install() {
+ getent group knot &>/dev/null || groupadd -r knot >/dev/null
+ getent passwd knot &>/dev/null || useradd -r -g knot -d /dev/null -s /bin/false -c knot knot >/dev/null
+ chown knot:knot /var/lib/knot
+ chmod 700 /var/lib/knot
+}
+
+post_remove() {
+ getent passwd knot &>/dev/null && userdel knot >/dev/null
+ getent group knot &>/dev/null && groupdel knot >/dev/null
+ true
+}
diff --git a/pcr/knot/knot.service b/pcr/knot/knot.service
new file mode 100644
index 000000000..760152e82
--- /dev/null
+++ b/pcr/knot/knot.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Knot DNS server
+After=syslog.target network.target
+
+[Service]
+#EnvironmentFile=/etc/conf.d/knot
+ExecStart=/usr/bin/knotd -c /etc/knot/knot.conf $OPTIONS
+ExecReload=/usr/bin/knotc reload
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target