aboutsummaryrefslogtreecommitdiffstats
path: root/community/yadifa
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-23 07:10:33 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-23 07:10:33 +0000
commitd9a08d67caee43455e4ffca3db6349c50b234690 (patch)
tree1944d2e729feb06aba74945737f7c83379ecbbfd /community/yadifa
parent1d31e92ddaeed64b748cb43860b41e4a7016b0f8 (diff)
community/yadifa: moved from testing
Diffstat (limited to 'community/yadifa')
-rw-r--r--community/yadifa/APKBUILD67
-rw-r--r--community/yadifa/poll-h.patch17
-rw-r--r--community/yadifa/yadifa.confd4
-rw-r--r--community/yadifa/yadifa.initd38
-rwxr-xr-xcommunity/yadifa/yadifa.post-install5
5 files changed, 131 insertions, 0 deletions
diff --git a/community/yadifa/APKBUILD b/community/yadifa/APKBUILD
new file mode 100644
index 00000000000..1eee783bd0a
--- /dev/null
+++ b/community/yadifa/APKBUILD
@@ -0,0 +1,67 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=yadifa
+pkgver=2.1.6
+_buildnr=5826
+pkgrel=0
+pkgdesc="Lightweight authoritative Name Server with DNSSEC capabilities"
+url="http://www.yadifa.eu"
+arch="all"
+license="BSD-3"
+depends="openssl"
+depends_dev="openssl-dev"
+makedepends="$depends_dev"
+install="$pkgname.post-install"
+options="libtool"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://cdn.yadifa.eu/sites/default/files/releases/$pkgname-$pkgver-$_buildnr.tar.gz
+ $pkgname.initd
+ $pkgname.confd"
+
+_builddir="$srcdir"/$pkgname-$pkgver-$_buildnr
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/tcp_io_stream.c
+ sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/debug.c
+ sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/format.c
+ sed -i -e "s/__linux__/__GLIBC__/g" sbin/yadifad/signals.c
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --sysconfdir=/etc/$pkgname \
+ --localstatedir=/var/yadifa \
+ --enable-dynamic-provisioning \
+ --enable-rrl
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -D -m 0755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -D -m 0755 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -D -m 0755 etc/*.example "$pkgdir"/etc/$pkgname
+ cp etc/yadifad.conf "$pkgdir"/etc/$pkgname
+ mkdir -p "$pkgdir"/var/run/$pkgname
+ mkdir -p "$pkgdir"/var/log/$pkgname
+}
+
+md5sums="0d0a70da864e12a6f68eaf93e3bc4f42 yadifa-2.1.6-5826.tar.gz
+d953b0cc2d696dc67ffe24e89a1aa66c yadifa.initd
+5440992593d8605cf9c638d0e59d7fc5 yadifa.confd"
+sha256sums="c42a4ca927d989f74ee8978b8122c22032d9460176bfcdafc1c371571803e642 yadifa-2.1.6-5826.tar.gz
+4012317e3e6ed95767c7b3ad05f9eda6e532788f95e6617aa135488693525eb3 yadifa.initd
+09ae43cadd2790cec47a904ded91dfad989b91108d1d6f0221ea171676c3de22 yadifa.confd"
+sha512sums="7c08a1a67d6adb3a3a8dc46cad0b72d85d2d70393b592d838237b83609c393674557e9c13a92fc9b8890449193ef5817d66950e04b6ad953f677bbb3052fa204 yadifa-2.1.6-5826.tar.gz
+a3a65bf13f41838d9493facc2903d955aafd107a29d8a73d4ed021690e1e2c511f48915360a9490ccbf8d9573f8e9c3fca988cb6dd5e57546787384e2b2d075d yadifa.initd
+eac74148b58d3b7472602542622616bd0ef441b191356a5b7fd06d17284c579139c1fde9b35fbb30a8214394863e31bed4c8521aff7b3f7ea831f14c2a3ccf01 yadifa.confd"
diff --git a/community/yadifa/poll-h.patch b/community/yadifa/poll-h.patch
new file mode 100644
index 00000000000..2477708b902
--- /dev/null
+++ b/community/yadifa/poll-h.patch
@@ -0,0 +1,17 @@
+diff --git a/sbin/yadifad/poll-util.h b/sbin/yadifad/poll-util.h
+index ef9a004..41d4d0c 100644
+--- a/sbin/yadifad/poll-util.h
++++ b/sbin/yadifad/poll-util.h
+@@ -38,11 +38,10 @@
+ *
+ ******************************************************************************************************************/
+
++#include <poll.h>
+ #ifndef _POLL_H
+ #define _POLL_H
+
+-#include <poll.h>
+-
+ /**
+ * This code maintains the limit on the tcp sockets
+ * @todo Portability has to be tested.
diff --git a/community/yadifa/yadifa.confd b/community/yadifa/yadifa.confd
new file mode 100644
index 00000000000..4f86cc0d2d3
--- /dev/null
+++ b/community/yadifa/yadifa.confd
@@ -0,0 +1,4 @@
+SVCBIN="/usr/sbin/yadifad"
+CONFFILE="/etc/yadifa/yadifad.conf"
+PIDFILE="/var/run/yadifa/yadifa.pid"
+YADIFA_OPTS=""
diff --git a/community/yadifa/yadifa.initd b/community/yadifa/yadifa.initd
new file mode 100644
index 00000000000..5b9cf898b80
--- /dev/null
+++ b/community/yadifa/yadifa.initd
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 2014 Francesco Colista (fcolista@alpinelinux.org)
+# Distributed under the terms of the GNU General Public License, v2 or later#
+
+depend() {
+ need net
+ after firewall
+ provide dns
+}
+
+checkconfig() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "${CONFFILE} does not exist!"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${SVCBIN} \
+ --pidfile ${PIDFILE} \
+ -- -c ${CONFFILE} ${YADIFA_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${SVCBIN} \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --exec ${SVCBIN} --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/community/yadifa/yadifa.post-install b/community/yadifa/yadifa.post-install
new file mode 100755
index 00000000000..87816a60f8d
--- /dev/null
+++ b/community/yadifa/yadifa.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+sed -i -e "s/daemon.*/daemon\ton/" /etc/yadifa/yadifad.conf >&2
+sed -i -e "s/logpath.*/logpath\t\t\"\/var\/log\/yadifa\"/" /etc/yadifa/yadifad.conf >&2
+sed -i -e "s/pidpath.*/pidfile\t\t\"\/var\/run\/yadifa\/yadifa\.pid\"/" /etc/yadifa/yadifad.conf >&2
+exit 0