summaryrefslogtreecommitdiff
path: root/community/nsd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/nsd
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/nsd')
-rw-r--r--community/nsd/PKGBUILD41
-rw-r--r--community/nsd/install12
-rw-r--r--community/nsd/service13
3 files changed, 66 insertions, 0 deletions
diff --git a/community/nsd/PKGBUILD b/community/nsd/PKGBUILD
new file mode 100644
index 000000000..06bf8a75b
--- /dev/null
+++ b/community/nsd/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 94613 2013-07-28 13:05:24Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Kaiting Chen <kaitocracy@gmail.com>
+# Contributor: Roberto Alsina <ralsina@kde.org>
+
+pkgname=nsd
+pkgver=3.2.16
+pkgrel=1
+pkgdesc='Authoritative only, high performance and simple DNS server'
+url='http://www.nlnetlabs.nl/nsd/'
+license=('BSD')
+depends=('openssl')
+makedepends=('flex')
+arch=('i686' 'x86_64')
+source=("http://www.nlnetlabs.nl/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'service')
+sha1sums=('cb95efa819902799365691a0a7ddb3690a97df88'
+ 'f35ecb887e86ae0a54ac70aef5a7577fc8761877')
+
+install=install
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure \
+ --prefix=/ \
+ --sbindir=/usr/bin \
+ --datarootdir=/usr/share \
+ --with-pidfile=/run/nsd.pid \
+ --enable-ratelimit
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/nsd.service
+ rm doc/differences.pdf
+ install -d "${pkgdir}"/usr/share/{doc,licenses}/"${pkgname}"
+ install -m644 doc/* "${pkgdir}"/usr/share/doc/"${pkgname}"
+ ln -s ../../doc/"${pkgname}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+}
diff --git a/community/nsd/install b/community/nsd/install
new file mode 100644
index 000000000..5a5f41dd7
--- /dev/null
+++ b/community/nsd/install
@@ -0,0 +1,12 @@
+post_install() {
+ getent group nsd &>/dev/null || groupadd -r nsd >/dev/null
+ getent passwd nsd &>/dev/null || useradd -r -g nsd -d /dev/null -s /bin/false -c nsd nsd >/dev/null
+ chown nsd:nsd /var/db/nsd
+ chmod 700 /var/db/nsd
+}
+
+post_remove() {
+ getent passwd nsd &>/dev/null && userdel nsd >/dev/null
+ getent group nsd &>/dev/null && groupdel nsd >/dev/null
+ true
+}
diff --git a/community/nsd/service b/community/nsd/service
new file mode 100644
index 000000000..ca423c29c
--- /dev/null
+++ b/community/nsd/service
@@ -0,0 +1,13 @@
+[Unit]
+Description=NSD Name Server Daemon
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/nsd.pid
+ExecStart=/usr/bin/nsdc start
+ExecReload=/usr/bin/nsdc reload
+ExecStop=/usr/bin/nsdc stop
+
+[Install]
+WantedBy=multi-user.target