aboutsummaryrefslogtreecommitdiffstats
path: root/net/openldap23-server/Makefile
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-08-16 02:18:46 +0800
committereik <eik@FreeBSD.org>2004-08-16 02:18:46 +0800
commit706488cef9318272b6341563014a3a2b276b7ca1 (patch)
tree4f114db6566fe9fdfeac5d7b7a6d8f1cc5407f85 /net/openldap23-server/Makefile
parent3414aca09d6225d239d4f5c288c5ca6a975c72e5 (diff)
downloadfreebsd-ports-gnome-706488cef9318272b6341563014a3a2b276b7ca1.tar.gz
freebsd-ports-gnome-706488cef9318272b6341563014a3a2b276b7ca1.tar.zst
freebsd-ports-gnome-706488cef9318272b6341563014a3a2b276b7ca1.zip
update to 2.2.15
- new switch WITH_DYNAMIC_BACKENDS - WITH_ODBC has to be specified, even when WITH_ODBC_TYPE is set - 5.x users: when you need to start the daemon early, build with WITH_RCORDER=yes to put the start script into /etc/rc.d
Diffstat (limited to 'net/openldap23-server/Makefile')
-rw-r--r--net/openldap23-server/Makefile200
1 files changed, 127 insertions, 73 deletions
diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile
index df6f805acedf..d9b277e0a54e 100644
--- a/net/openldap23-server/Makefile
+++ b/net/openldap23-server/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= openldap
-PORTVERSION= 2.2.14
+PORTVERSION= 2.2.15
PORTREVISION= ${OPENLDAP_PORTREVISION}
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
@@ -26,13 +26,14 @@ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \
ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
MASTER_SITE_SUBDIR= openldap-release
-PKGNAMESUFFIX= ${OPENLDAP_PKGNAMESUFFIX}
+PKGNAMESUFFIX?= -server
EXTRACT_SUFX= .tgz
MAINTAINER= eik@FreeBSD.org
COMMENT?= Open source LDAP server implementation
-LATEST_LINK= ${PKGNAMEPREFIX}openldap22${PKGNAMESUFFIX}
+UNIQUENAME?= ${PKGNAMEPREFIX}openldap22
+LATEST_LINK?= ${UNIQUENAME}${PKGNAMESUFFIX}
WANT_OPENLDAP_VER?= 22
.if ${WANT_OPENLDAP_VER} != 22
@@ -42,24 +43,22 @@ BROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
PORTREVISION_CLIENT= 0
PORTREVISION_SERVER= 0
-PKGNAMESUFFIX_CLIENT= -client
-PKGNAMESUFFIX_SERVER= -server
-
.if defined(CLIENT_ONLY)
OPENLDAP_PORTREVISION= ${PORTREVISION_CLIENT}
-OPENLDAP_PKGNAMESUFFIX= ${PKGNAMESUFFIX_CLIENT}
OPENLDAP_PKGFILESUFX= .client
-.if defined(WITH_SASL)
+.if ${PKGNAMESUFFIX} == "-sasl-client"
CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.* \
${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.[!2].*
-.else
+.elif ${PKGNAMESUFFIX} == "-client"
CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.[!2].* \
${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.*
+.else
+BROKEN= Unknown PKGNAMESUFFIX ${PKGNAMESUFFIX}
.endif
.if !defined(NOPORTDOCS)
-PORTDOCS= drafts rfc
+PORTDOCS= CHANGES drafts rfc
.endif
.if defined(USE_OPENLDAP)
@@ -67,29 +66,29 @@ PORTDOCS= drafts rfc
.endif
.else
OPENLDAP_PORTREVISION= ${PORTREVISION_SERVER}
-OPENLDAP_PKGNAMESUFFIX= ${PKGNAMESUFFIX_SERVER}
OPENLDAP_PKGFILESUFX=
.if defined(WITH_SASL)
RUN_DEPENDS= ${LOCALBASE}/lib/libldap-2.2.so.7:${PORTSDIR}/net/openldap22-sasl-client
-CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.* \
- ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.[!2].*
.else
RUN_DEPENDS= ${LOCALBASE}/lib/libldap-2.2.so.7:${PORTSDIR}/net/openldap22-client
-CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.[!2].* \
- ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.*
.endif
-.if ${PORTREVISION_CLIENT} != 0
-SUF1_CLIENT= _${PORTREVISION_CLIENT}
+.if ${PKGNAMESUFFIX} == "-sasl-server"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.[!2].*
+.elif ${PKGNAMESUFFIX} == "-server"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.[!2].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.*
+.else
+BROKEN= Unknown PKGNAMESUFFIX ${PKGNAMESUFFIX}
.endif
-PKGNAME_CLIENT= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX_CLIENT}-${PORTVERSION}${SUF1_CLIENT}
.endif
USE_OPENSSL= yes
USE_REINPLACE= yes
-GNU_CONFIGURE= yes
+USE_LIBTOOL_VER= 15
DESCR= ${PKGDIR}/pkg-descr${OPENLDAP_PKGFILESUFX}
PLIST= ${PKGDIR}/pkg-plist${OPENLDAP_PKGFILESUFX}
@@ -101,8 +100,8 @@ SCHEMATA= corba core cosine \
dyngroup inetorgperson java \
misc nis openldap
-LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap
-LOCALSTATEDIR?= ${DESTDIR}/var/db
+LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= /var/db
DATABASEDIR?= ${LOCALSTATEDIR}/openldap-data
SLURPDIR?= ${LOCALSTATEDIR}/openldap-slurp
@@ -121,8 +120,6 @@ CONFIGURE_ARGS= --with-threads=posix \
--enable-dynamic
.if defined(WITH_SASL)
-PKGNAMESUFFIX_CLIENT:= -sasl${PKGNAMESUFFIX_CLIENT}
-PKGNAMESUFFIX_SERVER:= -sasl${PKGNAMESUFFIX_SERVER}
LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
CONFIGURE_ARGS+= --with-cyrus-sasl
.else
@@ -132,7 +129,9 @@ CONFIGURE_ARGS+= --without-cyrus-sasl
.if defined(CLIENT_ONLY)
# client specific configuration
-CONFIGURE_ARGS+= --disable-slapd
+CONFIGURE_ARGS+= --disable-slapd \
+ --disable-monitor \
+ --disable-bdb
INSTALLS_SHLIB= yes
@@ -141,42 +140,77 @@ INSTALLS_SHLIB= yes
USE_RC_SUBR= yes
-SED_SCRIPT+= -e 's,%%PKGNAME_CLIENT%%,${PKGNAME_CLIENT:R}.*,g' \
- -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
- -e 's,%%RC_DIR%%,${RC_DIR},g' \
- -e 's,%%RC_SUFX%%,${RC_SUFX},g'
-PLIST_SUB+= RC_DIR=${RC_DIR} \
- RC_SUFX=${RC_SUFX}
-
EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in
+.if defined(WITH_MODULES) || defined(WITH_DYNAMIC_BACKENDS) || defined(WITH_SLAPI)
+USE_LIBLTDL= yes
+CONFIGURE_ARGS+= --enable-modules
+PLIST_SUB+= MODULES=""
+.else
+PLIST_SUB+= MODULES="@comment "
+.endif
+
+.if defined(WITH_DYNAMIC_BACKENDS)
+BACKEND_ENABLE= "mod"
+BACKEND_PLIST= ""
+.else
+BACKEND_ENABLE= "yes"
+BACKEND_PLIST= "@comment "
+.endif
+
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
- --enable-ldbm \
+ --enable-ldbm=${BACKEND_ENABLE} \
--enable-crypt \
--enable-lmpasswd \
- --enable-ldap \
- --enable-meta \
+ --enable-ldap=${BACKEND_ENABLE} \
+ --enable-meta=${BACKEND_ENABLE} \
--enable-rewrite \
- --enable-null \
- --enable-monitor
+ --enable-null=${BACKEND_ENABLE} \
+ --enable-monitor=${BACKEND_ENABLE}
+
+PLIST_SUB+= BACKEND=${BACKEND_PLIST}
+
+.if defined(WITH_DYNGROUP)
+CONFIGURE_ARGS+= --enable-dyngroup
+.endif
+
+.if defined(WITH_PROXYCACHE)
+CONFIGURE_ARGS+= --enable-proxycache
+.endif
.if defined(WITHOUT_BDB)
-CONFIGURE_ARGS+= --with-ldbm-api=bcompat \
- --disable-bdb
+CONFIGURE_ARGS+= --disable-bdb \
+ --disable-hdb \
+ --with-ldbm-api=bcompat
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB="@comment "
.else
+
WITH_BDB_VER?= 42
.if ${WITH_BDB_VER} == 42
-CONFIGURE_ARGS+= --enable-bdb
+CONFIGURE_ARGS+= --enable-bdb=${BACKEND_ENABLE} \
+ --enable-hdb=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_BDB=${BACKEND_PLIST} \
+ BACK_HDB=${BACKEND_PLIST}
BDBLIB= db-4.2.2
.elif ${WITH_BDB_VER} == 41
-CONFIGURE_ARGS+= --disable-bdb
+CONFIGURE_ARGS+= --disable-bdb \
+ --enable-hdb=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB=${BACKEND_PLIST}
BDBLIB= db41.1
.elif ${WITH_BDB_VER} == 4
-CONFIGURE_ARGS+= --disable-bdb
+CONFIGURE_ARGS+= --disable-bdb \
+ --enable-hdb=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB=${BACKEND_PLIST}
BDBLIB= db4.0
.elif ${WITH_BDB_VER} == 3
-CONFIGURE_ARGS+= --disable-bdb
+CONFIGURE_ARGS+= --disable-bdb \
+ --disable-hdb
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB="@comment "
BDBLIB= db3.3
.else
.error WITH_BDB_VER must be 3, 4, 41 or 42
@@ -184,19 +218,25 @@ BDBLIB= db3.3
LIB_DEPENDS+= ${BDBLIB}:${PORTSDIR}/databases/db${WITH_BDB_VER}
CPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER}
-CONFIGURE_ARGS+= --with-ldbm-api=berkeley \
- --enable-hdb
+CONFIGURE_ARGS+= --with-ldbm-api=berkeley
CONFIGURE_SED+= -e 's,ol_DB_LIB=$$,&-l${BDBLIB:R},' \
-e 's,(ol_cv_lib_db=)yes$$,\1-l${BDBLIB:R},'
.endif
.if defined(WITH_SHELL)
-CONFIGURE_ARGS+= --enable-shell
+CONFIGURE_ARGS+= --enable-shell=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_SHELL=${BACKEND_PLIST}
+.else
+PLIST_SUB+= BACK_SHELL="@comment "
.endif
.if defined(WITH_PERL)
-USE_PERL5= yes
-CONFIGURE_ARGS+= --enable-perl
+USE_PERL5= yes
+CONFIGURE_ARGS+= --enable-perl=${BACKEND_ENABLE}
+CONFIGURE_ENV+= PERLBIN="${PERL}"
+PLIST_SUB+= BACK_PERL=${BACKEND_PLIST}
+.else
+PLIST_SUB+= BACK_PERL="@comment "
.endif
.if defined(WITH_SASL)
@@ -204,10 +244,9 @@ CONFIGURE_ARGS+= --enable-spasswd
.endif
.if defined(WITH_ODBC)
+CONFIGURE_ARGS+= --enable-sql=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_SQL=${BACKEND_PLIST}
WITH_ODBC_TYPE?= iODBC
-.endif
-.if defined(WITH_ODBC_TYPE)
-CONFIGURE_ARGS+= --enable-sql
.if ${WITH_ODBC_TYPE:L} == iodbc
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
.elif ${WITH_ODBC_TYPE:L} == unixodbc
@@ -215,12 +254,12 @@ LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
.else
.error WITH_ODBC_TYPE must be iODBC or unixODBC
.endif
+.else
+PLIST_SUB+= BACK_SQL="@comment "
.endif
.if defined(WITH_SLAPI)
-USE_LIBLTDL= yes
-CONFIGURE_ARGS+= --enable-slapi \
- --enable-modules
+CONFIGURE_ARGS+= --enable-slapi
PLIST_SUB+= SLAPI=""
INSTALLS_SHLIB= yes
.else
@@ -241,7 +280,7 @@ LDFLAGS+= -L${LOCALBASE}/lib
#LIBS+= ${PTHREAD_LIBS}
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
@@ -250,13 +289,19 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
.if defined(CLIENT_ONLY)
.include "${FILESDIR}/manpages"
.else
-.if ${OSVERSION} >= 500038
-RC_DIR= ${DESTDIR}/etc/rc.d
+.if defined(WITH_RCORDER) && ( defined(DFOSVERSION) || ${OSVERSION} >= 500038 )
+RC_DIR= /
RC_SUFX=
+PLIST_SUB+= RCORDER="" RC_DIR=""
.else
-RC_DIR= ${PREFIX}/etc/rc.d
-RC_SUFX= .sh
+RC_DIR= ${PREFIX}
+RC_SUFX= .sh
+PLIST_SUB+= RCORDER="@comment " RC_DIR="%D"
.endif
+SED_SCRIPT+= -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
+ -e 's,%%RC_DIR%%,${RC_DIR:S/\/$//},g' \
+ -e 's,%%RC_SUFX%%,${RC_SUFX},g'
+PLIST_SUB+= RC_SUFX=${RC_SUFX}
.endif
pre-everything::
@@ -276,6 +321,12 @@ pre-everything::
@${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API
@${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support"
@${ECHO} "WITHOUT_BDB without BerkeleyDB support"
+ @${ECHO} "WITH_DYNGROUP with Dynamic Group overlay"
+ @${ECHO} "WITH_PROXYCACHE with Proxy Cache overlay"
+ @${ECHO} "WITH_DYNAMIC_BACKENDS build backends as modules"
+.if defined(DFOSVERSION) || ${OSVERSION} >= 500038
+ @${ECHO} "WITH_RCORDER slapd(1) should start early in the boot process"
+.endif
.endif
@${ECHO}
@${ECHO} "============================================================="
@@ -283,6 +334,7 @@ pre-everything::
post-patch:
@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/run/,${LDAP_RUN_DIR}/,g' \
+ -e 's,\(back_[a-z]*\).la,\1,g' \
${WRKSRC}/servers/slapd/slapd.conf
.if defined(CONFIGURE_SED)
@${REINPLACE_CMD} -E ${CONFIGURE_SED} \
@@ -314,37 +366,39 @@ test: build
pre-install:
@if [ -f ${PKGINSTALL} ]; then \
- ${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
+ ${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
fi
+.if defined(WITH_MODULES) || defined(WITH_DYNAMIC_BACKENDS) || defined(WITH_SLAPI)
+ @${MKDIR} ${DESTDIR}${PREFIX}/libexec/openldap
+.endif
post-install:
.if defined(CLIENT_ONLY)
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${DESTDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${DOCSDIR}
@for dir in drafts rfc; do \
- ${MKDIR} ${DOCSDIR}/$${dir}; \
- ${INSTALL_DATA} ${WRKSRC}/doc/$${dir}/* ${DOCSDIR}/$${dir}; \
+ ${MKDIR} ${DESTDIR}${DOCSDIR}/$${dir}; \
+ ${INSTALL_DATA} ${WRKSRC}/doc/$${dir}/* ${DESTDIR}${DOCSDIR}/$${dir}; \
done
.endif
.else
+ @${MKDIR} ${DESTDIR}${LDAP_RUN_DIR}
@for schema in ${SCHEMATA}; do \
${ECHO_CMD} "@unexec if cmp -s %D/etc/openldap/schema/$${schema}.schema" \
"%D/etc/openldap/schema/$${schema}.schema.default; then" \
- "rm -f %D/etc/openldap/schema/$${schema}.schema; fi" >>${TMPPLIST}; \
- ${ECHO_CMD} "etc/openldap/schema/$${schema}.schema.default" >>${TMPPLIST}; \
- ${ECHO_CMD} "@exec [ -f %B/$${schema}.schema ] || cp %B/%f %B/$${schema}.schema" >>${TMPPLIST}; \
- done
+ "rm -f %D/etc/openldap/schema/$${schema}.schema; fi"; \
+ ${ECHO_CMD} "etc/openldap/schema/$${schema}.schema.default"; \
+ ${ECHO_CMD} "@exec [ -f %B/$${schema}.schema ] || cp %B/%f %B/$${schema}.schema"; \
+ done >>${TMPPLIST}
@${ECHO_CMD} "@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true" >>${TMPPLIST}
@${ECHO_CMD} "@unexec rmdir %D/etc/openldap 2>/dev/null || true" >>${TMPPLIST}
-# currently the only way to participate in rcorder(8)
- @if [ "${RC_DIR}" != "${PREFIX}" ]; then \
- ${ECHO_CMD} "@cwd ${RC_DIR}" >>${TMPPLIST}; \
- fi
+ @[ "${RC_DIR:S/\/$//}" = "${PREFIX}" ] || ${ECHO_CMD} "@cwd ${RC_DIR}" >>${TMPPLIST}
.for script in slapd slurpd
- @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${RC_DIR}/${script}${RC_SUFX}
- @${ECHO_CMD} "${script}${RC_SUFX}" >>${TMPPLIST}
+ @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${DESTDIR}${RC_DIR:S/\/$//}/etc/rc.d/${script}${RC_SUFX}
+ @${ECHO_CMD} "etc/rc.d/${script}${RC_SUFX}" >>${TMPPLIST}
.endfor
- @${MKDIR} ${LDAP_RUN_DIR}
+ @[ "${RC_DIR:S/\/$//}" = "${PREFIX}" ] || ${ECHO_CMD} "@cwd ${PREFIX}" >>${TMPPLIST}
.endif
@${CAT} ${PKGMESSAGE}