diff options
Diffstat (limited to 'community/nsd')
-rw-r--r-- | community/nsd/PKGBUILD | 27 | ||||
-rw-r--r-- | community/nsd/install | 8 | ||||
-rw-r--r-- | community/nsd/service | 14 |
3 files changed, 34 insertions, 15 deletions
diff --git a/community/nsd/PKGBUILD b/community/nsd/PKGBUILD index fca605f66..04e329e46 100644 --- a/community/nsd/PKGBUILD +++ b/community/nsd/PKGBUILD @@ -1,34 +1,47 @@ -# $Id: PKGBUILD 64529 2012-02-15 22:26:23Z bisson $ +# $Id: PKGBUILD 71903 2012-06-03 06:00:07Z bisson $ # Maintainer: Kaiting Chen <kaitocracy@gmail.com> # Maintainer: Gaetan Bisson <bisson@archlinux.org> # Contributor: Roberto Alsina <ralsina@kde.org> pkgname=nsd pkgver=3.2.10 -pkgrel=1 +pkgrel=2 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") -sha1sums=('04657cffe5087d97213b245f8281296cac86b868') +source=("http://www.nlnetlabs.nl/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'service') +sha1sums=('04657cffe5087d97213b245f8281296cac86b868' + 'e560876628a30f11f9abbee4abcaa1f51cf449a6') install=install build() { cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/ --exec-prefix=/usr --datarootdir=/usr/share + + ./configure \ + --prefix=/ \ + --exec-prefix=/usr \ + --datarootdir=/usr/share \ + --with-pidfile=/run/nsd.pid \ + make } package() { cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install - install -d "${pkgdir}"/{etc/rc.d,usr/share/{doc,licenses}/"${pkgname}"} + + install -d "${pkgdir}"/etc/rc.d + ln -s ../../usr/sbin/nsdc "${pkgdir}"/etc/rc.d/nsd + 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 - ln -s ../../usr/sbin/nsdc "${pkgdir}"/etc/rc.d/nsd } diff --git a/community/nsd/install b/community/nsd/install index a2662903f..5a5f41dd7 100644 --- a/community/nsd/install +++ b/community/nsd/install @@ -3,14 +3,6 @@ post_install() { 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 - install -o nsd -d /var/run/nsd -} - -post_upgrade() { - [[ `vercmp $2 3.2.9` -lt 0 ]] && cat <<\EOF -==> The database format was updated; please run `nsdc rebuild`. -EOF - true } post_remove() { diff --git a/community/nsd/service b/community/nsd/service new file mode 100644 index 000000000..37649f557 --- /dev/null +++ b/community/nsd/service @@ -0,0 +1,14 @@ +[Unit] +Description=NSD Name Server Daemon +After=network.target + +[Service] +Type=forking +PIDFile=/run/nsd.pid +ExecStart=/usr/sbin/nsd start +ExecReload=/usr/sbin/nsd reload +ExecStop=/usr/sbin/nsd stop +Restart=always + +[Install] +WantedBy=multi-user.target |