1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Use options helpers to simplify the Makefile

- Remove SQLITE2 option as it was dropped from powerdns on 2012
This commit is contained in:
Danilo Egea Gondolfo 2013-11-10 23:09:39 +00:00
parent c0763e48fc
commit 637d567fbc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=333453
3 changed files with 96 additions and 133 deletions

View File

@ -26,7 +26,7 @@ USE_LDCONFIG= YES
CXXFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --with-modules="" \
--with-dynmodules="pipe ${CONFIGURE_MODULES}" \
--with-dynmodules="pipe ${MODULES}" \
--sysconfdir="${PREFIX}/etc/pdns" \
--with-boost="${LOCALBASE}"
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
@ -37,15 +37,13 @@ SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
SUB_FILES= pkg-message
USE_RC_SUBR= pdns
OPTIONS_DEFINE= PGSQL PGSQL_LOCAL MYSQL MYSQL_LOCAL \
OPENDBX OPENLDAP OPENLDAP_LOCAL GEO POLARSSL TOOLS
OPENDBX OPENLDAP OPENLDAP_LOCAL GEO POLARSSL SQLITE3 TOOLS
OPTIONS_MULTI= DNSSEC
OPTIONS_MULTI_DNSSEC= BOTAN110 CRYPTOPP
OPTIONS_RADIO= SQLITE
OPTIONS_RADIO_SQLITE= SQLITE2 SQLITE3
SQLITE2_DESC= SQLite 2 database support
PGSQL_DESC= PostgreSQL backend
PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server
MYSQL_DESC= MySQL backend
@ -53,6 +51,7 @@ 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
@ -62,100 +61,82 @@ TOOLS_DESC= Build extra tools
OPTIONS_DEFAULT= PGSQL DNSSEC BOTAN110 POLARSSL
OPTIONS_SUB= yes
TOOLS_CONFIGURE_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
OPENLDAP_CXXFLAGS= -DLDAP_DEPRECATED=1
OPENLDAP_USE= OPENLDAP=YES
OPENLDAP_LOCAL_RUN_DEPENDS= openldap-server>=0:${PORTSDIR}/net/openldap24-server
SQLITE3_USE= SQLITE=3
OPENDBX_LIB_DEPENDS= libopendbx.so:${PORTSDIR}/databases/opendbx
BOTAN110_CONFIGURE_ENABLE= botan1.10
BOTAN110_LIB_DEPENDS= libbotan-1.10.so:${PORTSDIR}/security/botan110
.include <bsd.port.options.mk>
USE_RC_SUBR+= pdns
.if ${PORT_OPTIONS:MTOOLS}
CONFIGURE_ARGS+= --enable-tools
PLIST_SUB+= WITHTOOLS=""
.else
PLIST_SUB+= WITHTOOLS="@comment "
.endif
.if ${PORT_OPTIONS:MGEO}
CONFIGURE_MODULES+= "geo"
PLIST_SUB+= WITHGEO=""
.else
PLIST_SUB+= WITHGEO="@comment "
MODULES+= "geo"
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL?= YES
CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}
CONFIGURE_MODULES+= "gpgsql"
PLIST_SUB+= WITHPGSQL=""
.else
CONFIGURE_ARGS+= --without-pgsql
PLIST_SUB+= WITHPGSQL="@comment "
MODULES+= "gpgsql"
.endif
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL?= YES
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
CONFIGURE_MODULES+= "gmysql"
PLIST_SUB+= WITHMYSQL=""
.else
CONFIGURE_ARGS+= --without-mysql
PLIST_SUB+= WITHMYSQL="@comment "
MODULES+= "gmysql"
.endif
.if ${PORT_OPTIONS:MOPENDBX} || ${PORT_OPTIONS:MPGSQL}
. if ${PORT_OPTIONS:MPGSQL_LOCAL}
USE_PGSQL= server
SUB_LIST+= PGSQL=postgresql
. endif
.if ${PORT_OPTIONS:MPGSQL_LOCAL}
SUB_LIST+= PGSQL_REQ=postgresql
.else
SUB_LIST+= PGSQL=
SUB_LIST+= PGSQL_REQ=
.endif
.if ${PORT_OPTIONS:MOPENDBX} || ${PORT_OPTIONS:MMYSQL}
. if ${PORT_OPTIONS:MMYSQL_LOCAL}
USE_MYSQL= server
SUB_LIST+= MYSQL=mysql
. endif
.if ${PORT_OPTIONS:MMYSQL_LOCAL}
SUB_LIST+= MYSQL_REQ=mysql
.else
SUB_LIST+= MYSQL=
SUB_LIST+= MYSQL_REQ=
.endif
.if ${PORT_OPTIONS:MOPENLDAP}
USE_OPENLDAP?= YES
CONFIGURE_MODULES+= "ldap"
CXXFLAGS+= -L${LOCALBASE}/lib -DLDAP_DEPRECATED=1
PLIST_SUB+= WITHOPENLDAP=""
. if ${PORT_OPTIONS:MOPENLDAP_LOCAL}
RUN_DEPENDS+= openldap-server>=0:${PORTSDIR}/net/openldap${OPENLDAP_VER}-server
SUB_LIST+= SLAPD=slapd
. else
SUB_LIST+= SLAPD=
. endif
.else
PLIST_SUB+= WITHOPENLDAP="@comment "
SUB_LIST+= SLAPD=
MODULES+= "ldap"
.endif
.if ${PORT_OPTIONS:MSQLITE}
USE_SQLITE?= 2
CONFIGURE_MODULES+= "gsqlite"
PLIST_SUB+= WITHSQLITE=""
.if ${PORT_OPTIONS:MOPENLDAP_LOCAL}
SUB_LIST+= SLAPD_REQ=slapd
.else
PLIST_SUB+= WITHSQLITE="@comment "
SUB_LIST+= SLAPD_REQ=
.endif
.if ${PORT_OPTIONS:MSQLITE3}
USE_SQLITE?= 3
CONFIGURE_MODULES+= "gsqlite3"
PLIST_SUB+= WITHSQLITE3=""
.else
PLIST_SUB+= WITHSQLITE3="@comment "
MODULES+= "gsqlite3"
.endif
.if ${PORT_OPTIONS:MOPENDBX}
LIB_DEPENDS+= libopendbx.so:${PORTSDIR}/databases/opendbx
CONFIGURE_MODULES+= "opendbx"
PLIST_SUB+= WITHOPENDBX=""
CXXFLAGS+= -L${LOCALBASE}/lib
.else
PLIST_SUB+= WITHOPENDBX="@comment "
MODULES+= "opendbx"
.endif
.if ${PORT_OPTIONS:MCRYPTOPP}
CONFIGURE_ARGS+= --enable-cryptopp
. 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}
@ -164,26 +145,12 @@ CONFIGURE_ARGS+= --without-system-polarssl
LIB_DEPENDS+= libpolarssl.so:${PORTSDIR}/security/polarssl
.endif
.if ${PORT_OPTIONS:MBOTAN110}
CONFIGURE_ARGS+= --enable-botan1.10
LIB_DEPENDS+= libbotan-1.10.so:${PORTSDIR}/security/botan110
.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
CONFIGURE_ARGS+= --enable-cryptopp
.endif
post-patch:
.if ${PORT_OPTIONS:MOPENLDAP}
${REINPLACE_CMD} -e 's;-I. ;-I. -I${LOCALBASE}/include ;' \
@${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;' \
@${REINPLACE_CMD} -e 's;@LIBDL@;@LIBDL@ -L${LOCALBASE}/lib;' \
-e 's;@modulelibs@;@modulelibs@ -llber;' \
${WRKSRC}/pdns/Makefile.in
.endif
@ -193,11 +160,11 @@ post-patch:
.endif
post-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for i in pdns.conf
${INSTALL_DATA} ${FILESDIR}/$i ${STAGEDIR}${EXAMPLESDIR}/
.endfor
.for j in libgpgsqlbackend.so libgmysqlbackend.so libgsqlitebackend.so \
.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 \

View File

@ -4,7 +4,7 @@
#
# PROVIDE: pdns_server
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%SLAPD%%
# REQUIRE: DAEMON %%MYSQL_REQ%% %%PGSQL_REQ%% %%SLAPD_REQ%%
# KEYWORD: shutdown
#

View File

@ -4,50 +4,46 @@ bin/zone2json
bin/zone2ldap
bin/zone2sql
sbin/pdns_server
%%WITHTOOLS%%bin/dnsbulktest
%%WITHTOOLS%%bin/dnsreplay
%%WITHTOOLS%%bin/dnsscan
%%WITHTOOLS%%bin/dnsscope
%%WITHTOOLS%%bin/dnstcpbench
%%WITHTOOLS%%bin/dnswasher
%%WITHTOOLS%%bin/nproxy
%%WITHTOOLS%%bin/nsec3dig
%%WITHPGSQL%%lib/libgpgsqlbackend.a
%%WITHPGSQL%%lib/libgpgsqlbackend.la
%%WITHPGSQL%%lib/libgpgsqlbackend.so
%%WITHPGSQL%%lib/libgpgsqlbackend.so.0
%%WITHMYSQL%%lib/libgmysqlbackend.a
%%WITHMYSQL%%lib/libgmysqlbackend.la
%%WITHMYSQL%%lib/libgmysqlbackend.so
%%WITHMYSQL%%lib/libgmysqlbackend.so.0
%%WITHSQLITE%%lib/libgsqlitebackend.a
%%WITHSQLITE%%lib/libgsqlitebackend.la
%%WITHSQLITE%%lib/libgsqlitebackend.so
%%WITHSQLITE%%lib/libgsqlitebackend.so.0
%%WITHSQLITE3%%lib/libgsqlite3backend.a
%%WITHSQLITE3%%lib/libgsqlite3backend.la
%%WITHSQLITE3%%lib/libgsqlite3backend.so
%%WITHSQLITE3%%lib/libgsqlite3backend.so.0
%%WITHOPENLDAP%%lib/libldapbackend.a
%%WITHOPENLDAP%%lib/libldapbackend.la
%%WITHOPENLDAP%%lib/libldapbackend.so
%%WITHOPENLDAP%%lib/libldapbackend.so.0
%%WITHOPENDBX%%lib/libopendbxbackend.a
%%WITHOPENDBX%%lib/libopendbxbackend.la
%%WITHOPENDBX%%lib/libopendbxbackend.so
%%WITHOPENDBX%%lib/libopendbxbackend.so.0
%%WITHGEO%%lib/libgeobackend.a
%%WITHGEO%%lib/libgeobackend.la
%%WITHGEO%%lib/libgeobackend.so
%%WITHGEO%%lib/libgeobackend.so.0
%%TOOLS%%bin/dnsbulktest
%%TOOLS%%bin/dnsreplay
%%TOOLS%%bin/dnsscan
%%TOOLS%%bin/dnsscope
%%TOOLS%%bin/dnstcpbench
%%TOOLS%%bin/dnswasher
%%TOOLS%%bin/nproxy
%%TOOLS%%bin/nsec3dig
%%PGSQL%%lib/libgpgsqlbackend.a
%%PGSQL%%lib/libgpgsqlbackend.la
%%PGSQL%%lib/libgpgsqlbackend.so
%%PGSQL%%lib/libgpgsqlbackend.so.0
%%MYSQL%%lib/libgmysqlbackend.a
%%MYSQL%%lib/libgmysqlbackend.la
%%MYSQL%%lib/libgmysqlbackend.so
%%MYSQL%%lib/libgmysqlbackend.so.0
%%SQLITE3%%lib/libgsqlite3backend.a
%%SQLITE3%%lib/libgsqlite3backend.la
%%SQLITE3%%lib/libgsqlite3backend.so
%%SQLITE3%%lib/libgsqlite3backend.so.0
%%OPENLDAP%%lib/libldapbackend.a
%%OPENLDAP%%lib/libldapbackend.la
%%OPENLDAP%%lib/libldapbackend.so
%%OPENLDAP%%lib/libldapbackend.so.0
%%OPENDBX%%lib/libopendbxbackend.a
%%OPENDBX%%lib/libopendbxbackend.la
%%OPENDBX%%lib/libopendbxbackend.so
%%OPENDBX%%lib/libopendbxbackend.so.0
%%GEO%%lib/libgeobackend.a
%%GEO%%lib/libgeobackend.la
%%GEO%%lib/libgeobackend.so
%%GEO%%lib/libgeobackend.so.0
lib/libpipebackend.a
lib/libpipebackend.la
lib/libpipebackend.so
lib/libpipebackend.so.0
%%WITHTOOLS%%man/man1/dnstcpbench.1.gz
%%WITHTOOLS%%man/man8/dnsreplay.8.gz
%%WITHTOOLS%%man/man8/dnsscope.8.gz
%%WITHTOOLS%%man/man8/dnswasher.8.gz
%%TOOLS%%man/man1/dnstcpbench.1.gz
%%TOOLS%%man/man8/dnsreplay.8.gz
%%TOOLS%%man/man8/dnsscope.8.gz
%%TOOLS%%man/man8/dnswasher.8.gz
man/man8/pdns_control.8.gz
man/man8/pdns_server.8.gz
man/man8/pdnssec.8.gz