pkgsrc/net/unbound/Makefile
he a31868b633 Upgrade unbound to version 1.6.5.
Upstream changes:
  21 Aug 2017: Wouter
    - Fix install of trust anchor when two anchors are present, makes both
      valid.  Checks hash of DS but not signature of new key.  This fixes
      installs between sep11 and oct11 2017.
    - Tag 1.6.5
2017-08-21 11:14:18 +00:00

101 lines
3.5 KiB
Makefile

# $NetBSD: Makefile,v 1.50 2017/08/21 11:14:18 he Exp $
DISTNAME= unbound-1.6.5
CATEGORIES= net
MASTER_SITES= http://www.unbound.net/downloads/
MAINTAINER= pettai@NetBSD.org
HOMEPAGE= http://www.unbound.net/
COMMENT= DNS resolver and recursive server
LICENSE= modified-bsd
BUILD_DEFS+= VARBASE UNBOUND_USER UNBOUND_GROUP
FILES_SUBST+= UNBOUND_USER=${UNBOUND_USER} UNBOUND_GROUP=${UNBOUND_GROUP}
USE_LIBTOOL= yes
CONFIGURE_ARGS+= --enable-allsymbols
CONFIGURE_ARGS+= --with-libexpat=${BUILDLINK_PREFIX.expat}
CONFIGURE_ARGS+= --with-libevent=${BUILDLINK_PREFIX.libevent}
CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+= --with-pidfile=${VARBASE}/run/unbound/unbound.pid
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE}
GNU_CONFIGURE= yes
TEST_TARGET= test
# unbound uses some OpenBSD libc functions such as reallocarray(3).
# The existing tests just look for the symbol in libc regardless
# of anything in stdlib.h
CPPFLAGS.NetBSD+= -D_OPENBSD_SOURCE
# Add the same logic as for ldns, so sha2/gost is configured automatically
CHECK_BUILTIN.openssl= yes
.include "../../security/openssl/builtin.mk"
CHECK_BUILTIN.openssl= no
.include "../../security/openssl/buildlink3.mk"
PLIST_VARS+= sha2 gost
.if defined(USE_BUILTIN.openssl) && !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
PLIST_VARS.gost!= \
if ${PKG_ADMIN} pmatch 'openssl>=1.0.0' ${BUILTIN_PKG.openssl}; then \
${ECHO} "yes"; \
else \
${ECHO} "no"; \
fi
PLIST_VARS.sha2!= \
if ${PKG_ADMIN} pmatch 'openssl>=0.9.8' ${BUILTIN_PKG.openssl}; then \
${ECHO} "yes"; \
else \
${ECHO} "no"; \
fi
.else
PLIST_VARS.gost!= \
if ${PKG_INFO} -qe 'openssl>=1.0.0'; then \
${ECHO} yes; \
else \
${ECHO} no; \
fi
PLIST_VARS.sha2!= \
if ${PKG_INFO} -qe 'openssl>=0.9.8'; then \
${ECHO} yes; \
else \
${ECHO} no; \
fi
.endif
.if ${PLIST_VARS.gost} == "yes"
CONFIGURE_ARGS+= --enable-gost
.else
CONFIGURE_ARGS+= --disable-gost
.endif
.if ${PLIST_VARS.sha2} == "yes"
CONFIGURE_ARGS+= --enable-sha2
.else
CONFIGURE_ARGS+= --disable-sha2
.endif
SUBST_CLASSES+= paths
SUBST_STAGE.paths= post-configure
SUBST_MESSAGE.paths= Fixing path names
SUBST_FILES.paths= doc/example.conf doc/*.5 doc/*.8
SUBST_SED.paths= -e "s|/usr/local|${PREFIX}|"
INSTALL_MAKE_FLAGS+= \
configfile=${PREFIX}/share/examples/unbound/unbound.conf
PKG_SYSCONFSUBDIR= unbound
CONF_FILES+= share/examples/unbound/unbound.conf \
${PKG_SYSCONFDIR}/unbound.conf
RCD_SCRIPTS= unbound
SMF_METHODS= unbound
SMF_NAME= unbound
UNBOUND_USER?= unbound
UNBOUND_GROUP?= unbound
PKG_GROUPS= ${UNBOUND_GROUP}
PKG_USERS= ${UNBOUND_USER}:${UNBOUND_GROUP}
.include "../../devel/libevent/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"