aboutsummaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2015-08-22 19:26:16 +0800
committerpi <pi@FreeBSD.org>2015-08-22 19:26:16 +0800
commitf6ce04410addcd77615ad91dad1ed40bad3c3a50 (patch)
treee8b26b7c7b9826e15df901fb8326ed3663ea95ee /dns
parenteda2a9fbf327cb5af1fc93a03357c7aa6b81a78c (diff)
downloadfreebsd-ports-gnome-f6ce04410addcd77615ad91dad1ed40bad3c3a50.tar.gz
freebsd-ports-gnome-f6ce04410addcd77615ad91dad1ed40bad3c3a50.tar.zst
freebsd-ports-gnome-f6ce04410addcd77615ad91dad1ed40bad3c3a50.zip
dns/dnsdist: 0.0.211g05c8117 -> 0.0.213g3172f9b
- Add startup script - Add sample config file - Build with libsodium PR: 202555 Submitted by: Carlos J Puga Medina <cpm@fbsd.es>
Diffstat (limited to 'dns')
-rw-r--r--dns/dnsdist/Makefile10
-rw-r--r--dns/dnsdist/distinfo4
-rw-r--r--dns/dnsdist/files/dnsdist.conf.sample6
-rw-r--r--dns/dnsdist/files/dnsdist.in27
4 files changed, 42 insertions, 5 deletions
diff --git a/dns/dnsdist/Makefile b/dns/dnsdist/Makefile
index 6b41593ef235..60242d309056 100644
--- a/dns/dnsdist/Makefile
+++ b/dns/dnsdist/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= dnsdist
-DISTVERSION= 0.0.211g05c8117
+DISTVERSION= 0.0.213g3172f9b
CATEGORIES= dns net
MASTER_SITES= http://builder.powerdns.com/files/dnsdist/dist/
@@ -21,9 +21,13 @@ LDFLAGS+= -L${LOCALBASE}/lib -latomic
GNU_CONFIGURE= yes
USE_GCC= 4.8+
USES= bison cpe gmake libtool lua:52 pkgconfig readline tar:bz2
+CONFIGURE_ARGS= --enable-libsodium
INSTALL_TARGET= install-strip
-PLIST_FILES= bin/dnsdist \
- man/man1/dnsdist.1.gz
+USE_RC_SUBR= dnsdist
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/dnsdist.conf.sample \
+ ${STAGEDIR}${PREFIX}/etc
.include <bsd.port.mk>
diff --git a/dns/dnsdist/distinfo b/dns/dnsdist/distinfo
index 5853375900fd..b1c3a7cd5244 100644
--- a/dns/dnsdist/distinfo
+++ b/dns/dnsdist/distinfo
@@ -1,2 +1,2 @@
-SHA256 (dnsdist-0.0.211g05c8117.tar.bz2) = de08b642c0b5c1d2f6ff9900e8e043738789a1068a6283005136badaa8622305
-SIZE (dnsdist-0.0.211g05c8117.tar.bz2) = 539720
+SHA256 (dnsdist-0.0.213g3172f9b.tar.bz2) = fe0fa3c3f3c2633d2927b30f54fc92fded3c4dae7d354dde3df7fda3792c6abd
+SIZE (dnsdist-0.0.213g3172f9b.tar.bz2) = 539680
diff --git a/dns/dnsdist/files/dnsdist.conf.sample b/dns/dnsdist/files/dnsdist.conf.sample
new file mode 100644
index 000000000000..635a84a35473
--- /dev/null
+++ b/dns/dnsdist/files/dnsdist.conf.sample
@@ -0,0 +1,6 @@
+newServer {address="2001:4860:4860::8888", qps=1}
+newServer {address="2001:4860:4860::8844", qps=1}
+newServer {address="2620:0:ccc::2", qps=10}
+newServer {address="2620:0:ccd::2", qps=10}
+newServer("192.168.1.2")
+setServerPolicy(firstAvailable) -- first server within its QPS limit
diff --git a/dns/dnsdist/files/dnsdist.in b/dns/dnsdist/files/dnsdist.in
new file mode 100644
index 000000000000..6cc93eb77595
--- /dev/null
+++ b/dns/dnsdist/files/dnsdist.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: dnsdist
+# REQUIRE: NETWORKING DAEMON
+# KEYWORD: shutdown
+#
+# Add the following to /etc/rc.conf to enable dnsdist:
+#
+# dnsdist_enable="YES"
+#
+
+. /etc/rc.subr
+
+name="dnsdist"
+rcvar="dnsdist_enable"
+
+load_rc_config ${name}
+
+: ${dnsdist_enable:="NO"}
+: ${dnsdist_pidfile:=/var/run/${name}/pid}
+
+command=/usr/local/sbin/${name}
+command_args="-l 127.0.0.1:53"
+
+run_rc_command "$1"