aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2004-08-15 18:18:46 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2004-08-15 18:18:46 +0000
commit47acbb6df71ce04caee06b7dcc15c02bc201e720 (patch)
treef587c33ae7256bbb352b3dcf9e675416302f9036 /net
parent6115845fee75f3d21ca5c32d68be3fc36ce32ac7 (diff)
downloadports-47acbb6df71ce04caee06b7dcc15c02bc201e720.tar.gz
ports-47acbb6df71ce04caee06b7dcc15c02bc201e720.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
Notes
Notes: svn path=/head/; revision=116303
Diffstat (limited to 'net')
-rw-r--r--net/openldap22-client/Makefile2
-rw-r--r--net/openldap22-sasl-client/Makefile2
-rw-r--r--net/openldap22-sasl-server/Makefile2
-rw-r--r--net/openldap22-server/Makefile200
-rw-r--r--net/openldap22-server/distinfo4
-rw-r--r--net/openldap22-server/files/patch-build::ltmain.sh46
-rw-r--r--net/openldap22-server/files/patch-configure21
-rw-r--r--net/openldap22-server/files/slapd.sh51
-rw-r--r--net/openldap22-server/files/slurpd.sh20
-rw-r--r--net/openldap22-server/pkg-install6
-rw-r--r--net/openldap22-server/pkg-message4
-rw-r--r--net/openldap22-server/pkg-plist36
-rw-r--r--net/openldap23-client/Makefile2
-rw-r--r--net/openldap23-sasl-client/Makefile2
-rw-r--r--net/openldap23-sasl-server/Makefile2
-rw-r--r--net/openldap23-server/Makefile200
-rw-r--r--net/openldap23-server/distinfo4
-rw-r--r--net/openldap23-server/files/patch-build::ltmain.sh46
-rw-r--r--net/openldap23-server/files/patch-configure21
-rw-r--r--net/openldap23-server/files/slapd.sh51
-rw-r--r--net/openldap23-server/files/slurpd.sh20
-rw-r--r--net/openldap23-server/pkg-install6
-rw-r--r--net/openldap23-server/pkg-message4
-rw-r--r--net/openldap23-server/pkg-plist36
-rw-r--r--net/openldap24-client/Makefile2
-rw-r--r--net/openldap24-sasl-client/Makefile2
-rw-r--r--net/openldap24-server/Makefile200
-rw-r--r--net/openldap24-server/distinfo4
-rw-r--r--net/openldap24-server/files/patch-build::ltmain.sh46
-rw-r--r--net/openldap24-server/files/patch-configure21
-rw-r--r--net/openldap24-server/files/slapd.sh51
-rw-r--r--net/openldap24-server/files/slurpd.sh20
-rw-r--r--net/openldap24-server/pkg-install6
-rw-r--r--net/openldap24-server/pkg-message4
-rw-r--r--net/openldap24-server/pkg-plist36
35 files changed, 659 insertions, 521 deletions
diff --git a/net/openldap22-client/Makefile b/net/openldap22-client/Makefile
index 172fa7d40eec..f5ce1cde5e5b 100644
--- a/net/openldap22-client/Makefile
+++ b/net/openldap22-client/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -client
COMMENT= Open source LDAP client implementation
diff --git a/net/openldap22-sasl-client/Makefile b/net/openldap22-sasl-client/Makefile
index 5935530d3098..def3d97655fe 100644
--- a/net/openldap22-sasl-client/Makefile
+++ b/net/openldap22-sasl-client/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -sasl-client
COMMENT= Open source LDAP client implementation with SASL2 support
diff --git a/net/openldap22-sasl-server/Makefile b/net/openldap22-sasl-server/Makefile
index 1755a6282f61..7cf17b2ff915 100644
--- a/net/openldap22-sasl-server/Makefile
+++ b/net/openldap22-sasl-server/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -sasl-server
COMMENT= Open source LDAP server implementation with SASL2 support
diff --git a/net/openldap22-server/Makefile b/net/openldap22-server/Makefile
index df6f805acedf..d9b277e0a54e 100644
--- a/net/openldap22-server/Makefile
+++ b/net/openldap22-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}
diff --git a/net/openldap22-server/distinfo b/net/openldap22-server/distinfo
index fd8faae4ae98..cddc18041c23 100644
--- a/net/openldap22-server/distinfo
+++ b/net/openldap22-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (openldap-2.2.14.tgz) = a1831180d986b25f9c9431df430364a6
-SIZE (openldap-2.2.14.tgz) = 2566560
+MD5 (openldap-2.2.15.tgz) = c8b8693fe266db739b53e2719e9b29db
+SIZE (openldap-2.2.15.tgz) = 2575720
diff --git a/net/openldap22-server/files/patch-build::ltmain.sh b/net/openldap22-server/files/patch-build::ltmain.sh
deleted file mode 100644
index 515dd96d8756..000000000000
--- a/net/openldap22-server/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,46 +0,0 @@
---- build/ltmain.sh.orig Thu Jan 1 19:16:25 2004
-+++ build/ltmain.sh Sun Mar 28 14:58:06 2004
-@@ -1076,7 +1076,7 @@
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
-- *-*-openbsd* | *-*-freebsd*)
-+ *-*-openbsd* | *-*-freebsd4*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
-@@ -1088,6 +1088,12 @@
-
- -module)
- module=yes
-+ case $host in
-+ *-*-freebsd*)
-+ # Do not build the useless static library
-+ build_old_libs=no
-+ ;;
-+ esac
- continue
- ;;
-
-@@ -4296,10 +4302,17 @@
- fi
-
- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
-+ case $host in
-+ *-*-freebsd*)
-+ # Do not install the useless pseudo-library
-+ ;;
-+ *)
-+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-+ instname="$dir/$name"i
-+ $show "$install_prog $instname $destdir/$name"
-+ $run eval "$install_prog $instname $destdir/$name" || exit $?
-+ ;;
-+ esac
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
diff --git a/net/openldap22-server/files/patch-configure b/net/openldap22-server/files/patch-configure
index cf5cf042eb50..38e7c135ab71 100644
--- a/net/openldap22-server/files/patch-configure
+++ b/net/openldap22-server/files/patch-configure
@@ -1,20 +1,29 @@
---- configure.orig Wed May 5 11:55:48 2004
-+++ configure Wed May 5 11:56:33 2004
-@@ -20220,7 +20220,7 @@
+--- configure.orig Tue Jul 27 18:33:12 2004
++++ configure Sat Aug 14 17:05:23 2004
+@@ -19497,7 +19497,7 @@
+
+
+ if test $ol_cv_bdb_compat = yes ; then
+- ol_enable_bdb=yes
++ ol_enable_bdb=${ol_enable_bdb-yes}
+ elif test $ol_enable_bdb = yes ; then
+ { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
+ else
+@@ -20349,7 +20349,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-liodbc $LIBS"
+LIBS="-liodbc $LIBS $LTHREAD_LIBS"
cat > conftest.$ac_ext <<EOF
- #line 20226 "configure"
+ #line 20355 "configure"
#include "confdefs.h"
-@@ -20264,7 +20264,7 @@
+@@ -20393,7 +20393,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lodbc $LIBS"
+LIBS="-lodbc $LIBS $LTHREAD_LIBS"
cat > conftest.$ac_ext <<EOF
- #line 20270 "configure"
+ #line 20399 "configure"
#include "confdefs.h"
diff --git a/net/openldap22-server/files/slapd.sh b/net/openldap22-server/files/slapd.sh
index fb77d4374fd0..6c6066220aec 100644
--- a/net/openldap22-server/files/slapd.sh
+++ b/net/openldap22-server/files/slapd.sh
@@ -5,7 +5,7 @@
# PROVIDE: slapd
# REQUIRE: NETWORKING SERVERS
-# BEFORE: DAEMON
+# BEFORE: securelevel
# KEYWORD: FreeBSD shutdown
#
@@ -24,15 +24,15 @@
#slapd_owner="DEFAULT"
#
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
-name=slapd
+name="slapd"
rcvar=`set_rcvar`
-command=%%PREFIX%%/libexec/slapd
-pidfile=%%LDAP_RUN_DIR%%/slapd.pid
-required_dirs=%%LDAP_RUN_DIR%%
-required_files=%%PREFIX%%/etc/openldap/slapd.conf
+command="%%PREFIX%%/libexec/slapd"
+pidfile="%%LDAP_RUN_DIR%%/slapd.pid"
+required_dirs="%%LDAP_RUN_DIR%%"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
start_precmd=start_precmd
start_postcmd=start_postcmd
@@ -41,10 +41,12 @@ start_postcmd=start_postcmd
start_precmd()
{
+ local slapd_ownername slapd_groupname
+
case x"$slapd_owner" in
- x|x[Nn][Oo][Nn][Ee]|x[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
- x*)
+ *)
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
chown -RL "$slapd_owner" "%%DATABASEDIR%%"
chown "$slapd_owner" "%%PREFIX%%/etc/openldap/slapd.conf"
@@ -66,38 +68,39 @@ start_precmd()
start_postcmd()
{
+ local socket seconds
+
for socket in $slapd_sockets; do
for seconds in 1 2 3 4 5; do
[ -e "$socket" ] && break
sleep 1
done
if [ -S "$socket" ]; then
- case x"$slapd_owner" in
- x|x[Nn][Oo][Nn][Ee]|x[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ case "$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
- x*)
+ *)
chown "$slapd_owner" "$socket"
;;
esac
chmod "$slapd_sockets_mode" "$socket"
+ else
+ warn "slapd: Can't find socket $socket"
fi
done
}
-# set defaults
-
-[ -z "$slapd_enable" ] && slapd_enable=NO
-[ -z "$slapd_flags" ] && slapd_flags=
-
-[ -z "$slapd_owner" ] && slapd_owner=ldap:ldap
-[ -z "$slapd_sockets" ] && slapd_sockets=
-[ -z "$slapd_sockets_mode" ] && slapd_sockets_mode=666
-
+# read settings, set defaults
load_rc_config $name
-
-if [ -n "$slapd_args" ]; then
+: ${slapd_enable="NO"}
+if [ -n "${slapd_args+set}" ]; then
warn "slapd_args is deprecated, use slapd_flags"
- slapd_flags="$slapd_args"
+ : ${slapd_flags="$slapd_args"}
+else
+ : ${slapd_flags=""}
fi
+: ${slapd_owner="ldap:ldap"}
+: ${slapd_sockets=""}
+: ${slapd_sockets_mode="666"}
run_rc_command "$1"
diff --git a/net/openldap22-server/files/slurpd.sh b/net/openldap22-server/files/slurpd.sh
index 558f58c1f592..79021305b400 100644
--- a/net/openldap22-server/files/slurpd.sh
+++ b/net/openldap22-server/files/slurpd.sh
@@ -15,22 +15,22 @@
# See slurpd(8) for more flags
#
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
-name=slurpd
+name="slurpd"
rcvar=`set_rcvar`
-command=%%PREFIX%%/libexec/slurpd
-required_files=%%PREFIX%%/etc/openldap/slapd.conf
-
-[ -z "$slurpd_enable" ] && slurpd_enable="NO"
-[ -z "$slurpd_flags" ] && slurpd_flags=
+command="%%PREFIX%%/libexec/slurpd"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
+# read settings, set defaults
load_rc_config $name
-
-if [ -n "$slurpd_args" ]; then
+: ${slurpd_enable="NO"}
+if [ -n "${slurpd_args+set}" ]; then
warn "slurpd_args is deprecated, use slurpd_flags"
- slurpd_flags="$slurpd_args"
+ : ${slurpd_flags="$slurpd_args"}
+else
+ : ${slurpd_flags=""}
fi
run_rc_command "$1"
diff --git a/net/openldap22-server/pkg-install b/net/openldap22-server/pkg-install
index 34ee897a1996..aa9b0cf46da9 100644
--- a/net/openldap22-server/pkg-install
+++ b/net/openldap22-server/pkg-install
@@ -13,12 +13,6 @@ FTPUSERS=/etc/ftpusers
case $2 in
PRE-INSTALL)
- if [ -z "`${PKG_INFO} -I '%%PKGNAME_CLIENT%%' 2> /dev/null`" ]; then
- ${ECHO_CMD} "===> %%PKGNAME%% requires %%PKGNAME_CLIENT%%."
- ${ECHO_CMD}
- ${ECHO_CMD} " Please install %%PKGNAME_CLIENT%% manually."
- exit 1
- fi
if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
${ECHO_CMD}
if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
diff --git a/net/openldap22-server/pkg-message b/net/openldap22-server/pkg-message
index 2317ce44f955..525c9ff88e08 100644
--- a/net/openldap22-server/pkg-message
+++ b/net/openldap22-server/pkg-message
@@ -10,7 +10,7 @@ to suit your needs and add the following lines to /etc/rc.conf:
slapd_sockets="/var/run/openldap/ldapi"
Then start the server with
- %%RC_DIR%%/slapd%%RC_SUFX%% start
+ %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% start
or reboot.
Try `man slapd' and the online manual at
@@ -23,6 +23,6 @@ If you are upgrading, you may want to check your configuration with
grep ^slapd_ /etc/rc.conf
slapd runs under a non-privileged user id (by default `ldap'),
-see %%RC_DIR%%/slapd%%RC_SUFX%% for more information.
+see %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% for more information.
************************************************************
diff --git a/net/openldap22-server/pkg-plist b/net/openldap22-server/pkg-plist
index b1d925c17b8b..193acee2941d 100644
--- a/net/openldap22-server/pkg-plist
+++ b/net/openldap22-server/pkg-plist
@@ -1,6 +1,6 @@
@comment $FreeBSD$
-@unexec %%RC_DIR%%/slapd%%RC_SUFX%% stop 2>&1 >/dev/null || true
-@unexec %%RC_DIR%%/slurpd%%RC_SUFX%% stop 2>&1 >/dev/null || true
+@unexec %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% stop 2>&1 >/dev/null || true
+@unexec %%RC_DIR%%/etc/rc.d/slurpd%%RC_SUFX%% stop 2>&1 >/dev/null || true
etc/openldap/schema/README
@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
etc/openldap/slapd.conf.default
@@ -9,6 +9,38 @@ etc/openldap/slapd.conf.default
%%SLAPI%%lib/libslapi.so
%%SLAPI%%lib/libslapi-2.2.so
%%SLAPI%%lib/libslapi-2.2.so.7
+%%MODULES%%@exec mkdir -p %D/libexec/openldap
+%%BACK_BDB%%libexec/openldap/back_bdb.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.2.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.2.so.7
+%%BACK_HDB%%libexec/openldap/back_hdb.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.2.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.2.so.7
+%%BACKEND%%libexec/openldap/back_ldap.so
+%%BACKEND%%libexec/openldap/back_ldap-2.2.so
+%%BACKEND%%libexec/openldap/back_ldap-2.2.so.7
+%%BACKEND%%libexec/openldap/back_ldbm.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.2.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.2.so.7
+%%BACKEND%%libexec/openldap/back_meta.so
+%%BACKEND%%libexec/openldap/back_meta-2.2.so
+%%BACKEND%%libexec/openldap/back_meta-2.2.so.7
+%%BACKEND%%libexec/openldap/back_monitor.so
+%%BACKEND%%libexec/openldap/back_monitor-2.2.so
+%%BACKEND%%libexec/openldap/back_monitor-2.2.so.7
+%%BACKEND%%libexec/openldap/back_null.so
+%%BACKEND%%libexec/openldap/back_null-2.2.so
+%%BACKEND%%libexec/openldap/back_null-2.2.so.7
+%%BACK_PERL%%libexec/openldap/back_perl.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.2.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.2.so.7
+%%BACK_SHELL%%libexec/openldap/back_shell.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.2.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.2.so.7
+%%BACK_SQL%%libexec/openldap/back_sql.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.2.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.2.so.7
+%%MODULES%%@unexec rmdir %D/libexec/openldap 2>/dev/null || true
libexec/slapd
libexec/slurpd
@comment sbin/slapacl
diff --git a/net/openldap23-client/Makefile b/net/openldap23-client/Makefile
index 172fa7d40eec..f5ce1cde5e5b 100644
--- a/net/openldap23-client/Makefile
+++ b/net/openldap23-client/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -client
COMMENT= Open source LDAP client implementation
diff --git a/net/openldap23-sasl-client/Makefile b/net/openldap23-sasl-client/Makefile
index 5935530d3098..def3d97655fe 100644
--- a/net/openldap23-sasl-client/Makefile
+++ b/net/openldap23-sasl-client/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -sasl-client
COMMENT= Open source LDAP client implementation with SASL2 support
diff --git a/net/openldap23-sasl-server/Makefile b/net/openldap23-sasl-server/Makefile
index 1755a6282f61..7cf17b2ff915 100644
--- a/net/openldap23-sasl-server/Makefile
+++ b/net/openldap23-sasl-server/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -sasl-server
COMMENT= Open source LDAP server implementation with SASL2 support
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}
diff --git a/net/openldap23-server/distinfo b/net/openldap23-server/distinfo
index fd8faae4ae98..cddc18041c23 100644
--- a/net/openldap23-server/distinfo
+++ b/net/openldap23-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (openldap-2.2.14.tgz) = a1831180d986b25f9c9431df430364a6
-SIZE (openldap-2.2.14.tgz) = 2566560
+MD5 (openldap-2.2.15.tgz) = c8b8693fe266db739b53e2719e9b29db
+SIZE (openldap-2.2.15.tgz) = 2575720
diff --git a/net/openldap23-server/files/patch-build::ltmain.sh b/net/openldap23-server/files/patch-build::ltmain.sh
deleted file mode 100644
index 515dd96d8756..000000000000
--- a/net/openldap23-server/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,46 +0,0 @@
---- build/ltmain.sh.orig Thu Jan 1 19:16:25 2004
-+++ build/ltmain.sh Sun Mar 28 14:58:06 2004
-@@ -1076,7 +1076,7 @@
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
-- *-*-openbsd* | *-*-freebsd*)
-+ *-*-openbsd* | *-*-freebsd4*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
-@@ -1088,6 +1088,12 @@
-
- -module)
- module=yes
-+ case $host in
-+ *-*-freebsd*)
-+ # Do not build the useless static library
-+ build_old_libs=no
-+ ;;
-+ esac
- continue
- ;;
-
-@@ -4296,10 +4302,17 @@
- fi
-
- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
-+ case $host in
-+ *-*-freebsd*)
-+ # Do not install the useless pseudo-library
-+ ;;
-+ *)
-+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-+ instname="$dir/$name"i
-+ $show "$install_prog $instname $destdir/$name"
-+ $run eval "$install_prog $instname $destdir/$name" || exit $?
-+ ;;
-+ esac
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
diff --git a/net/openldap23-server/files/patch-configure b/net/openldap23-server/files/patch-configure
index cf5cf042eb50..38e7c135ab71 100644
--- a/net/openldap23-server/files/patch-configure
+++ b/net/openldap23-server/files/patch-configure
@@ -1,20 +1,29 @@
---- configure.orig Wed May 5 11:55:48 2004
-+++ configure Wed May 5 11:56:33 2004
-@@ -20220,7 +20220,7 @@
+--- configure.orig Tue Jul 27 18:33:12 2004
++++ configure Sat Aug 14 17:05:23 2004
+@@ -19497,7 +19497,7 @@
+
+
+ if test $ol_cv_bdb_compat = yes ; then
+- ol_enable_bdb=yes
++ ol_enable_bdb=${ol_enable_bdb-yes}
+ elif test $ol_enable_bdb = yes ; then
+ { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
+ else
+@@ -20349,7 +20349,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-liodbc $LIBS"
+LIBS="-liodbc $LIBS $LTHREAD_LIBS"
cat > conftest.$ac_ext <<EOF
- #line 20226 "configure"
+ #line 20355 "configure"
#include "confdefs.h"
-@@ -20264,7 +20264,7 @@
+@@ -20393,7 +20393,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lodbc $LIBS"
+LIBS="-lodbc $LIBS $LTHREAD_LIBS"
cat > conftest.$ac_ext <<EOF
- #line 20270 "configure"
+ #line 20399 "configure"
#include "confdefs.h"
diff --git a/net/openldap23-server/files/slapd.sh b/net/openldap23-server/files/slapd.sh
index fb77d4374fd0..6c6066220aec 100644
--- a/net/openldap23-server/files/slapd.sh
+++ b/net/openldap23-server/files/slapd.sh
@@ -5,7 +5,7 @@
# PROVIDE: slapd
# REQUIRE: NETWORKING SERVERS
-# BEFORE: DAEMON
+# BEFORE: securelevel
# KEYWORD: FreeBSD shutdown
#
@@ -24,15 +24,15 @@
#slapd_owner="DEFAULT"
#
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
-name=slapd
+name="slapd"
rcvar=`set_rcvar`
-command=%%PREFIX%%/libexec/slapd
-pidfile=%%LDAP_RUN_DIR%%/slapd.pid
-required_dirs=%%LDAP_RUN_DIR%%
-required_files=%%PREFIX%%/etc/openldap/slapd.conf
+command="%%PREFIX%%/libexec/slapd"
+pidfile="%%LDAP_RUN_DIR%%/slapd.pid"
+required_dirs="%%LDAP_RUN_DIR%%"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
start_precmd=start_precmd
start_postcmd=start_postcmd
@@ -41,10 +41,12 @@ start_postcmd=start_postcmd
start_precmd()
{
+ local slapd_ownername slapd_groupname
+
case x"$slapd_owner" in
- x|x[Nn][Oo][Nn][Ee]|x[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
- x*)
+ *)
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
chown -RL "$slapd_owner" "%%DATABASEDIR%%"
chown "$slapd_owner" "%%PREFIX%%/etc/openldap/slapd.conf"
@@ -66,38 +68,39 @@ start_precmd()
start_postcmd()
{
+ local socket seconds
+
for socket in $slapd_sockets; do
for seconds in 1 2 3 4 5; do
[ -e "$socket" ] && break
sleep 1
done
if [ -S "$socket" ]; then
- case x"$slapd_owner" in
- x|x[Nn][Oo][Nn][Ee]|x[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ case "$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
- x*)
+ *)
chown "$slapd_owner" "$socket"
;;
esac
chmod "$slapd_sockets_mode" "$socket"
+ else
+ warn "slapd: Can't find socket $socket"
fi
done
}
-# set defaults
-
-[ -z "$slapd_enable" ] && slapd_enable=NO
-[ -z "$slapd_flags" ] && slapd_flags=
-
-[ -z "$slapd_owner" ] && slapd_owner=ldap:ldap
-[ -z "$slapd_sockets" ] && slapd_sockets=
-[ -z "$slapd_sockets_mode" ] && slapd_sockets_mode=666
-
+# read settings, set defaults
load_rc_config $name
-
-if [ -n "$slapd_args" ]; then
+: ${slapd_enable="NO"}
+if [ -n "${slapd_args+set}" ]; then
warn "slapd_args is deprecated, use slapd_flags"
- slapd_flags="$slapd_args"
+ : ${slapd_flags="$slapd_args"}
+else
+ : ${slapd_flags=""}
fi
+: ${slapd_owner="ldap:ldap"}
+: ${slapd_sockets=""}
+: ${slapd_sockets_mode="666"}
run_rc_command "$1"
diff --git a/net/openldap23-server/files/slurpd.sh b/net/openldap23-server/files/slurpd.sh
index 558f58c1f592..79021305b400 100644
--- a/net/openldap23-server/files/slurpd.sh
+++ b/net/openldap23-server/files/slurpd.sh
@@ -15,22 +15,22 @@
# See slurpd(8) for more flags
#
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
-name=slurpd
+name="slurpd"
rcvar=`set_rcvar`
-command=%%PREFIX%%/libexec/slurpd
-required_files=%%PREFIX%%/etc/openldap/slapd.conf
-
-[ -z "$slurpd_enable" ] && slurpd_enable="NO"
-[ -z "$slurpd_flags" ] && slurpd_flags=
+command="%%PREFIX%%/libexec/slurpd"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
+# read settings, set defaults
load_rc_config $name
-
-if [ -n "$slurpd_args" ]; then
+: ${slurpd_enable="NO"}
+if [ -n "${slurpd_args+set}" ]; then
warn "slurpd_args is deprecated, use slurpd_flags"
- slurpd_flags="$slurpd_args"
+ : ${slurpd_flags="$slurpd_args"}
+else
+ : ${slurpd_flags=""}
fi
run_rc_command "$1"
diff --git a/net/openldap23-server/pkg-install b/net/openldap23-server/pkg-install
index 34ee897a1996..aa9b0cf46da9 100644
--- a/net/openldap23-server/pkg-install
+++ b/net/openldap23-server/pkg-install
@@ -13,12 +13,6 @@ FTPUSERS=/etc/ftpusers
case $2 in
PRE-INSTALL)
- if [ -z "`${PKG_INFO} -I '%%PKGNAME_CLIENT%%' 2> /dev/null`" ]; then
- ${ECHO_CMD} "===> %%PKGNAME%% requires %%PKGNAME_CLIENT%%."
- ${ECHO_CMD}
- ${ECHO_CMD} " Please install %%PKGNAME_CLIENT%% manually."
- exit 1
- fi
if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
${ECHO_CMD}
if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
diff --git a/net/openldap23-server/pkg-message b/net/openldap23-server/pkg-message
index 2317ce44f955..525c9ff88e08 100644
--- a/net/openldap23-server/pkg-message
+++ b/net/openldap23-server/pkg-message
@@ -10,7 +10,7 @@ to suit your needs and add the following lines to /etc/rc.conf:
slapd_sockets="/var/run/openldap/ldapi"
Then start the server with
- %%RC_DIR%%/slapd%%RC_SUFX%% start
+ %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% start
or reboot.
Try `man slapd' and the online manual at
@@ -23,6 +23,6 @@ If you are upgrading, you may want to check your configuration with
grep ^slapd_ /etc/rc.conf
slapd runs under a non-privileged user id (by default `ldap'),
-see %%RC_DIR%%/slapd%%RC_SUFX%% for more information.
+see %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% for more information.
************************************************************
diff --git a/net/openldap23-server/pkg-plist b/net/openldap23-server/pkg-plist
index b1d925c17b8b..193acee2941d 100644
--- a/net/openldap23-server/pkg-plist
+++ b/net/openldap23-server/pkg-plist
@@ -1,6 +1,6 @@
@comment $FreeBSD$
-@unexec %%RC_DIR%%/slapd%%RC_SUFX%% stop 2>&1 >/dev/null || true
-@unexec %%RC_DIR%%/slurpd%%RC_SUFX%% stop 2>&1 >/dev/null || true
+@unexec %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% stop 2>&1 >/dev/null || true
+@unexec %%RC_DIR%%/etc/rc.d/slurpd%%RC_SUFX%% stop 2>&1 >/dev/null || true
etc/openldap/schema/README
@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
etc/openldap/slapd.conf.default
@@ -9,6 +9,38 @@ etc/openldap/slapd.conf.default
%%SLAPI%%lib/libslapi.so
%%SLAPI%%lib/libslapi-2.2.so
%%SLAPI%%lib/libslapi-2.2.so.7
+%%MODULES%%@exec mkdir -p %D/libexec/openldap
+%%BACK_BDB%%libexec/openldap/back_bdb.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.2.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.2.so.7
+%%BACK_HDB%%libexec/openldap/back_hdb.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.2.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.2.so.7
+%%BACKEND%%libexec/openldap/back_ldap.so
+%%BACKEND%%libexec/openldap/back_ldap-2.2.so
+%%BACKEND%%libexec/openldap/back_ldap-2.2.so.7
+%%BACKEND%%libexec/openldap/back_ldbm.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.2.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.2.so.7
+%%BACKEND%%libexec/openldap/back_meta.so
+%%BACKEND%%libexec/openldap/back_meta-2.2.so
+%%BACKEND%%libexec/openldap/back_meta-2.2.so.7
+%%BACKEND%%libexec/openldap/back_monitor.so
+%%BACKEND%%libexec/openldap/back_monitor-2.2.so
+%%BACKEND%%libexec/openldap/back_monitor-2.2.so.7
+%%BACKEND%%libexec/openldap/back_null.so
+%%BACKEND%%libexec/openldap/back_null-2.2.so
+%%BACKEND%%libexec/openldap/back_null-2.2.so.7
+%%BACK_PERL%%libexec/openldap/back_perl.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.2.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.2.so.7
+%%BACK_SHELL%%libexec/openldap/back_shell.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.2.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.2.so.7
+%%BACK_SQL%%libexec/openldap/back_sql.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.2.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.2.so.7
+%%MODULES%%@unexec rmdir %D/libexec/openldap 2>/dev/null || true
libexec/slapd
libexec/slurpd
@comment sbin/slapacl
diff --git a/net/openldap24-client/Makefile b/net/openldap24-client/Makefile
index 172fa7d40eec..f5ce1cde5e5b 100644
--- a/net/openldap24-client/Makefile
+++ b/net/openldap24-client/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -client
COMMENT= Open source LDAP client implementation
diff --git a/net/openldap24-sasl-client/Makefile b/net/openldap24-sasl-client/Makefile
index 5935530d3098..def3d97655fe 100644
--- a/net/openldap24-sasl-client/Makefile
+++ b/net/openldap24-sasl-client/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= openldap
+PKGNAMESUFFIX= -sasl-client
COMMENT= Open source LDAP client implementation with SASL2 support
diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile
index df6f805acedf..d9b277e0a54e 100644
--- a/net/openldap24-server/Makefile
+++ b/net/openldap24-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}
diff --git a/net/openldap24-server/distinfo b/net/openldap24-server/distinfo
index fd8faae4ae98..cddc18041c23 100644
--- a/net/openldap24-server/distinfo
+++ b/net/openldap24-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (openldap-2.2.14.tgz) = a1831180d986b25f9c9431df430364a6
-SIZE (openldap-2.2.14.tgz) = 2566560
+MD5 (openldap-2.2.15.tgz) = c8b8693fe266db739b53e2719e9b29db
+SIZE (openldap-2.2.15.tgz) = 2575720
diff --git a/net/openldap24-server/files/patch-build::ltmain.sh b/net/openldap24-server/files/patch-build::ltmain.sh
deleted file mode 100644
index 515dd96d8756..000000000000
--- a/net/openldap24-server/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,46 +0,0 @@
---- build/ltmain.sh.orig Thu Jan 1 19:16:25 2004
-+++ build/ltmain.sh Sun Mar 28 14:58:06 2004
-@@ -1076,7 +1076,7 @@
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
-- *-*-openbsd* | *-*-freebsd*)
-+ *-*-openbsd* | *-*-freebsd4*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
-@@ -1088,6 +1088,12 @@
-
- -module)
- module=yes
-+ case $host in
-+ *-*-freebsd*)
-+ # Do not build the useless static library
-+ build_old_libs=no
-+ ;;
-+ esac
- continue
- ;;
-
-@@ -4296,10 +4302,17 @@
- fi
-
- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
-+ case $host in
-+ *-*-freebsd*)
-+ # Do not install the useless pseudo-library
-+ ;;
-+ *)
-+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-+ instname="$dir/$name"i
-+ $show "$install_prog $instname $destdir/$name"
-+ $run eval "$install_prog $instname $destdir/$name" || exit $?
-+ ;;
-+ esac
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
diff --git a/net/openldap24-server/files/patch-configure b/net/openldap24-server/files/patch-configure
index cf5cf042eb50..38e7c135ab71 100644
--- a/net/openldap24-server/files/patch-configure
+++ b/net/openldap24-server/files/patch-configure
@@ -1,20 +1,29 @@
---- configure.orig Wed May 5 11:55:48 2004
-+++ configure Wed May 5 11:56:33 2004
-@@ -20220,7 +20220,7 @@
+--- configure.orig Tue Jul 27 18:33:12 2004
++++ configure Sat Aug 14 17:05:23 2004
+@@ -19497,7 +19497,7 @@
+
+
+ if test $ol_cv_bdb_compat = yes ; then
+- ol_enable_bdb=yes
++ ol_enable_bdb=${ol_enable_bdb-yes}
+ elif test $ol_enable_bdb = yes ; then
+ { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
+ else
+@@ -20349,7 +20349,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-liodbc $LIBS"
+LIBS="-liodbc $LIBS $LTHREAD_LIBS"
cat > conftest.$ac_ext <<EOF
- #line 20226 "configure"
+ #line 20355 "configure"
#include "confdefs.h"
-@@ -20264,7 +20264,7 @@
+@@ -20393,7 +20393,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lodbc $LIBS"
+LIBS="-lodbc $LIBS $LTHREAD_LIBS"
cat > conftest.$ac_ext <<EOF
- #line 20270 "configure"
+ #line 20399 "configure"
#include "confdefs.h"
diff --git a/net/openldap24-server/files/slapd.sh b/net/openldap24-server/files/slapd.sh
index fb77d4374fd0..6c6066220aec 100644
--- a/net/openldap24-server/files/slapd.sh
+++ b/net/openldap24-server/files/slapd.sh
@@ -5,7 +5,7 @@
# PROVIDE: slapd
# REQUIRE: NETWORKING SERVERS
-# BEFORE: DAEMON
+# BEFORE: securelevel
# KEYWORD: FreeBSD shutdown
#
@@ -24,15 +24,15 @@
#slapd_owner="DEFAULT"
#
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
-name=slapd
+name="slapd"
rcvar=`set_rcvar`
-command=%%PREFIX%%/libexec/slapd
-pidfile=%%LDAP_RUN_DIR%%/slapd.pid
-required_dirs=%%LDAP_RUN_DIR%%
-required_files=%%PREFIX%%/etc/openldap/slapd.conf
+command="%%PREFIX%%/libexec/slapd"
+pidfile="%%LDAP_RUN_DIR%%/slapd.pid"
+required_dirs="%%LDAP_RUN_DIR%%"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
start_precmd=start_precmd
start_postcmd=start_postcmd
@@ -41,10 +41,12 @@ start_postcmd=start_postcmd
start_precmd()
{
+ local slapd_ownername slapd_groupname
+
case x"$slapd_owner" in
- x|x[Nn][Oo][Nn][Ee]|x[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
- x*)
+ *)
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
chown -RL "$slapd_owner" "%%DATABASEDIR%%"
chown "$slapd_owner" "%%PREFIX%%/etc/openldap/slapd.conf"
@@ -66,38 +68,39 @@ start_precmd()
start_postcmd()
{
+ local socket seconds
+
for socket in $slapd_sockets; do
for seconds in 1 2 3 4 5; do
[ -e "$socket" ] && break
sleep 1
done
if [ -S "$socket" ]; then
- case x"$slapd_owner" in
- x|x[Nn][Oo][Nn][Ee]|x[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ case "$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
- x*)
+ *)
chown "$slapd_owner" "$socket"
;;
esac
chmod "$slapd_sockets_mode" "$socket"
+ else
+ warn "slapd: Can't find socket $socket"
fi
done
}
-# set defaults
-
-[ -z "$slapd_enable" ] && slapd_enable=NO
-[ -z "$slapd_flags" ] && slapd_flags=
-
-[ -z "$slapd_owner" ] && slapd_owner=ldap:ldap
-[ -z "$slapd_sockets" ] && slapd_sockets=
-[ -z "$slapd_sockets_mode" ] && slapd_sockets_mode=666
-
+# read settings, set defaults
load_rc_config $name
-
-if [ -n "$slapd_args" ]; then
+: ${slapd_enable="NO"}
+if [ -n "${slapd_args+set}" ]; then
warn "slapd_args is deprecated, use slapd_flags"
- slapd_flags="$slapd_args"
+ : ${slapd_flags="$slapd_args"}
+else
+ : ${slapd_flags=""}
fi
+: ${slapd_owner="ldap:ldap"}
+: ${slapd_sockets=""}
+: ${slapd_sockets_mode="666"}
run_rc_command "$1"
diff --git a/net/openldap24-server/files/slurpd.sh b/net/openldap24-server/files/slurpd.sh
index 558f58c1f592..79021305b400 100644
--- a/net/openldap24-server/files/slurpd.sh
+++ b/net/openldap24-server/files/slurpd.sh
@@ -15,22 +15,22 @@
# See slurpd(8) for more flags
#
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
-name=slurpd
+name="slurpd"
rcvar=`set_rcvar`
-command=%%PREFIX%%/libexec/slurpd
-required_files=%%PREFIX%%/etc/openldap/slapd.conf
-
-[ -z "$slurpd_enable" ] && slurpd_enable="NO"
-[ -z "$slurpd_flags" ] && slurpd_flags=
+command="%%PREFIX%%/libexec/slurpd"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
+# read settings, set defaults
load_rc_config $name
-
-if [ -n "$slurpd_args" ]; then
+: ${slurpd_enable="NO"}
+if [ -n "${slurpd_args+set}" ]; then
warn "slurpd_args is deprecated, use slurpd_flags"
- slurpd_flags="$slurpd_args"
+ : ${slurpd_flags="$slurpd_args"}
+else
+ : ${slurpd_flags=""}
fi
run_rc_command "$1"
diff --git a/net/openldap24-server/pkg-install b/net/openldap24-server/pkg-install
index 34ee897a1996..aa9b0cf46da9 100644
--- a/net/openldap24-server/pkg-install
+++ b/net/openldap24-server/pkg-install
@@ -13,12 +13,6 @@ FTPUSERS=/etc/ftpusers
case $2 in
PRE-INSTALL)
- if [ -z "`${PKG_INFO} -I '%%PKGNAME_CLIENT%%' 2> /dev/null`" ]; then
- ${ECHO_CMD} "===> %%PKGNAME%% requires %%PKGNAME_CLIENT%%."
- ${ECHO_CMD}
- ${ECHO_CMD} " Please install %%PKGNAME_CLIENT%% manually."
- exit 1
- fi
if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
${ECHO_CMD}
if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
diff --git a/net/openldap24-server/pkg-message b/net/openldap24-server/pkg-message
index 2317ce44f955..525c9ff88e08 100644
--- a/net/openldap24-server/pkg-message
+++ b/net/openldap24-server/pkg-message
@@ -10,7 +10,7 @@ to suit your needs and add the following lines to /etc/rc.conf:
slapd_sockets="/var/run/openldap/ldapi"
Then start the server with
- %%RC_DIR%%/slapd%%RC_SUFX%% start
+ %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% start
or reboot.
Try `man slapd' and the online manual at
@@ -23,6 +23,6 @@ If you are upgrading, you may want to check your configuration with
grep ^slapd_ /etc/rc.conf
slapd runs under a non-privileged user id (by default `ldap'),
-see %%RC_DIR%%/slapd%%RC_SUFX%% for more information.
+see %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% for more information.
************************************************************
diff --git a/net/openldap24-server/pkg-plist b/net/openldap24-server/pkg-plist
index b1d925c17b8b..193acee2941d 100644
--- a/net/openldap24-server/pkg-plist
+++ b/net/openldap24-server/pkg-plist
@@ -1,6 +1,6 @@
@comment $FreeBSD$
-@unexec %%RC_DIR%%/slapd%%RC_SUFX%% stop 2>&1 >/dev/null || true
-@unexec %%RC_DIR%%/slurpd%%RC_SUFX%% stop 2>&1 >/dev/null || true
+@unexec %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% stop 2>&1 >/dev/null || true
+@unexec %%RC_DIR%%/etc/rc.d/slurpd%%RC_SUFX%% stop 2>&1 >/dev/null || true
etc/openldap/schema/README
@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
etc/openldap/slapd.conf.default
@@ -9,6 +9,38 @@ etc/openldap/slapd.conf.default
%%SLAPI%%lib/libslapi.so
%%SLAPI%%lib/libslapi-2.2.so
%%SLAPI%%lib/libslapi-2.2.so.7
+%%MODULES%%@exec mkdir -p %D/libexec/openldap
+%%BACK_BDB%%libexec/openldap/back_bdb.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.2.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.2.so.7
+%%BACK_HDB%%libexec/openldap/back_hdb.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.2.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.2.so.7
+%%BACKEND%%libexec/openldap/back_ldap.so
+%%BACKEND%%libexec/openldap/back_ldap-2.2.so
+%%BACKEND%%libexec/openldap/back_ldap-2.2.so.7
+%%BACKEND%%libexec/openldap/back_ldbm.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.2.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.2.so.7
+%%BACKEND%%libexec/openldap/back_meta.so
+%%BACKEND%%libexec/openldap/back_meta-2.2.so
+%%BACKEND%%libexec/openldap/back_meta-2.2.so.7
+%%BACKEND%%libexec/openldap/back_monitor.so
+%%BACKEND%%libexec/openldap/back_monitor-2.2.so
+%%BACKEND%%libexec/openldap/back_monitor-2.2.so.7
+%%BACKEND%%libexec/openldap/back_null.so
+%%BACKEND%%libexec/openldap/back_null-2.2.so
+%%BACKEND%%libexec/openldap/back_null-2.2.so.7
+%%BACK_PERL%%libexec/openldap/back_perl.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.2.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.2.so.7
+%%BACK_SHELL%%libexec/openldap/back_shell.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.2.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.2.so.7
+%%BACK_SQL%%libexec/openldap/back_sql.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.2.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.2.so.7
+%%MODULES%%@unexec rmdir %D/libexec/openldap 2>/dev/null || true
libexec/slapd
libexec/slurpd
@comment sbin/slapacl