aboutsummaryrefslogtreecommitdiff
path: root/dns/gdnsd3
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2019-02-23 01:51:58 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2019-02-23 01:51:58 +0000
commit1bfc3869b4d36915d5d6c9cfbc80d9b1c292a8b7 (patch)
tree3d6481f6fe888f4eea906dc15394b057c81c243b /dns/gdnsd3
parentfc87335d5beddbc58fd1cec94ffa2e01cf0078ce (diff)
downloadports-1bfc3869b4d36915d5d6c9cfbc80d9b1c292a8b7.tar.gz
ports-1bfc3869b4d36915d5d6c9cfbc80d9b1c292a8b7.zip
- Copy gdnsd2 -> gdnsd3
Notes
Notes: svn path=/head/; revision=493631
Diffstat (limited to 'dns/gdnsd3')
-rw-r--r--dns/gdnsd3/Makefile57
-rw-r--r--dns/gdnsd3/distinfo3
-rw-r--r--dns/gdnsd3/files/gdnsd.in47
-rw-r--r--dns/gdnsd3/files/patch-Makefile.in15
-rw-r--r--dns/gdnsd3/pkg-descr13
-rw-r--r--dns/gdnsd3/pkg-plist61
6 files changed, 196 insertions, 0 deletions
diff --git a/dns/gdnsd3/Makefile b/dns/gdnsd3/Makefile
new file mode 100644
index 000000000000..ca0595feff71
--- /dev/null
+++ b/dns/gdnsd3/Makefile
@@ -0,0 +1,57 @@
+# Created by: Allan Jude <allanjude@freebsd.org>
+# $FreeBSD$
+
+PORTNAME= gdnsd
+PORTVERSION= 2.4.2
+CATEGORIES= dns
+MASTER_SITES= https://github.com/gdnsd/gdnsd/releases/download/v${PORTVERSION}/ \
+ ZI \
+ http://gdnsd.scaleengine.net/gdnsd/
+PKGNAMESUFFIX= 2
+
+MAINTAINER= zi@FreeBSD.org
+COMMENT= Authoritative-only GeoIP-aware DNS server
+
+LICENSE= GPLv3
+
+LIB_DEPENDS= libev.so:devel/libev
+BUILD_DEPENDS= ragel>0:devel/ragel
+
+FETCH_ARGS= -Fpr
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --localstatedir=/var
+USE_LDCONFIG= yes
+USES= pkgconfig libtool tar:xz perl5 gmake
+USE_PERL5= build
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CONFLICTS_INSTALL= gdnsd-1.[0-9]* gdnsd3-3.[0-9]*
+
+USE_RC_SUBR= gdnsd
+
+USERS?= gdnsd
+GROUPS?= gdnsd
+
+OPTIONS_DEFINE= DOCS MAXMINDDB URCU
+OPTIONS_DEFAULT=MAXMINDDB
+
+MAXMINDDB_DESC= Enable GeoIP1 + GeoIP2 Support
+MAXMINDDB_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb
+
+URCU_DESC= Read-Copy-Update Support (Faster Zone Parsing)
+URCU_CONFIGURE_WITH= urcu
+URCU_LIB_DEPENDS= liburcu.so:sysutils/liburcu
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|$${localstatedir}/lib/$${PACKAGE_NAME}|/var/db/${PORTNAME}|g' \
+ ${WRKSRC}/configure
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/libgdnsd.so
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/plugin_*.so
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdnsd/geoip \
+ ${STAGEDIR}${PREFIX}/etc/gdnsd/zones \
+ ${STAGEDIR}/var/run/gdnsd
+
+.include <bsd.port.mk>
diff --git a/dns/gdnsd3/distinfo b/dns/gdnsd3/distinfo
new file mode 100644
index 000000000000..eb0002ae2e63
--- /dev/null
+++ b/dns/gdnsd3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1549900121
+SHA256 (gdnsd-2.4.2.tar.xz) = 76ca503cf96d5a26ba1fea82f6c31983542c497799c0ed659d53e51bec9643de
+SIZE (gdnsd-2.4.2.tar.xz) = 640948
diff --git a/dns/gdnsd3/files/gdnsd.in b/dns/gdnsd3/files/gdnsd.in
new file mode 100644
index 000000000000..f32daf9e0c8a
--- /dev/null
+++ b/dns/gdnsd3/files/gdnsd.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: gdnsd
+# REQUIRE: DAEMON
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# gdnsd_enable (bool): Set to NO by default.
+# Set it to YES to enable gdnsd.
+# gdnsd_flags (str): Set to "" by default
+# Extra command line argument flags
+
+. /etc/rc.subr
+
+name="gdnsd"
+rcvar=gdnsd_enable
+
+# set defaults
+load_rc_config $name
+: ${gdnsd_enable:="NO"}
+: ${gdnsd_flags:=""}
+
+command="%%PREFIX%%/sbin/gdnsd"
+command_args="start"
+procname=${command}
+restart_precmd="gdnsd_checkconf"
+reload_cmd="gdnsd_reload"
+reload_precmd="gdnsd_checkconf"
+configtest_cmd="gdnsd_checkconf"
+extra_commands="reload configtest"
+gdnsd_reload()
+{
+ ${command} ${gdnsd_flags} reload-zones
+}
+
+gdnsd_checkconf()
+{
+ ${command} ${gdnsd_flags} checkconf
+}
+
+run_rc_command "$1"
+
diff --git a/dns/gdnsd3/files/patch-Makefile.in b/dns/gdnsd3/files/patch-Makefile.in
new file mode 100644
index 000000000000..2da6759184ff
--- /dev/null
+++ b/dns/gdnsd3/files/patch-Makefile.in
@@ -0,0 +1,15 @@
+--- Makefile.in.orig 2015-03-02 14:36:56 UTC
++++ Makefile.in
+@@ -2552,12 +2552,6 @@ install-exec-hook-top:
+ $(MKDIR_P) "$(DESTDIR)$(GDNSD_DEFPATH_CONFIG)/geoip";
+ $(MKDIR_P) "$(DESTDIR)$(GDNSD_DEFPATH_RUN)";
+ $(MKDIR_P) "$(DESTDIR)$(GDNSD_DEFPATH_STATE)";
+- @id gdnsd >/dev/null 2>&1; if test $$? -ne 0; then \
+- echo; \
+- echo === READ ME ===; \
+- echo The default user \"gdnsd\" \(for privdrop when executed as root\) does not seem to exist yet!; \
+- echo; \
+- fi
+ src/zscan_rfc1035.c: src/zscan_rfc1035.rl
+ $(AM_V_GEN)$(RAGEL) -G2 -o $@ $(srcdir)/src/zscan_rfc1035.rl
+ libgdnsd/bopts.h: Makefile
diff --git a/dns/gdnsd3/pkg-descr b/dns/gdnsd3/pkg-descr
new file mode 100644
index 000000000000..16be78b1d579
--- /dev/null
+++ b/dns/gdnsd3/pkg-descr
@@ -0,0 +1,13 @@
+gdnsd is an Authoritative-only DNS server.
+
+The initial g stands for Geographic, as gdnsd offers a plugin system for
+geographic (or other sorts of) balancing, redirection, and
+service-state-conscious failover. If you don't care about that feature,
+it's still quite good at being a very fast, lean, and resilient
+authoritative-only server for static DNS data.
+
+gdnsd is written in C using libev and pthreads with a focus on high
+performance, low latency service. It does not offer any form of caching or
+recursive service, and does not support DNSSEC.
+
+WWW: https://github.com/blblack/gdnsd
diff --git a/dns/gdnsd3/pkg-plist b/dns/gdnsd3/pkg-plist
new file mode 100644
index 000000000000..45befff225aa
--- /dev/null
+++ b/dns/gdnsd3/pkg-plist
@@ -0,0 +1,61 @@
+bin/gdnsd_geoip_test
+include/gdnsd/alloc.h
+include/gdnsd/bopts.h
+include/gdnsd/compiler.h
+include/gdnsd/dmn.h
+include/gdnsd/dname.h
+include/gdnsd/file.h
+include/gdnsd/log.h
+include/gdnsd/misc.h
+include/gdnsd/mon.h
+include/gdnsd/net.h
+include/gdnsd/paths.h
+include/gdnsd/plugapi.h
+include/gdnsd/plugin.h
+include/gdnsd/prcu.h
+include/gdnsd/stats.h
+include/gdnsd/vscf.h
+lib/gdnsd/libgdnsd.so
+lib/gdnsd/plugin_extfile.so
+lib/gdnsd/plugin_extmon.so
+lib/gdnsd/plugin_geoip.so
+lib/gdnsd/plugin_http_status.so
+lib/gdnsd/plugin_metafo.so
+lib/gdnsd/plugin_multifo.so
+lib/gdnsd/plugin_null.so
+lib/gdnsd/plugin_reflect.so
+lib/gdnsd/plugin_simplefo.so
+lib/gdnsd/plugin_static.so
+lib/gdnsd/plugin_tcp_connect.so
+lib/gdnsd/plugin_weighted.so
+libexec/gdnsd/gdnsd_extmon_helper
+man/man1/gdnsd_geoip_test.1.gz
+man/man3/gdnsd-plugin-api.3.gz
+man/man5/gdnsd.config.5.gz
+man/man5/gdnsd.djbdns.5.gz
+man/man5/gdnsd.zonefile.5.gz
+man/man8/gdnsd-plugin-extfile.8.gz
+man/man8/gdnsd-plugin-extmon.8.gz
+man/man8/gdnsd-plugin-geoip.8.gz
+man/man8/gdnsd-plugin-http_status.8.gz
+man/man8/gdnsd-plugin-metafo.8.gz
+man/man8/gdnsd-plugin-multifo.8.gz
+man/man8/gdnsd-plugin-null.8.gz
+man/man8/gdnsd-plugin-reflect.8.gz
+man/man8/gdnsd-plugin-simplefo.8.gz
+man/man8/gdnsd-plugin-static.8.gz
+man/man8/gdnsd-plugin-tcp_connect.8.gz
+man/man8/gdnsd-plugin-weighted.8.gz
+man/man8/gdnsd.8.gz
+sbin/gdnsd
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/gdnsd_manual.txt
+@dir %%ETCDIR%%/djbdns
+@dir %%ETCDIR%%/geoip
+@dir %%ETCDIR%%/zones
+@dir /var/db/gdnsd
+@dir /var/run/gdnsd