Index: head/dns/knot2/Makefile =================================================================== --- head/dns/knot2/Makefile (revision 416498) +++ head/dns/knot2/Makefile (revision 416499) @@ -1,79 +1,80 @@ # Created by: Leo Vandewoestijne # $FreeBSD$ PORTNAME= knot PORTVERSION= 2.2.1 +PORTREVISION?= 1 CATEGORIES= dns ipv6 MASTER_SITES= https://secure.nic.cz/files/knot-dns/ \ http://dns-lab.com/downloads/knot-dns/ PKGNAMESUFFIX= 2 MAINTAINER= freebsd@dns-lab.com COMMENT= High performance authoritative-only DNS server LICENSE= GPLv3 LIB_DEPENDS= libfstrm.so:devel/fstrm \ libgnutls.so:security/gnutls \ libjansson.so:devel/jansson \ liblmdb.so:databases/lmdb \ libnettle.so:security/nettle \ liburcu.so:sysutils/liburcu CONFLICTS= knot-1.* knot1-[0-6].* USES= alias libedit libtool pkgconfig tar:xz USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-rundir=/var/run/knot \ --with-storage=/var/db/knot \ --with-pkgconfigdir=${PREFIX}/libdata/pkgconfig .if defined(BATCH) || defined(PACKAGE_BUILDING) CONFIGURE_ARGS+= --disable-silent-rules .endif INSTALL_TARGET= install-strip USE_RC_SUBR= ${PORTNAME} SUB_FILES= pkg-message USERS= knot GROUPS= knot SUB_LIST+= USERS="${USERS}" GROUPS="${GROUPS}" PORTDOCS= AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS OPTIONS_DEFINE= DNSTAP FASTPARSER IDN DNSTAP_DESC= dnstap support (see dnstap.info) DNSTAP_CONFIGURE_ENABLE= dnstap DNSTAP_LIB_DEPENDS= libprotobuf-c.so:devel/protobuf-c # XXX: because `kdig_CPPFLAGS += $(DNSTAP_CFLAGS)' line is missing from # `src/Makefile.am' file (and thus pre-generated `src/Makefile.in') which # should contain "$libfstrm_CFLAGS $libprotobuf_c_CFLAGS" set by configure # script, provide it here explicitly as patching those files would result # in higher line count. Ideally this bug should be fixed upstream. DNSTAP_CPPFLAGS= -I${LOCALBASE}/include FASTPARSER_DESC= Fast zone parser (demanding compilation) FASTPARSER_CONFIGURE_ENABLE= fastparser IDN_CONFIGURE_WITH= libidn IDN_LIB_DEPENDS= libidn.so:dns/libidn post-patch: @${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|' \ ${WRKSRC}/src/Makefile.in @${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|' \ ${WRKSRC}/src/Makefile.in @${RM} -rf ${WRKSRC}/src/zscanner/scanner.c post-install: ${MV} ${STAGEDIR}${ETCDIR}/knot.sample.conf \ ${STAGEDIR}${ETCDIR}/knot.conf.sample @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ .include Index: head/dns/knot2/files/knot.in =================================================================== --- head/dns/knot2/files/knot.in (revision 416498) +++ head/dns/knot2/files/knot.in (revision 416499) @@ -1,102 +1,102 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: knot # REQUIRE: SERVERS cleanvar # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable knot: # # knot_enable="YES": Set to NO by default. # Set it to YES to enable knot. # knot_config="": Set to %%PREFIX%%/etc/knot/knot.conf # by default. # # ----------------------------------------------------------------------------- # # This script supports running multiple instances of knot. # To run additional instances link this script to something like # % ln -s knot knot_foo # and define additional knot_foo_* variables in one of # /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/knot_foo # # Below NAME should be substituted with the name of this script. By default # it is knot, so read as knot_enable. If you linked the script to # knot_foo, then read as knot_foo_enable etc. # # The following variables are supported (defaults are shown). # You can place them in any of # /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME # # NAME_enable="NO" # set to YES to enable knot # # # optional: # NAME_config="%%PREFIX%%/etc/knot/NAME.conf" # (-c)onfig file # NAME_diruser="%%USERS%%" # /var/db/NAME and /var/run/NAME are created if they # NAME_dirgroup="%%GROUPS%%" # don't exist. These don't control the user/group knot # # runs as, the config file has a setting for that. # # You also need to set the rundir directive in the server section of the # config file to /var/run/NAME (if using a NAME other than the default) # and you will want the storage directive(s) declared in the zone section # to point to /var/db/NAME overriding the default of /var/db/knot. # # For further documentation, please see knot.conf(5). . /etc/rc.subr case "$0" in /etc/rc*) # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), # so get the name of the script from $_file name="$_file" ;; *) name="$0" ;; esac name="${name##*/}" rcvar=${name}_enable load_rc_config ${name} eval ": \${${name}_enable:=\"NO\"}" eval ": \${${name}_diruser:=\"%%USERS%%\"}" eval ": \${${name}_dirgroup:=\"%%GROUPS%%\"}" eval ": \${${name}_config:=\"%%PREFIX%%/etc/knot/${name}.conf\"}" configfile="$(eval echo \${${name}_config})" diruser="$(eval echo \${${name}_diruser})" dirgroup="$(eval echo \${${name}_dirgroup})" command=%%PREFIX%%/sbin/knotd command_args="-c ${configfile} -d" control=%%PREFIX%%/sbin/knotc pidfile=/var/run/${name}/knot.pid required_files=${configfile} extra_commands=reload reload_cmd="knot_reload" start_precmd="knot_prestart" knot_prestart() { if [ ! -d /var/run/${name} ]; then install -d -o ${diruser} -g ${dirgroup} /var/run/${name} fi if [ ! -d /var/db/${name} ]; then install -d -o ${diruser} -g ${dirgroup} /var/db/${name} fi - ${control} -c ${configfile} checkconf + ${control} -c ${configfile} conf-check } knot_reload() { echo "Reloading ${name}." ${control} -c ${configfile} reload } run_rc_command "$1"