Makefile 2.6 KB
Newer Older
Kurt Jaeger's avatar
Kurt Jaeger committed
1
2
3
# Created by: Carlos J Puga Medina <cpm@fbsd.es>

PORTNAME=	dnsdist
4
DISTVERSION=	1.7.0
Kurt Jaeger's avatar
Kurt Jaeger committed
5
CATEGORIES=	dns net
6
MASTER_SITES=	https://downloads.powerdns.com/releases/
Kurt Jaeger's avatar
Kurt Jaeger committed
7

8
MAINTAINER=	tremere@cainites.net
9
COMMENT=	Highly DNS-, DoS- and abuse-aware loadbalancer
Kurt Jaeger's avatar
Kurt Jaeger committed
10

11
LICENSE=	GPLv2 ISCL MIT
12
LICENSE_COMB=	multi
Dmitry Marakasov's avatar
Dmitry Marakasov committed
13
LICENSE_FILE_GPLv2=	${WRKSRC}/COPYING
14
15
LICENSE_FILE_ISCL=	${WRKSRC}/ext/ipcrypt/LICENSE
LICENSE_FILE_MIT=	${WRKSRC}/ext/yahttp/LICENSE
Kurt Jaeger's avatar
Kurt Jaeger committed
16

17
18
19
NOT_FOR_ARCHS=	i386
NOT_FOR_ARCHS_REASON=	archs with 32-bits time_t are no longer supported by upstream

20
21
BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops
LIB_DEPENDS=	libboost_serialization.so:devel/boost-libs \
22
		libh2o-evloop.so:www/h2o \
Carlos J. Puga Medina's avatar
Carlos J. Puga Medina committed
23
		libre2.so:devel/re2 \
24
		libsodium.so:security/libsodium
Kurt Jaeger's avatar
Kurt Jaeger committed
25

26
27
USES=		bison:alias compiler:c++14-lang cpe gmake libedit libtool \
		localbase pkgconfig tar:bz2
28
29
USE_RC_SUBR=	dnsdist

30
31
CPE_VENDOR=	powerdns

32
GNU_CONFIGURE=	yes
Carlos J. Puga Medina's avatar
Carlos J. Puga Medina committed
33
CONFIGURE_ARGS=	--bindir=${PREFIX}/sbin \
34
		--enable-dns-over-https \
35
		--enable-dns-over-tls \
Carlos J. Puga Medina's avatar
Carlos J. Puga Medina committed
36
		--enable-dnscrypt \
37
38
39
		--sysconfdir=${ETCDIR} \
		--with-libsodium \
		--with-re2
Carlos J. Puga Medina's avatar
Carlos J. Puga Medina committed
40

Kurt Jaeger's avatar
Kurt Jaeger committed
41
42
INSTALL_TARGET=	install-strip

43
44
45
USERS=		_dnsdist
GROUPS=		_dnsdist

46
47
48
49
OPTIONS_DEFINE=		DNSTAP SNMP
OPTIONS_DEFAULT=	CDB GNUTLS LMDB LUA OPENSSL
OPTIONS_GROUP=		KSVOPT
OPTIONS_GROUP_KSVOPT=	CDB LMDB
50
51
OPTIONS_MULTI=		TLS
OPTIONS_MULTI_TLS=	GNUTLS OPENSSL
52
53
OPTIONS_SINGLE=		EXTLUA
OPTIONS_SINGLE_EXTLUA=	LUA LUAJIT LUAJITOR
54

55
CDB_DESC=	CDB backend
56
DNSTAP_DESC=	dnstap support (see dnstap.info)
57
58
59
60
61
62
63
64
65
KSVOPT_DESC=	Key Value Stores
LMDB_DESC=	LMDB backend
LUAJITOR_DESC=	Use lang/luajit-openresty
LUAJIT_DESC=	Use lang/luajit
LUA_DESC=	Use lang/lua

CDB_LIB_DEPENDS=	libcdb.so:databases/tinycdb
CDB_CONFIGURE_ON=	CDB_CFLAGS="-I${LOCALBASE}/include" \
			CDB_LIBS="-L${LOCALBASE}/lib -lcdb"
66

67
DNSTAP_LIB_DEPENDS=		libfstrm.so:devel/fstrm
68
DNSTAP_CONFIGURE_ENABLE=	dnstap
69

70
71
GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
GNUTLS_CONFIGURE_WITH=	gnutls
72

73
74
75
76
77
78
79
80
LMDB_LIB_DEPENDS=	liblmdb.so:databases/lmdb
LMDB_CONFIGURE_ON=	--with-lmdb=${LOCALBASE}
LMDB_CONFIGURE_OFF=	--without-lmdb

LUAJITOR_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit-openresty
LUAJITOR_CONFIGURE_ON=	--with-lua=luajit

LUAJIT_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
81
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
82

83
84
85
LUA_USES=		lua
LUA_CONFIGURE_ON=	--with-lua=lua-${LUA_VER}

86
OPENSSL_USES=		ssl
87
88
89
OPENSSL_CONFIGURE_ON=	LIBSSL_CFLAGS=-I${OPENSSLINC} \
			LIBSSL_LIBS="-L${OPENSSLLIB} -lssl"
OPENSSL_CONFIGURE_WITH=	libssl
90
91
92
93

SNMP_LIB_DEPENDS=	libnetsnmp.so:net-mgmt/net-snmp
SNMP_CONFIGURE_WITH=	net-snmp

94
post-install:
95
96
	@${MKDIR} ${STAGEDIR}${ETCDIR}
	${INSTALL_DATA} ${FILESDIR}/dnsdist.conf.sample ${STAGEDIR}${ETCDIR}
Kurt Jaeger's avatar
Kurt Jaeger committed
97

98
.include <bsd.port.mk>