2013-09-05 16:37:34 +02:00
|
|
|
# Created by: Sergey Matveychuk <sem@FreeBSD.org>
|
2008-04-29 09:35:14 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= unbound
|
2015-10-11 14:58:34 +02:00
|
|
|
PORTVERSION= 1.5.5
|
2008-04-29 09:35:14 +02:00
|
|
|
CATEGORIES= dns
|
|
|
|
MASTER_SITES= http://unbound.net/downloads/
|
|
|
|
|
|
|
|
MAINTAINER= sem@FreeBSD.org
|
2014-06-10 09:39:01 +02:00
|
|
|
COMMENT= Validating, recursive, and caching DNS resolver
|
2008-04-29 09:35:14 +02:00
|
|
|
|
2015-05-13 06:55:03 +02:00
|
|
|
LICENSE= BSD3CLAUSE
|
2012-06-26 19:44:28 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
2015-08-19 17:49:42 +02:00
|
|
|
USES+= autoreconf cpe gmake libtool
|
2015-05-13 06:55:03 +02:00
|
|
|
CPE_VENDOR= nlnetlabs
|
2008-06-16 23:31:38 +02:00
|
|
|
USE_OPENSSL= yes
|
2008-04-29 09:35:14 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2014-03-04 16:51:44 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE} --with-libexpat=${LOCALBASE}
|
2008-04-29 10:00:03 +02:00
|
|
|
USE_LDCONFIG= yes
|
2008-04-29 09:35:14 +02:00
|
|
|
|
2011-07-09 18:30:19 +02:00
|
|
|
USERS= ${PORTNAME}
|
2013-10-03 13:02:37 +02:00
|
|
|
GROUPS= ${PORTNAME}
|
2011-07-09 18:30:19 +02:00
|
|
|
|
2008-04-29 09:35:14 +02:00
|
|
|
USE_RC_SUBR= unbound
|
|
|
|
|
2008-06-16 23:31:38 +02:00
|
|
|
PORTDOCS= CREDITS Changelog FEATURES LICENSE README README.svn \
|
2008-11-19 21:59:31 +01:00
|
|
|
README.tests TODO control_proto_spec.txt ietf67-design-02.odp \
|
|
|
|
ietf67-design-02.pdf requirements.txt
|
2012-06-26 19:44:28 +02:00
|
|
|
PLIST_SUB+= PYTHON=${PYTHON} MUNIN=${MUNIN}
|
|
|
|
|
2015-08-19 17:49:42 +02:00
|
|
|
OPTIONS_DEFINE= THREADS PYTHON GOST ECDSA MUNIN DOCS LIBEVENT FILTER_AAAA
|
2012-06-26 19:44:28 +02:00
|
|
|
OPTIONS_DEFAULT=THREADS ECDSA
|
2008-04-29 09:35:14 +02:00
|
|
|
|
2014-12-05 19:52:53 +01:00
|
|
|
LIBEVENT_DESC= Build against libevent
|
2013-09-05 16:37:34 +02:00
|
|
|
GOST_DESC= Enable GOST support (requires OpenSSL >= 1.0)
|
|
|
|
ECDSA_DESC= Enable ECDSA (elliptic curve) support (OpenSSL >= 1.0)
|
2012-06-27 11:01:10 +02:00
|
|
|
MUNIN_DESC= Install Munin plugin
|
2015-08-19 17:49:42 +02:00
|
|
|
FILTER_AAAA_DESC= Build with AAAA filter functionality (contrib)
|
2009-06-16 15:35:00 +02:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2014-04-12 21:43:33 +02:00
|
|
|
LIB_DEPENDS+= libexpat.so:${PORTSDIR}/textproc/expat2 \
|
|
|
|
libldns.so:${PORTSDIR}/dns/ldns
|
|
|
|
|
2014-08-22 11:06:34 +02:00
|
|
|
STRIP_FILES= .libs/libunbound.so unbound-checkconf unbound \
|
2014-04-12 21:43:33 +02:00
|
|
|
unbound-control .libs/unbound-host .libs/unbound-anchor
|
2010-11-09 15:09:52 +01:00
|
|
|
|
2012-06-26 19:44:28 +02:00
|
|
|
.if ${PORT_OPTIONS:MPYTHON}
|
2014-12-06 02:12:55 +01:00
|
|
|
USES+= python:2
|
2014-12-09 18:11:47 +01:00
|
|
|
CONFIGURE_ARGS+=--with-pyunbound=yes --with-pythonmodule=yes LDFLAGS="-L${LOCALBASE}/lib"
|
2012-06-26 19:44:28 +02:00
|
|
|
BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig13
|
2014-12-09 18:11:47 +01:00
|
|
|
STRIP_FILES+= .libs/_unbound.so
|
2009-06-16 15:35:00 +02:00
|
|
|
PYTHON=
|
|
|
|
.else
|
|
|
|
PYTHON= "@comment "
|
|
|
|
.endif
|
2008-04-29 09:35:14 +02:00
|
|
|
|
2012-06-26 19:44:28 +02:00
|
|
|
.if ${PORT_OPTIONS:MGOST}
|
2014-10-23 21:54:50 +02:00
|
|
|
. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000015
|
2010-11-09 15:09:52 +01:00
|
|
|
WITH_OPENSSL_PORT= yes
|
2013-09-05 16:37:34 +02:00
|
|
|
. endif
|
2012-05-24 17:02:38 +02:00
|
|
|
DEPENDS_ARGS+= WITH_GOST=yes
|
2010-11-09 15:09:52 +01:00
|
|
|
.else
|
2012-06-26 19:44:28 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-gost
|
2010-11-09 15:09:52 +01:00
|
|
|
.endif
|
|
|
|
|
2012-06-26 19:44:28 +02:00
|
|
|
.if ${PORT_OPTIONS:MECDSA}
|
2012-05-24 17:02:38 +02:00
|
|
|
DEPENDS_ARGS+= WITH_ECDSA=yes
|
|
|
|
.else
|
2012-06-26 19:44:28 +02:00
|
|
|
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 "
|
2012-05-24 17:02:38 +02:00
|
|
|
.endif
|
|
|
|
|
2014-07-24 15:32:58 +02:00
|
|
|
.if ${PORT_OPTIONS:MLIBEVENT}
|
|
|
|
LIB_DEPENDS+= libevent.so:${PORTSDIR}/devel/libevent2
|
2013-04-29 18:10:07 +02:00
|
|
|
USES+= pkgconfig
|
2014-07-24 15:32:58 +02:00
|
|
|
CONFIGURE_ARGS+=--with-libevent
|
2013-04-29 18:10:07 +02:00
|
|
|
CPPFLAGS+= $$(pkg-config libevent --cflags-only-I)
|
|
|
|
LDFLAGS+= $$(pkg-config libevent --libs-only-L)
|
2008-06-16 23:31:38 +02:00
|
|
|
.else
|
2012-06-26 19:44:28 +02:00
|
|
|
CONFIGURE_ARGS+=--with-libevent=no
|
2008-04-29 09:35:14 +02:00
|
|
|
.endif
|
|
|
|
|
2012-07-21 22:41:09 +02:00
|
|
|
.if empty(PORT_OPTIONS:MTHREADS)
|
2012-06-26 19:44:28 +02:00
|
|
|
CONFIGURE_ARGS+=--without-pthreads
|
2008-08-18 17:10:42 +02:00
|
|
|
.endif
|
|
|
|
|
2008-04-29 09:35:14 +02:00
|
|
|
post-patch:
|
2008-07-16 21:43:15 +02:00
|
|
|
@${MKDIR} ${WRKSRC}/balancer
|
|
|
|
@${RM} ${WRKSRC}/util/configlexer.c
|
2014-12-05 19:52:53 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|if test ! -e $$(DESTDIR)$$(configfile); then || ; \
|
|
|
|
s|$$(configfile); fi|$$(configfile).sample|' \
|
|
|
|
${WRKSRC}/Makefile.in
|
2015-03-16 15:47:51 +01:00
|
|
|
.if ${PORT_OPTIONS:MFILTER_AAAA}
|
2015-08-19 17:49:42 +02:00
|
|
|
${CAT} ${WRKSRC}/contrib/aaaa-filter-iterator.patch | ${PATCH} -d ${WRKSRC} -p1 -s
|
2015-03-16 15:47:51 +01:00
|
|
|
.endif
|
2008-04-29 09:35:14 +02:00
|
|
|
|
2014-04-12 21:43:33 +02:00
|
|
|
post-build:
|
|
|
|
@for s in ${STRIP_FILES}; do ${STRIP_CMD} ${WRKSRC}/$$s; done
|
|
|
|
|
2008-05-07 13:33:37 +02:00
|
|
|
post-install:
|
2015-02-19 18:55:34 +01:00
|
|
|
.if ${PORT_OPTIONS:MPYTHON}
|
|
|
|
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_unbound.so
|
|
|
|
.endif
|
2012-06-26 19:44:28 +02:00
|
|
|
.if ${PORT_OPTIONS:MMUNIN}
|
2014-03-04 16:51:44 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/share/munin/plugins
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/munin/plugins
|
2012-09-10 19:53:04 +02:00
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/unbound-${PORTVERSION}/contrib/unbound_munin_\
|
2014-03-04 16:51:44 +01:00
|
|
|
${STAGEDIR}${PREFIX}/share/munin/plugins/
|
2012-06-26 19:44:28 +02:00
|
|
|
@for i in ${MUNIN_ALL}; do\
|
|
|
|
${LN} -fs ${PREFIX}/share/munin/plugins/unbound_munin_\
|
2014-03-04 16:51:44 +01:00
|
|
|
${STAGEDIR}${PREFIX}/etc/munin/plugins/unbound_munin_$$i ;\
|
2012-06-26 19:44:28 +02:00
|
|
|
done
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "============================================================="
|
|
|
|
@${CAT} ${WRKDIR}/pkg-message
|
|
|
|
@${ECHO_MSG} "============================================================="
|
|
|
|
.endif
|
2013-09-05 16:37:34 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2014-03-04 16:51:44 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}; \
|
2008-06-16 23:31:38 +02:00
|
|
|
for f in ${PORTDOCS}; do \
|
2014-03-04 16:51:44 +01:00
|
|
|
cd ${WRKSRC}/doc && ${INSTALL_DATA} $${f} ${STAGEDIR}${DOCSDIR}/; \
|
2008-06-16 23:31:38 +02:00
|
|
|
done
|
|
|
|
.endif
|
2008-05-07 13:33:37 +02:00
|
|
|
|
2015-08-19 17:49:42 +02:00
|
|
|
regression-test: build
|
|
|
|
cd ${WRKSRC} && ${MAKE} test
|
|
|
|
|
2011-11-07 05:24:55 +01:00
|
|
|
.include <bsd.port.mk>
|