diff --git a/dns/gdnsd3/Makefile b/dns/gdnsd3/Makefile index 407fee3c681d..a849395d7628 100644 --- a/dns/gdnsd3/Makefile +++ b/dns/gdnsd3/Makefile @@ -1,59 +1,60 @@ # Created by: Allan Jude PORTNAME= gdnsd PORTVERSION= 3.7.0 +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= https://github.com/gdnsd/gdnsd/releases/download/v${PORTVERSION}/ \ ZI \ http://gdnsd.scaleengine.net/gdnsd/ PKGNAMESUFFIX= 3 MAINTAINER= zi@FreeBSD.org COMMENT= Authoritative-only GeoIP-aware DNS server LICENSE= GPLv3 LIB_DEPENDS= libev.so:devel/libev \ libsodium.so:security/libsodium \ liburcu.so:sysutils/liburcu FETCH_ARGS= -Fpr GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=/var --with-buildinfo=${PORTVERSION} USE_LDCONFIG= yes USES= cpe pkgconfig libtool tar:xz perl5 gmake USE_PERL5= build CPPFLAGS+= -isystem${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFLICTS_INSTALL= gdnsd-1.[0-9]* gdnsd2-2.[0-9]* USE_RC_SUBR= gdnsd USERS?= gdnsd GROUPS?= gdnsd OPTIONS_DEFINE= DOCS MAXMINDDB OPTIONS_DEFAULT=MAXMINDDB MAXMINDDB_DESC= Enable GeoIP1 + GeoIP2 Support MAXMINDDB_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb .include .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000 CONFIGURE_ARGS+=--without-hardening CFLAGS+= -fstack-protector-strong -fexceptions -ftrapv LDFLAGS+= -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack .endif post-patch: @${REINPLACE_CMD} -e 's|$${localstatedir}/lib/$${PACKAGE_NAME}|/var/db/${PORTNAME}|g' \ ${WRKSRC}/configure post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdnsd/geoip \ ${STAGEDIR}${PREFIX}/etc/gdnsd/zones \ ${STAGEDIR}/var/run/gdnsd .include diff --git a/dns/gdnsd3/files/gdnsd.in b/dns/gdnsd3/files/gdnsd.in index 643779a25887..088edc85a554 100644 --- a/dns/gdnsd3/files/gdnsd.in +++ b/dns/gdnsd3/files/gdnsd.in @@ -1,69 +1,69 @@ #!/bin/sh # 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_user:="gdnsd"} : ${gdnsd_group:="gdnsd"} : ${gdnsd_flags:=""} command="%%PREFIX%%/sbin/gdnsd" command_args="daemonize" procname=${command} start_precmd="gdnsd_prestart" restart_precmd="gdnsd_checkconf" restart_cmd="gdnsd_restart" reload_cmd="gdnsd_reload" reload_precmd="gdnsd_checkconf" stats_cmd="gdnsd_stats" configtest_cmd="gdnsd_checkconf" extra_commands="stats reload configtest" gdnsd_prestart() { if ! kldstat -q -m mac_portacl; then warn "mac_portacl module not loaded, please review pkg-message" fi install -d -o ${gdnsd_user} -g ${gdnsd_group} -m 700 /var/run/gdnsd } gdnsd_reload() { - gdnsdctl reload-zones + %%PREFIX%%/bin/gdnsdctl reload-zones } gdnsd_restart() { - gdnsdctl replace + %%PREFIX%%/bin/gdnsdctl replace } gdnsd_checkconf() { ${command} ${gdnsd_flags} checkconf } gdnsd_stats() { - gdnsdctl stats + %%PREFIX%%/bin/gdnsdctl stats } run_rc_command "$1"