diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-10-27 06:13:03 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-10-27 06:13:03 +0000 |
commit | 6b9c3abcfb02c003a0dfb20a68447b70954e3230 (patch) | |
tree | 3d2bbd2095ef90d8ca7316d96387d55160ddb5cb /community/gdnsd | |
parent | eb26ddb58a52b62f0ca9024cf617cc21bbfc4961 (diff) | |
download | aports-6b9c3abcfb02c003a0dfb20a68447b70954e3230.tar.bz2 aports-6b9c3abcfb02c003a0dfb20a68447b70954e3230.tar.xz |
community/gdnsd: moved from main
Diffstat (limited to 'community/gdnsd')
-rw-r--r-- | community/gdnsd/APKBUILD | 51 | ||||
-rwxr-xr-x | community/gdnsd/gdnsd.initd | 53 | ||||
-rw-r--r-- | community/gdnsd/gdnsd.pre-install | 6 |
3 files changed, 110 insertions, 0 deletions
diff --git a/community/gdnsd/APKBUILD b/community/gdnsd/APKBUILD new file mode 100644 index 0000000000..e5b2f8bd27 --- /dev/null +++ b/community/gdnsd/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Timo Teräs <timo.teras@iki.fi> +pkgname=gdnsd +pkgver=2.2.2 +pkgrel=0 +pkgdesc="Geographic Authoritative DNS server" +url="https://github.com/blblack/gdnsd/" +arch="all" +license="GPL3" +depends="" +depends_dev="" +makedepends="userspace-rcu-dev libev-dev libcap-dev libmaxminddb-dev ragel autoconf automake libtool" +checkdepends="perl perl-libwww perl-socket6 perl-io-socket-inet6 perl-http-daemon perl-test-harness perl-test-harness-utils" +install="$pkgname.pre-install" +subpackages="$pkgname-dev $pkgname-doc" +source="gdnsd-$pkgver.tar.gz::https://github.com/blblack/gdnsd/archive/v$pkgver.tar.gz + gdnsd.initd" + +builddir="$srcdir"/gdnsd-$pkgver + +prepare() { + default_prepare + autoreconf -vif +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-fast-install + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + install -Dm755 "$srcdir"/gdnsd.initd \ + "$pkgdir"/etc/init.d/gdnsd +} + +sha512sums="056f4976fb5e0ae7b7cef649e0b7be43fbcf85331781240c63b508367aa71d32c2cd2e12075fd520738ab313366cdd3bf79edd86950993e8fa2274f6a3ee64b0 gdnsd-2.2.2.tar.gz +27b6ed95452072ddbf767c87202bde8f70fb5272395a599ad6fec1bd5d0eaf1cefc217abf08531e5e0c0d7846018e31ffd215c0f8e92b151fc0e419cdc81e3f1 gdnsd.initd" diff --git a/community/gdnsd/gdnsd.initd b/community/gdnsd/gdnsd.initd new file mode 100755 index 0000000000..e8a75e846b --- /dev/null +++ b/community/gdnsd/gdnsd.initd @@ -0,0 +1,53 @@ +#!/sbin/openrc-run + +name="gdnsd daemon" +extra_commands="configtest" +extra_started_commands="reload fastrestart" +description="Geographic Authoritative DNS server" +description_configtest="Run syntax tests for configuration files only." +description_reload="Signal running gdnsd to reload configuration files" +description_fastrestart="Optimized restart sequence (minimizes down time)" + +if [ -z "${GDNSD_CONFFILE}" ]; then + if [ "${SVCNAME}" = "gdnsd" ]; then + GDNSD_ROOT=system + else + GDNSD_ROOT=/var/gdnsd/${SVCNAME} + fi +fi + +depend() { + need net + use logger + after firewall + provide auth-dns +} + +act() { + ebegin "$1 ${SVCNAME}" + /usr/sbin/gdnsd -d ${GDNSD_ROOT} $2 + eend $? +} + +configtest() { + act "Checking configuration" checkconf +} + +start() { + act "Starting" start +} + +stop () { + if [ "${RC_CMD}" = "restart" ]; then + configtest || return 1 + fi + act "Stopping" stop +} + +fastrestart() { + act "Restarting" restart +} + +reload() { + act "Reloading" reload +} diff --git a/community/gdnsd/gdnsd.pre-install b/community/gdnsd/gdnsd.pre-install new file mode 100644 index 0000000000..0bd9cb7f66 --- /dev/null +++ b/community/gdnsd/gdnsd.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S gdnsd 2>/dev/null +adduser -S -D -H -h /dev/null -s /sbin/nologin -G gdnsd -g gdnsd gdnsd 2>/dev/null + +exit 0 |