aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2012-06-26 17:44:28 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2012-06-26 17:44:28 +0000
commit5db8b1dfe14cb2998ea93c03e401b9961a15bc28 (patch)
tree529ac2d0b9c0cacab7dfabc91a3e5d1d7514bbf3
parentb9eaf394330b28c95aff1aed37c4e9c7269123a4 (diff)
downloadports-5db8b1dfe14cb2998ea93c03e401b9961a15bc28.tar.gz
ports-5db8b1dfe14cb2998ea93c03e401b9961a15bc28.zip
Notes
-rw-r--r--dns/unbound/Makefile73
-rw-r--r--dns/unbound/files/pkg-deinstall.in21
-rw-r--r--dns/unbound/files/pkg-install.in17
-rw-r--r--dns/unbound/files/pkg-message.in10
-rw-r--r--dns/unbound/pkg-descr8
-rw-r--r--dns/unbound/pkg-plist17
6 files changed, 78 insertions, 68 deletions
diff --git a/dns/unbound/Makefile b/dns/unbound/Makefile
index 8d0191aa3aaf..da0f7abf7750 100644
--- a/dns/unbound/Makefile
+++ b/dns/unbound/Makefile
@@ -13,10 +13,13 @@ MASTER_SITES= http://unbound.net/downloads/
MAINTAINER= sem@FreeBSD.org
COMMENT= A validating, recursive, and caching DNS resolver
+LICENSE= BSD
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
USE_GMAKE= yes
USE_OPENSSL= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE}
+CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE}
USE_LDCONFIG= yes
USERS= ${PORTNAME}
@@ -32,51 +35,61 @@ PORTDOCS= CREDITS Changelog FEATURES LICENSE README README.svn \
README.tests TODO control_proto_spec.txt ietf67-design-02.odp \
ietf67-design-02.pdf requirements.txt
SUB_FILES= pkg-install pkg-deinstall
-PLIST_SUB+= PYTHON=${PYTHON}
+PLIST_SUB+= PYTHON=${PYTHON} MUNIN=${MUNIN}
+
+OPTIONS_DEFINE= LIBEVENT THREADS PYTHON GOST ECDSA
+OPTIONS_DEFAULT=THREADS ECDSA
-OPTIONS= LIBEVENT "is useful when using many (10000) outgoing ports" off \
- THREADS "build with threads support" on \
- PYTHON "build python bindings" off \
- GOST "build GOST support (requires OpenSSL from ports)" off \
- ECDSA "build ECDSA (ecliptic curve) support" on
+LIBEVENT_DESC= Enable whenever using many (10000) outgoing ports
+GOST_DESC= Enable GOST support (requires OpenSSL from ports)
+ECDSA_DESC= Enable ECDSA (elliptic curve) support
.include <bsd.port.options.mk>
-LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 \
+LIB_DEPENDS+= expat:${PORTSDIR}/textproc/expat2 \
ldns:${PORTSDIR}/dns/ldns
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
USE_PYTHON= yes
-CONFIGURE_ARGS+= --with-pyunbound=yes --with-pythonmodule=yes
-BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig13
+CONFIGURE_ARGS+=--with-pyunbound=yes --with-pythonmodule=yes
+BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig13
PYTHON=
.else
PYTHON= "@comment "
.endif
-.if defined(WITH_GOST)
+.if ${PORT_OPTIONS:MGOST}
WITH_OPENSSL_PORT= yes
DEPENDS_ARGS+= WITH_GOST=yes
.else
-CONFIGURE_ARGS+= --disable-gost
+CONFIGURE_ARGS+=--disable-gost
.endif
-.if defined(WITH_GOST)
-WITH_OPENSSL_PORT= yes
+.if ${PORT_OPTIONS:MECDSA}
+WITH_OPENSSL_PORT=yes
DEPENDS_ARGS+= WITH_ECDSA=yes
.else
-CONFIGURE_ARGS+= --disable-ecdsa
+CONFIGURE_ARGS+=--disable-ecdsa
+.endif
+
+.if ${PORT_OPTIONS:MMUNIN}
+SUB_FILES+= pkg-message
+MUNIN_ALL= hits queue memory by_type by_class by_opcode by_rcode \
+ by_flags histogram
+MUNIN=
+.else
+MUNIN= "@comment "
.endif
-.if defined(WITH_LIBEVENT)
-LIB_DEPENDS+= event-1.4:${PORTSDIR}/devel/libevent
-CONFIGURE_ARGS+= --with-libevent=${LOCALBASE}
+.if ${PORT_OPTIONS:MLIBEVENT}
+LIB_DEPENDS+= event-1:${PORTSDIR}/devel/libevent
+CONFIGURE_ARGS+=--with-libevent=${LOCALBASE}
.else
-CONFIGURE_ARGS+= --with-libevent=no
+CONFIGURE_ARGS+=--with-libevent=no
.endif
-.if !defined(WITH_THREADS)
-CONFIGURE_ARGS+= --without-pthreads
+.if empty(${PORT_OPTIONS:MTHREADS})
+CONFIGURE_ARGS+=--without-pthreads
.endif
post-patch:
@@ -84,7 +97,21 @@ post-patch:
@${RM} ${WRKSRC}/util/configlexer.c
post-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CHOWN} ${USERS} ${ETCDIR}
+.if ${PORT_OPTIONS:MMUNIN}
+ @${MKDIR} ${PREFIX}/share/munin/plugins
+ @${MKDIR} ${PREFIX}/etc/munin/plugins
+ @${INSTALL_DATA} ${WRKDIR}/unbound-${PORTVERSION}/contrib/unbound_munin_\
+ ${PREFIX}/share/munin/plugins/
+ @for i in ${MUNIN_ALL}; do\
+ ${LN} -fs ${PREFIX}/share/munin/plugins/unbound_munin_\
+ ${PREFIX}/etc/munin/plugins/unbound_munin_$$i ;\
+ done
+ @${ECHO_MSG}
+ @${ECHO_MSG} "============================================================="
+ @${CAT} ${WRKDIR}/pkg-message
+ @${ECHO_MSG} "============================================================="
+.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}; \
for f in ${PORTDOCS}; do \
diff --git a/dns/unbound/files/pkg-deinstall.in b/dns/unbound/files/pkg-deinstall.in
deleted file mode 100644
index e87de8336272..000000000000
--- a/dns/unbound/files/pkg-deinstall.in
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-case $2 in
-POST-DEINSTALL)
- echo "===> post-deinstallation information for $1:"
- echo ""
- echo " Note:"
- echo " Unbound related user account were not removed."
- echo ""
- echo " To remove the 'unbound' user which were created by"
- echo " a default installation of this package, run"
- echo ""
- echo " pw userdel -n unbound"
- ;;
-*)
- ;;
-esac
-exit 0
diff --git a/dns/unbound/files/pkg-install.in b/dns/unbound/files/pkg-install.in
deleted file mode 100644
index 5a5c026be37e..000000000000
--- a/dns/unbound/files/pkg-install.in
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PW=/usr/sbin/pw
-USER="unbound"
-PREFIX="%%PREFIX%%"
-
-case $2 in
-POST-INSTALL)
- chown "${USER}" $PREFIX/etc/unbound
- ;;
-*)
-;;
-esac
-exit 0
diff --git a/dns/unbound/files/pkg-message.in b/dns/unbound/files/pkg-message.in
new file mode 100644
index 000000000000..eba979e3b205
--- /dev/null
+++ b/dns/unbound/files/pkg-message.in
@@ -0,0 +1,10 @@
+Munin support requires additional configuration in the plugin config file:
+%%PREFIX%%/etc/munin/plugin-conf.d/plugins.conf
+
+[unbound*]
+user root
+env.statefile %%PREFIX%%/var/munin/plugin-state/unbound-state
+env.unbound_conf %%PREFIX%%/etc/unbound/unbound.conf
+env.unbound_control %%PREFIX%%/sbin/unbound-control
+env.spoof_warn 1000
+env.spoof_crit 100000
diff --git a/dns/unbound/pkg-descr b/dns/unbound/pkg-descr
index ff5836dfa401..156f56520d7b 100644
--- a/dns/unbound/pkg-descr
+++ b/dns/unbound/pkg-descr
@@ -8,12 +8,8 @@ Goals:
* Drop-in replacement for BIND apart from config.
* DNSSEC support.
* Fully RFC compliant.
- * High performance
- o even with validation.
- * Used as
- o stub resolver.
- o full caching name server.
- o resolver library.
+ * High performance, even with validation enabled.
+ * Used as: stub resolver, full caching name server, resolver library.
* Elegant design of validator, resolver, cache modules.
o provide the ability to pick and choose modules.
* Robust.
diff --git a/dns/unbound/pkg-plist b/dns/unbound/pkg-plist
index 4b44cd366356..99a4cbb8bc55 100644
--- a/dns/unbound/pkg-plist
+++ b/dns/unbound/pkg-plist
@@ -16,5 +16,20 @@ sbin/unbound-host
%%PYTHON%%%%PYTHON_SITELIBDIR%%/_unbound.so.3
%%PYTHON%%%%PYTHON_SITELIBDIR%%/unbound.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/unboundmodule.py
+%%MUNIN%%etc/munin/plugins/unbound_munin_by_class
+%%MUNIN%%etc/munin/plugins/unbound_munin_by_flags
+%%MUNIN%%etc/munin/plugins/unbound_munin_by_opcode
+%%MUNIN%%etc/munin/plugins/unbound_munin_by_rcode
+%%MUNIN%%etc/munin/plugins/unbound_munin_by_type
+%%MUNIN%%etc/munin/plugins/unbound_munin_histogram
+%%MUNIN%%etc/munin/plugins/unbound_munin_hits
+%%MUNIN%%etc/munin/plugins/unbound_munin_memory
+%%MUNIN%%etc/munin/plugins/unbound_munin_queue
+%%MUNIN%%share/munin/plugins/unbound_munin_
+%%MUNIN%%@dirrmtry etc/munin/plugins
+%%MUNIN%%@dirrmtry etc/munin
+%%MUNIN%%@dirrmtry share/munin/plugins
+%%MUNIN%%@dirrmtry share/munin
@dirrmtry etc/unbound
-@dirrmtry /var/run/unbound
+@unexec rm -fr /var/run/unbound
+@exec chown unbound %D/etc/unbound