blob: eb6a9d77c31a1bafa2e802e93df84f1d3381b5fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
# $FreeBSD$
PORTNAME= powerdns
PORTVERSION= 3.3.1
PORTREVISION?= 1
CATEGORIES= dns ipv6
MASTER_SITES= http://downloads.powerdns.com/releases/
DISTNAME= pdns-${PORTVERSION}
MAINTAINER= tremere@cainites.net
COMMENT= Advanced DNS server with multiple backends including SQL
LICENSE= GPLv2
LIB_DEPENDS= libboost_serialization.so:${PORTSDIR}/devel/boost-libs
CONFLICTS= powerdns-devel-[2-3].[0-9]*
USES= gmake lua:51 pkgconfig
USE_SUBMAKE= YES
USE_AUTOTOOLS= libtool
USE_LDCONFIG= YES
CXXFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --with-modules="" \
--with-dynmodules="pipe ${MODULES}" \
--sysconfdir="${PREFIX}/etc/pdns" \
--with-boost="${LOCALBASE}"
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
CURDIR2="${.CURDIR}" \
MKDIR="${MKDIR}" \
DISTNAME="${DISTNAME}" \
POWERDNS_OPTIONS="${POWERDNS_OPTIONS}"
SUB_FILES= pkg-message
USE_RC_SUBR= pdns
OPTIONS_DEFINE= GEO MYSQL MYSQL_LOCAL OPENDBX OPENLDAP OPENLDAP_LOCAL \
PGSQL PGSQL_LOCAL POLARSSL SQLITE3 TOOLS
OPTIONS_GROUP= DNSSEC EXPERIMENTAL
OPTIONS_GROUP_DNSSEC= BOTAN110 CRYPTOPP
OPTIONS_GROUP_EXPERIMENTAL= LUA MYDNS REMOTE REMOTE_HTTP TINYDNS
PGSQL_DESC= PostgreSQL backend
PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server
MYSQL_DESC= MySQL backend
MYSQL_LOCAL_DESC= RUN_DEPEND on MySQL server
OPENDBX_DESC= OpenDBX backend
OPENLDAP_DESC= OpenLDAP backend
OPENLDAP_LOCAL_DESC= RUN_DEPEND on OpenLDAP server
SQLITE3_DESC= SQLite 3 backend
GEO_DESC= Geo backend
DNSSEC_DESC= Extra DNSSEC options
BOTAN110_DESC= Faster signing + ECDSA & GOST algorithms
CRYPTOPP_DESC= ECDSA algorithms
POLARSSL_DESC= Use embedded PolarSSL
LUA_DESC= Lua backend
MYDNS_DESC= MyDNS backend
REMOTE_DESC= Remote backend
REMOTE_HTTP_DESC= Enable HTTP for the Remote backed
TINYDNS_DESC= TinyDNS backend
TOOLS_DESC= Build extra tools
OPTIONS_DEFAULT= PGSQL DNSSEC BOTAN110 POLARSSL
OPTIONS_SUB= yes
# Don't use CONFIGURE_ENABLE, the configure script
# has a bug. The options are being enabled even using --disable-
TOOLS_CONFIGURE_ON= --enable-tools
PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE}
PGSQL_CONFIGURE_OFF= --without-pgsql
PGSQL_USE= PGSQL=YES
PGSQL_LOCAL_USE= PGSQL=server
MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE}
MYSQL_CONFIGURE_OFF= --without-mysql
MYSQL_USE= MYSQL=YES
MYSQL_LOCAL_USE= MYSQL=server
MYDNS_CONFIGURE_ON= --with-mysql=${LOCALBASE}
MYDNS_USE= MYSQL=YES
MYDNS_LOCAL_USE= MYSQL=server
OPENLDAP_CXXFLAGS= -DLDAP_DEPRECATED=1
OPENLDAP_USE= OPENLDAP=YES
OPENLDAP_LOCAL_RUN_DEPENDS= openldap-server>=0:${PORTSDIR}/net/openldap24-server
REMOTE_HTTP_CONFIGURE_ON= --enable-remotebackend-http
REMOTE_HTTP_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
CRYPTOPP_CONFIGURE_ON= --enable-cryptopp
SQLITE3_USE= SQLITE=3
OPENDBX_LIB_DEPENDS= libopendbx.so:${PORTSDIR}/databases/opendbx
BOTAN110_CONFIGURE_ON= --enable-botan1.10
BOTAN110_LIB_DEPENDS= libbotan-1.10.so:${PORTSDIR}/security/botan110
TINYDNS_LIB_DEPENDS= libcdb.so:${PORTSDIR}/databases/tinycdb
TINYDNS_CONFIGURE_ON= CDB_LIBS="-L${LOCALBASE}/lib -lcdb" CDB_CFLAGS="-I${LOCALBASE}/include"
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGEO}
MODULES+= geo
.endif
.if ${PORT_OPTIONS:MPGSQL}
MODULES+= gpgsql
.endif
.if ${PORT_OPTIONS:MMYSQL}
MODULES+= gmysql
.endif
.if ${PORT_OPTIONS:MPGSQL_LOCAL}
SUB_LIST+= PGSQL_REQ=postgresql
.else
SUB_LIST+= PGSQL_REQ=
.endif
.if ${PORT_OPTIONS:MMYSQL_LOCAL}
SUB_LIST+= MYSQL_REQ=mysql
.else
SUB_LIST+= MYSQL_REQ=
.endif
.if ${PORT_OPTIONS:MOPENLDAP}
MODULES+= ldap
.endif
.if ${PORT_OPTIONS:MOPENLDAP_LOCAL}
SUB_LIST+= SLAPD_REQ=slapd
.else
SUB_LIST+= SLAPD_REQ=
.endif
.if ${PORT_OPTIONS:MSQLITE3}
MODULES+= gsqlite3
.endif
.if ${PORT_OPTIONS:MLUA}
MODULES+= lua
.endif
.if ${PORT_OPTIONS:MMYDNS}
MODULES+= mydns
.endif
.if ${PORT_OPTIONS:MREMOTE}
MODULES+= remote
.endif
.if ${PORT_OPTIONS:MTINYDNS}
MODULES+= tinydns
.endif
.if ${PORT_OPTIONS:MOPENDBX}
MODULES+= opendbx
.endif
.if ${PORT_OPTIONS:MCRYPTOPP}
. if exists(${LOCALBASE}/lib/libcryptopp.so)
LIB_DEPENDS+= libcryptopp.so:${PORTSDIR}/security/cryptopp
. else
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcryptopp.a:${PORTSDIR}/security/cryptopp
. endif
.endif
.if ${PORT_OPTIONS:MPOLARSSL}
CONFIGURE_ARGS+= --without-system-polarssl
.else
LIB_DEPENDS+= libpolarssl.so:${PORTSDIR}/security/polarssl
.endif
post-patch:
.if ${PORT_OPTIONS:MOPENLDAP}
@${REINPLACE_CMD} -e 's;-I. ;-I. -I${LOCALBASE}/include ;' \
-e 's;la_LDFLAGS =;la_LDFLAGS = -L${LOCALBASE}/lib;' \
${WRKSRC}/modules/ldapbackend/Makefile.in
@${REINPLACE_CMD} -e 's;@LIBDL@;@LIBDL@ -L${LOCALBASE}/lib;' \
-e 's;@modulelibs@;@modulelibs@ -llber;' \
${WRKSRC}/pdns/Makefile.in
.endif
.if ${PORT_OPTIONS:MPGSQL}
@${REINPLACE_CMD} -E -e 's;(PGSQL_inc_check="\$$withval/include/pgsql)";\1 \$$withval/include";' \
${WRKSRC}/configure
.endif
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for i in pdns.conf
${INSTALL_DATA} ${FILESDIR}/$i ${STAGEDIR}${EXAMPLESDIR}/
.endfor
.for j in libgpgsqlbackend.so libgmysqlbackend.so \
libgsqlite3backend.so libldapbackend.so libopendbxbackend.so \
libgeobackend.so libpipebackend.so
@if ([ -f ${STAGEDIR}${PREFIX}/lib/$j ] && [ ! -f ${STAGEDIR}${PREFIX}/lib/$j.0 ]); then \
${LN} -sf ${PREFIX}/lib/$j ${STAGEDIR}${PREFIX}/lib/$j.0; \
fi
.endfor
.include <bsd.port.mk>
|