aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/Makefile4
-rw-r--r--net/openldap23-client/Makefile16
-rw-r--r--net/openldap23-sasl-client/Makefile17
-rw-r--r--net/openldap23-sasl-server/Makefile16
-rw-r--r--net/openldap23-server/Makefile436
-rw-r--r--net/openldap23-server/distinfo2
-rw-r--r--net/openldap23-server/files/extrapatch-Makefile.in17
-rw-r--r--net/openldap23-server/files/manpages206
-rw-r--r--net/openldap23-server/files/patch-build::top.mk11
-rw-r--r--net/openldap23-server/files/patch-configure20
-rw-r--r--net/openldap23-server/files/patch-include::ldap_defaults.h11
-rw-r--r--net/openldap23-server/files/patch-servers::slapd::Makefile.in19
-rw-r--r--net/openldap23-server/files/slapd.sh106
-rw-r--r--net/openldap23-server/files/slurpd.sh36
-rw-r--r--net/openldap23-server/pkg-deinstall33
-rw-r--r--net/openldap23-server/pkg-descr12
-rw-r--r--net/openldap23-server/pkg-descr.client13
-rw-r--r--net/openldap23-server/pkg-install44
-rw-r--r--net/openldap23-server/pkg-message32
-rw-r--r--net/openldap23-server/pkg-message.client22
-rw-r--r--net/openldap23-server/pkg-plist60
-rw-r--r--net/openldap23-server/pkg-plist.client42
-rw-r--r--net/openldap24-client/Makefile16
-rw-r--r--net/openldap24-sasl-client/Makefile17
-rw-r--r--net/openldap24-server/Makefile436
-rw-r--r--net/openldap24-server/distinfo2
-rw-r--r--net/openldap24-server/files/extrapatch-Makefile.in17
-rw-r--r--net/openldap24-server/files/manpages206
-rw-r--r--net/openldap24-server/files/patch-build::top.mk11
-rw-r--r--net/openldap24-server/files/patch-configure20
-rw-r--r--net/openldap24-server/files/patch-include::ldap_defaults.h11
-rw-r--r--net/openldap24-server/files/patch-servers::slapd::Makefile.in19
-rw-r--r--net/openldap24-server/files/slapd.sh106
-rw-r--r--net/openldap24-server/files/slurpd.sh36
-rw-r--r--net/openldap24-server/pkg-deinstall33
-rw-r--r--net/openldap24-server/pkg-descr12
-rw-r--r--net/openldap24-server/pkg-descr.client13
-rw-r--r--net/openldap24-server/pkg-install44
-rw-r--r--net/openldap24-server/pkg-message32
-rw-r--r--net/openldap24-server/pkg-message.client22
-rw-r--r--net/openldap24-server/pkg-plist60
-rw-r--r--net/openldap24-server/pkg-plist.client42
42 files changed, 2330 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 454ab38b56c4..4b1d456d0028 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -451,6 +451,10 @@
SUBDIR += openldap22-sasl-client
SUBDIR += openldap22-sasl-server
SUBDIR += openldap22-server
+ SUBDIR += openldap23-client
+ SUBDIR += openldap23-sasl-client
+ SUBDIR += openldap23-sasl-server
+ SUBDIR += openldap23-server
SUBDIR += openmcu
SUBDIR += openntpd
SUBDIR += openradius
diff --git a/net/openldap23-client/Makefile b/net/openldap23-client/Makefile
new file mode 100644
index 000000000000..7d0c00833268
--- /dev/null
+++ b/net/openldap23-client/Makefile
@@ -0,0 +1,16 @@
+# New ports collection makefile for: openldap23-client
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PKGNAMESUFFIX= -client
+
+COMMENT= Open source LDAP client implementation
+
+CLIENT_ONLY= yes
+
+MASTERDIR= ${.CURDIR}/../openldap23-server
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/openldap23-sasl-client/Makefile b/net/openldap23-sasl-client/Makefile
new file mode 100644
index 000000000000..9e084695240b
--- /dev/null
+++ b/net/openldap23-sasl-client/Makefile
@@ -0,0 +1,17 @@
+# New ports collection makefile for: openldap23-sasl-client
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PKGNAMESUFFIX= -sasl-client
+
+COMMENT= Open source LDAP client implementation with SASL2 support
+
+CLIENT_ONLY= yes
+WITH_SASL= yes
+
+MASTERDIR= ${.CURDIR}/../openldap23-server
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/openldap23-sasl-server/Makefile b/net/openldap23-sasl-server/Makefile
new file mode 100644
index 000000000000..a5fac0e907ae
--- /dev/null
+++ b/net/openldap23-sasl-server/Makefile
@@ -0,0 +1,16 @@
+# New ports collection makefile for: openldap23-sasl-server
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PKGNAMESUFFIX= -sasl-server
+
+COMMENT= Open source LDAP server implementation with SASL2 support
+
+WITH_SASL= yes
+
+MASTERDIR= ${.CURDIR}/../openldap23-server
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile
new file mode 100644
index 000000000000..fdee48b28328
--- /dev/null
+++ b/net/openldap23-server/Makefile
@@ -0,0 +1,436 @@
+# New ports collection makefile for: openldap23-server
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= openldap
+DISTVERSION= 2.3.2beta
+PORTREVISION= ${OPENLDAP_PORTREVISION}
+CATEGORIES= net databases
+MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
+ http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
+ ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \
+ ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \
+ ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.shellhung.org/pub/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
+ ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \
+ ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \
+ ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \
+ http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
+MASTER_SITE_SUBDIR= openldap-test
+PKGNAMESUFFIX?= -server
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= vsevolod@highsecure.ru
+COMMENT?= Open source LDAP server implementation
+
+UNIQUENAME?= ${PKGNAMEPREFIX}openldap23
+LATEST_LINK?= ${UNIQUENAME}${PKGNAMESUFFIX}
+
+WANT_OPENLDAP_VER?= 23
+.if ${WANT_OPENLDAP_VER} != 23
+BROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
+.endif
+
+PORTREVISION_CLIENT= 0
+PORTREVISION_SERVER= 0
+
+.if defined(CLIENT_ONLY)
+OPENLDAP_PORTREVISION= ${PORTREVISION_CLIENT}
+OPENLDAP_PKGFILESUFX= .client
+
+.if ${PKGNAMESUFFIX} == "-sasl-client"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.[!3].*
+.elif ${PKGNAMESUFFIX} == "-client"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.[!3].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.*
+.else
+BROKEN= Unknown PKGNAMESUFFIX ${PKGNAMESUFFIX}
+.endif
+
+.if !defined(NOPORTDOCS)
+PORTDOCS= CHANGES drafts rfc
+.endif
+
+.if defined(USE_OPENLDAP)
+IGNORE= : You have \`USE_OPENLDAP' defined either in your environment or in make(1) arguments
+.endif
+.else
+OPENLDAP_PORTREVISION= ${PORTREVISION_SERVER}
+OPENLDAP_PKGFILESUFX=
+
+.if defined(WITH_SASL)
+RUN_DEPENDS= ${LOCALBASE}/lib/libldap-2.3.so.0:${PORTSDIR}/net/openldap23-sasl-client
+.else
+RUN_DEPENDS= ${LOCALBASE}/lib/libldap-2.3.so.0:${PORTSDIR}/net/openldap23-client
+.endif
+
+.if ${PKGNAMESUFFIX} == "-sasl-server"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.[!3].*
+.elif ${PKGNAMESUFFIX} == "-server"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.[!3].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.*
+.else
+BROKEN= Unknown PKGNAMESUFFIX ${PKGNAMESUFFIX}
+.endif
+
+.endif
+
+USE_OPENSSL= yes
+USE_REINPLACE= yes
+USE_LIBTOOL_VER= 15
+
+DESCR= ${PKGDIR}/pkg-descr${OPENLDAP_PKGFILESUFX}
+PLIST= ${PKGDIR}/pkg-plist${OPENLDAP_PKGFILESUFX}
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+
+SCHEMATA= corba core cosine dyngroup \
+ inetorgperson java misc \
+ nis openldap ppolicy
+
+LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= /var/db
+DATABASEDIR?= ${LOCALSTATEDIR}/openldap-data
+SLURPDIR?= ${LOCALSTATEDIR}/openldap-slurp
+
+PLIST_SUB+= LDAP_RUN_DIR=${LDAP_RUN_DIR} \
+ DATABASEDIR=${DATABASEDIR} \
+ SLURPDIR=${SLURPDIR} \
+
+SED_SCRIPT= -e 's,%%PKGNAME%%,${PKGNAME},g' \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
+ -e 's,%%DATABASEDIR%%,${DATABASEDIR},g' \
+ -e 's,%%SLURPDIR%%,${SLURPDIR},g'
+
+CONFIGURE_ARGS= --with-threads=posix \
+ --with-tls=openssl \
+ --enable-dynamic
+
+.if defined(WITH_SASL)
+LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
+CONFIGURE_ARGS+= --with-cyrus-sasl
+.else
+CONFIGURE_ARGS+= --without-cyrus-sasl
+.endif
+
+CONFIGURE_SED+= -e 's,(-lssl) +(-lcrypto),\2 \1,'
+
+.if defined(CLIENT_ONLY)
+# client specific configuration
+
+CONFIGURE_ARGS+= --disable-slapd \
+ --disable-monitor \
+ --disable-bdb \
+ --disable-relay \
+ --disable-glue \
+ --disable-syncprov
+
+INSTALLS_SHLIB= yes
+
+.else
+# server specific configuration
+
+USE_RC_SUBR= yes
+
+EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in
+
+.if defined(WITH_MODULES) || !defined(WITHOUT_DYNAMIC_BACKENDS) || defined(WITH_SLAPI)
+USE_LIBLTDL= yes
+CONFIGURE_ARGS+= --enable-modules
+PLIST_SUB+= MODULES=""
+.else
+PLIST_SUB+= MODULES="@comment "
+.endif
+
+SED_MODULES= -e 's/\(moduleload[ ]*back_[a-z]*\)\.la/\1/'
+
+.if !defined(WITHOUT_DYNAMIC_BACKENDS)
+BACKEND_ENABLE= "mod"
+BACKEND_PLIST= ""
+SED_MODULES+= -e 's/\# *\(modulepath\)/\1/' \
+ -e 's/\# *\(moduleload[ ]*back_bdb\)/\1/'
+.else
+BACKEND_ENABLE= "yes"
+BACKEND_PLIST= "@comment "
+.endif
+
+CONFIGURE_ARGS+= --disable-syncprov
+
+CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
+ --enable-ldbm=${BACKEND_ENABLE} \
+ --enable-crypt \
+ --enable-lmpasswd \
+ --enable-ldap=${BACKEND_ENABLE} \
+ --enable-meta=${BACKEND_ENABLE} \
+ --enable-rewrite \
+ --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(WITH_ACI)
+CONFIGURE_ARGS+= --enable-aci
+.endif
+
+.if defined(WITHOUT_BDB)
+CONFIGURE_ARGS+= --disable-bdb \
+ --disable-hdb \
+ --with-ldbm-api=bcompat
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB="@comment "
+.else
+
+WITH_BDB_VER?= 43
+
+.if ${WITH_BDB_VER} == 43
+CONFIGURE_ARGS+= --enable-bdb=${BACKEND_ENABLE} \
+ --enable-hdb=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_BDB=${BACKEND_PLIST} \
+ BACK_HDB=${BACKEND_PLIST}
+BDBLIB= db-4.3.0
+.elif ${WITH_BDB_VER} == 42
+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 \
+ --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 \
+ --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 \
+ --disable-hdb
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB="@comment "
+BDBLIB= db3.3
+.else
+IGNORE= : WITH_BDB_VER must be 3, 4, 41 or 42
+.endif
+
+LIB_DEPENDS+= ${BDBLIB}:${PORTSDIR}/databases/db${WITH_BDB_VER}
+CPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER}
+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(WITHOUT_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=${BACKEND_ENABLE}
+CONFIGURE_ENV+= PERLBIN="${PERL}"
+PLIST_SUB+= BACK_PERL=${BACKEND_PLIST}
+.else
+PLIST_SUB+= BACK_PERL="@comment "
+.endif
+
+.if defined(WITH_SASL)
+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
+.if ${WITH_ODBC_TYPE:L} == iodbc
+LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
+.elif ${WITH_ODBC_TYPE:L} == unixodbc
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
+.else
+IGNORE= : WITH_ODBC_TYPE must be iODBC or unixODBC
+.endif
+.else
+PLIST_SUB+= BACK_SQL="@comment "
+.endif
+
+.if defined(WITH_SLAPI)
+CONFIGURE_ARGS+= --enable-slapi
+PLIST_SUB+= SLAPI=""
+INSTALLS_SHLIB= yes
+.else
+PLIST_SUB+= SLAPI="@comment "
+.endif
+
+.if defined(WITH_SLP)
+CONFIGURE_ARGS+= --enable-slp
+LIB_DEPENDS+= slp.1:${PORTSDIR}/net/openslp
+.endif
+
+# Include tcp-wrapper support
+.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
+CONFIGURE_ARGS+= --enable-wrappers
+.endif
+
+# end of client/server specific configuration
+.endif
+
+.if defined(WITH_CLDAP)
+CPPFLAGS+= -DLDAP_CONNECTIONLESS
+.endif
+
+CPPFLAGS+= ${PTHREAD_CFLAGS} \
+ -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+#LIBS+= ${PTHREAD_LIBS}
+
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBS="${LIBS}"
+
+.include <bsd.port.pre.mk>
+
+.if defined(CLIENT_ONLY)
+.include "${FILESDIR}/manpages"
+.else
+.if defined(WITH_RCORDER) && ( defined(DFOSVERSION) || ${OSVERSION} >= 500038 )
+RC_DIR= /
+RC_SUFX=
+PLIST_SUB+= RCORDER="" RC_DIR=""
+.else
+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::
+ @${ECHO} "============================================================="
+ @${ECHO}
+ @${ECHO} "You can build ${PKGNAME} with the following options:"
+ @${ECHO}
+.if defined(CLIENT_ONLY)
+ @${ECHO} "WITH_SASL with (Cyrus) SASL2 support"
+.else
+ @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 43)"
+ @${ECHO} "WITH_SASL with (Cyrus) SASL2 password verification"
+ @${ECHO} "WITH_PERL with Perl backend"
+ @${ECHO} "WITHOUT_SHELL without Shell backend"
+ @${ECHO} "WITH_ODBC with SQL backend"
+ @${ECHO} "WITH_ODBC_TYPE select ODBC interface (iODBC or unixODBC)"
+ @${ECHO} "WITH_SLP with SLPv2 (RFC 2608) support"
+ @${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_ACI with per-object ACIs (experimental)"
+ @${ECHO} "WITHOUT_DYNAMIC_BACKENDS build static backends"
+.if defined(DFOSVERSION) || ${OSVERSION} >= 500038
+ @${ECHO} "WITH_RCORDER slapd(1) should start early in the boot process"
+.endif
+.endif
+ @${ECHO}
+ @${ECHO} "============================================================="
+ @${ECHO}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/run/,${LDAP_RUN_DIR}/,g' \
+ ${SED_MODULES} ${WRKSRC}/servers/slapd/slapd.conf
+.if defined(CONFIGURE_SED)
+ @${REINPLACE_CMD} -E ${CONFIGURE_SED} \
+ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+
+pre-configure:
+ @if [ -n "`${PKG_INFO} -xI '^bind\(84\)\{0,1\}-base-8\.' 2>/dev/null`" ]; then \
+ ${ECHO_CMD} "${PKGNAME}: bind installed with PORT_REPLACES_BASE_BIND causes build problems."; \
+ ${FALSE}; \
+ fi
+
+post-build:
+.for script in slapd slurpd
+ @${SED} ${SED_SCRIPT} ${FILESDIR}/${script}.sh >${WRKDIR}/${script}.sh
+.endfor
+.for text in pkg-install pkg-message pkg-deinstall
+ @if [ -f ${PKGDIR}/${text}${OPENLDAP_PKGFILESUFX} ]; then \
+ ${SED} ${SED_SCRIPT} ${PKGDIR}/${text}${OPENLDAP_PKGFILESUFX} \
+ >${WRKDIR}/${text}; \
+ fi
+.endfor
+
+.if !defined(CLIENT_ONLY)
+test: build
+ @cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test
+.endif
+
+pre-install:
+ @if [ -f ${PKGINSTALL} ]; then \
+ ${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
+ fi
+.if defined(WITH_MODULES) || !defined(WITHOUT_DYNAMIC_BACKENDS) || defined(WITH_SLAPI)
+ @${MKDIR} ${DESTDIR}${PREFIX}/libexec/openldap
+.endif
+
+post-install:
+.if defined(CLIENT_ONLY)
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DESTDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${DOCSDIR}
+ @for dir in drafts rfc; do \
+ ${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"; \
+ ${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}
+ @[ "${RC_DIR:S/\/$//}" = "${PREFIX}" ] || ${ECHO_CMD} "@cwd ${RC_DIR}" >>${TMPPLIST}
+.for script in slapd slurpd
+ @${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
+ @[ "${RC_DIR:S/\/$//}" = "${PREFIX}" ] || ${ECHO_CMD} "@cwd ${PREFIX}" >>${TMPPLIST}
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/net/openldap23-server/distinfo b/net/openldap23-server/distinfo
new file mode 100644
index 000000000000..8f1ea248ed6a
--- /dev/null
+++ b/net/openldap23-server/distinfo
@@ -0,0 +1,2 @@
+MD5 (openldap-2.3.2beta.tgz) = e0648b2a42107e1fac4a4fde5c10ebbb
+Size (openldap-2.3.2beta.tgz) = 3045685
diff --git a/net/openldap23-server/files/extrapatch-Makefile.in b/net/openldap23-server/files/extrapatch-Makefile.in
new file mode 100644
index 000000000000..e274e6bd35f2
--- /dev/null
+++ b/net/openldap23-server/files/extrapatch-Makefile.in
@@ -0,0 +1,17 @@
+--- Makefile.in.orig Mon Apr 7 22:23:24 2003
++++ Makefile.in Thu Jul 10 17:43:35 2003
+@@ -13,9 +13,11 @@
+ ## top-level directory of the distribution or, alternatively, at
+ ## <http://www.OpenLDAP.org/license.html>.
+
+-SUBDIRS= include libraries clients servers tests doc
+-CLEANDIRS=
+-INSTALLDIRS=
++SUBDIRS=
++ALLDIRS= include libraries clients servers tests doc
++CLEANDIRS= include libraries clients servers tests doc
++DEPENDDIRS= include libraries clients servers tests doc
++INSTALLDIRS= servers
+
+ makefiles: FORCE
+ ./config.status
diff --git a/net/openldap23-server/files/manpages b/net/openldap23-server/files/manpages
new file mode 100644
index 000000000000..1e15fdb640c8
--- /dev/null
+++ b/net/openldap23-server/files/manpages
@@ -0,0 +1,206 @@
+#
+# $FreeBSD$
+#
+
+MAN1+= ldapcompare.1 \
+ ldapdelete.1 \
+ ldapmodify.1 \
+ ldapmodrdn.1 \
+ ldappasswd.1 \
+ ldapsearch.1 \
+ ldapwhoami.1
+MLINKS+= \
+ ldapmodify.1 ldapadd.1
+
+MAN3+= lber-decode.3 \
+ lber-encode.3 \
+ lber-memory.3 \
+ lber-types.3 \
+ ldap.3 \
+ ldap_abandon.3 \
+ ldap_add.3 \
+ ldap_bind.3 \
+ ldap_compare.3 \
+ ldap_delete.3 \
+ ldap_error.3 \
+ ldap_first_attribute.3 \
+ ldap_first_entry.3 \
+ ldap_first_message.3 \
+ ldap_first_reference.3 \
+ ldap_get_dn.3 \
+ ldap_get_values.3 \
+ ldap_modify.3 \
+ ldap_modrdn.3 \
+ ldap_open.3 \
+ ldap_parse_reference.3 \
+ ldap_parse_result.3 \
+ ldap_result.3 \
+ ldap_schema.3 \
+ ldap_search.3 \
+ ldap_sort.3 \
+ ldap_url.3
+MLINKS+= \
+ lber-decode.3 ber_first_element.3 \
+ lber-decode.3 ber_get_bitstring.3 \
+ lber-decode.3 ber_get_boolean.3 \
+ lber-decode.3 ber_get_enum.3 \
+ lber-decode.3 ber_get_int.3 \
+ lber-decode.3 ber_get_next.3 \
+ lber-decode.3 ber_get_null.3 \
+ lber-decode.3 ber_get_stringa.3 \
+ lber-decode.3 ber_get_stringb.3 \
+ lber-decode.3 ber_next_element.3 \
+ lber-decode.3 ber_peek_tag.3 \
+ lber-decode.3 ber_scanf.3 \
+ lber-decode.3 ber_skip_tag.3 \
+ lber-encode.3 ber_alloc_t.3 \
+ lber-encode.3 ber_flush.3 \
+ lber-encode.3 ber_printf.3 \
+ lber-encode.3 ber_put_enum.3 \
+ lber-encode.3 ber_put_int.3 \
+ lber-encode.3 ber_put_null.3 \
+ lber-encode.3 ber_put_ostring.3 \
+ lber-encode.3 ber_put_seq.3 \
+ lber-encode.3 ber_put_set.3 \
+ lber-encode.3 ber_put_string.3 \
+ lber-encode.3 ber_start_set.3 \
+ lber-types.3 ber_bvarray_add.3 \
+ lber-types.3 ber_bvarray_free.3 \
+ lber-types.3 ber_bvdup.3 \
+ lber-types.3 ber_bvecadd.3 \
+ lber-types.3 ber_bvecfree.3 \
+ lber-types.3 ber_bvfree.3 \
+ lber-types.3 ber_bvstr.3 \
+ lber-types.3 ber_bvstrdup.3 \
+ lber-types.3 ber_dupbv.3 \
+ lber-types.3 ber_free.3 \
+ lber-types.3 ber_str2bv.3 \
+ ldap_abandon.3 ldap_abandon_ext.3 \
+ ldap_add.3 ldap_add_ext.3 \
+ ldap_add.3 ldap_add_ext_s.3 \
+ ldap_add.3 ldap_add_s.3 \
+ ldap_bind.3 ldap_bind_s.3 \
+ ldap_bind.3 ldap_kerberos_bind1.3 \
+ ldap_bind.3 ldap_kerberos_bind1_s.3 \
+ ldap_bind.3 ldap_kerberos_bind2.3 \
+ ldap_bind.3 ldap_kerberos_bind2_s.3 \
+ ldap_bind.3 ldap_kerberos_bind_s.3 \
+ ldap_bind.3 ldap_sasl_bind.3 \
+ ldap_bind.3 ldap_sasl_bind_s.3 \
+ ldap_bind.3 ldap_simple_bind.3 \
+ ldap_bind.3 ldap_simple_bind_s.3 \
+ ldap_bind.3 ldap_unbind.3 \
+ ldap_bind.3 ldap_unbind_ext.3 \
+ ldap_bind.3 ldap_unbind_ext_s.3 \
+ ldap_bind.3 ldap_unbind_s.3 \
+ ldap_compare.3 ldap_compare_ext.3 \
+ ldap_compare.3 ldap_compare_ext_s.3 \
+ ldap_compare.3 ldap_compare_s.3 \
+ ldap_delete.3 ldap_delete_ext.3 \
+ ldap_delete.3 ldap_delete_ext_s.3 \
+ ldap_delete.3 ldap_delete_s.3 \
+ ldap_error.3 ld_errno.3 \
+ ldap_error.3 ldap_err2string.3 \
+ ldap_error.3 ldap_errlist.3 \
+ ldap_error.3 ldap_perror.3 \
+ ldap_error.3 ldap_result2error.3 \
+ ldap_first_attribute.3 ldap_next_attribute.3 \
+ ldap_first_entry.3 ldap_count_entries.3 \
+ ldap_first_entry.3 ldap_next_entry.3 \
+ ldap_first_message.3 ldap_count_messages.3 \
+ ldap_first_message.3 ldap_next_message.3 \
+ ldap_first_reference.3 ldap_count_references.3 \
+ ldap_first_reference.3 ldap_next_reference.3 \
+ ldap_get_dn.3 ldap_dcedn2dn.3 \
+ ldap_get_dn.3 ldap_dn2ad_canonical.3 \
+ ldap_get_dn.3 ldap_dn2dcedn.3 \
+ ldap_get_dn.3 ldap_dn2str.3 \
+ ldap_get_dn.3 ldap_dn2ufn.3 \
+ ldap_get_dn.3 ldap_explode_dn.3 \
+ ldap_get_dn.3 ldap_explode_rdn.3 \
+ ldap_get_dn.3 ldap_str2dn.3 \
+ ldap_get_values.3 ldap_count_values.3 \
+ ldap_get_values.3 ldap_count_values_len.3 \
+ ldap_get_values.3 ldap_get_values_len.3 \
+ ldap_get_values.3 ldap_value_free.3 \
+ ldap_get_values.3 ldap_value_free_len.3 \
+ ldap_modify.3 ldap_modify_ext.3 \
+ ldap_modify.3 ldap_modify_ext_s.3 \
+ ldap_modify.3 ldap_modify_s.3 \
+ ldap_modify.3 ldap_mods_free.3 \
+ ldap_modrdn.3 ldap_modrdn2.3 \
+ ldap_modrdn.3 ldap_modrdn2_s.3 \
+ ldap_modrdn.3 ldap_modrdn_s.3 \
+ ldap_open.3 ldap_init.3 \
+ ldap_parse_result.3 ldap_parse_extended_result.3 \
+ ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
+ ldap_result.3 ldap_msgfree.3 \
+ ldap_result.3 ldap_msgid.3 \
+ ldap_result.3 ldap_msgtype.3 \
+ ldap_schema.3 ldap_attributetype2name.3 \
+ ldap_schema.3 ldap_attributetype2str.3 \
+ ldap_schema.3 ldap_attributetype_free.3 \
+ ldap_schema.3 ldap_matchingrule2name.3 \
+ ldap_schema.3 ldap_matchingrule2str.3 \
+ ldap_schema.3 ldap_matchingrule_free.3 \
+ ldap_schema.3 ldap_objectclass2name.3 \
+ ldap_schema.3 ldap_objectclass2str.3 \
+ ldap_schema.3 ldap_objectclass_free.3 \
+ ldap_schema.3 ldap_scherr2str.3 \
+ ldap_schema.3 ldap_str2attributetype.3 \
+ ldap_schema.3 ldap_str2matchingrule.3 \
+ ldap_schema.3 ldap_str2objectclass.3 \
+ ldap_schema.3 ldap_str2syntax.3 \
+ ldap_schema.3 ldap_syntax2name.3 \
+ ldap_schema.3 ldap_syntax2str.3 \
+ ldap_schema.3 ldap_syntax_free.3 \
+ ldap_search.3 ldap_search_ext.3 \
+ ldap_search.3 ldap_search_ext_s.3 \
+ ldap_search.3 ldap_search_s.3 \
+ ldap_search.3 ldap_search_st.3 \
+ ldap_sort.3 ldap_sort_entries.3 \
+ ldap_sort.3 ldap_sort_strcasecmp.3 \
+ ldap_sort.3 ldap_sort_values.3 \
+ ldap_url.3 ldap_free_urldesc.3 \
+ ldap_url.3 ldap_is_ldap_url.3 \
+ ldap_url.3 ldap_url_parse.3
+
+MAN5+= ldap.conf.5 \
+ ldif.5 \
+ slapd-bdb.5 \
+ slapd-dnssrv.5 \
+ slapd-ldap.5 \
+ slapd-ldbm.5 \
+ slapd-meta.5 \
+ slapd-monitor.5 \
+ slapd-null.5 \
+ slapd-passwd.5 \
+ slapd-perl.5 \
+ slapd-relay.5 \
+ slapd-shell.5 \
+ slapd-sql.5 \
+ slapd-tcl.5 \
+ slapd.access.5 \
+ slapd.conf.5 \
+ slapd.plugin.5 \
+ slapd.replog.5 \
+ slapo-chain.5 \
+ slapo-glue.5 \
+ slapo-lastmod.5 \
+ slapo-pcache.5 \
+ slapo-ppolicy.5 \
+ slapo-refint.5 \
+ slapo-rwm.5 \
+ slapo-syncprov.5 \
+ slapo-unique.5
+
+MAN8+= slapacl.8 \
+ slapadd.8 \
+ slapauth.8 \
+ slapcat.8 \
+ slapd.8 \
+ slapdn.8 \
+ slapindex.8 \
+ slappasswd.8 \
+ slaptest.8 \
+ slurpd.8
diff --git a/net/openldap23-server/files/patch-build::top.mk b/net/openldap23-server/files/patch-build::top.mk
new file mode 100644
index 000000000000..105af6b35122
--- /dev/null
+++ b/net/openldap23-server/files/patch-build::top.mk
@@ -0,0 +1,11 @@
+--- build/top.mk.orig Mon Apr 12 20:21:07 2004
++++ build/top.mk Wed May 5 12:49:13 2004
+@@ -196,6 +196,8 @@
+ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@ @SLAPD_GMP_LIBS@
+ SLURPD_LIBS = @SLURPD_LIBS@
+
++SLAPI_LIBS = @SLAPI_LIBS@
++
+ # Our Defaults
+ CC = $(AC_CC)
+ DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
diff --git a/net/openldap23-server/files/patch-configure b/net/openldap23-server/files/patch-configure
new file mode 100644
index 000000000000..7e4fa565bb17
--- /dev/null
+++ b/net/openldap23-server/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure.orig Tue Jul 27 18:33:12 2004
++++ configure Sat Aug 14 17:05:23 2004
+@@ -21782,7 +21782,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 21788 "configure"
+ #include "confdefs.h"
+@@ -21826,7 +21826,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 21832 "configure"
+ #include "confdefs.h"
diff --git a/net/openldap23-server/files/patch-include::ldap_defaults.h b/net/openldap23-server/files/patch-include::ldap_defaults.h
new file mode 100644
index 000000000000..6ea31dbcd65c
--- /dev/null
+++ b/net/openldap23-server/files/patch-include::ldap_defaults.h
@@ -0,0 +1,11 @@
+--- include/ldap_defaults.h.orig Tue Sep 28 20:18:40 2004
++++ include/ldap_defaults.h Tue Sep 28 20:20:01 2004
+@@ -39,7 +39,7 @@
+ #define LDAP_ENV_PREFIX "LDAP"
+
+ /* default ldapi:// socket */
+-#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"
++#define LDAPI_SOCK "/var/run" LDAP_DIRSEP "openldap" LDAP_DIRSEP "ldapi"
+
+ /*
+ * SLAPD DEFINITIONS
diff --git a/net/openldap23-server/files/patch-servers::slapd::Makefile.in b/net/openldap23-server/files/patch-servers::slapd::Makefile.in
new file mode 100644
index 000000000000..3e0ef3eb771c
--- /dev/null
+++ b/net/openldap23-server/files/patch-servers::slapd::Makefile.in
@@ -0,0 +1,19 @@
+--- servers/slapd/Makefile.in.orig Mon Dec 29 19:10:38 2003
++++ servers/slapd/Makefile.in Tue Jan 20 02:33:39 2004
+@@ -360,7 +360,6 @@
+
+ install-slapd: FORCE
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+- -$(MKDIR) $(DESTDIR)$(localstatedir)/run
+ $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
+ slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
+ @for i in $(SUBDIRS); do \
+@@ -424,8 +423,6 @@
+ install-db-config: FORCE
+ @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
+ @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
+- $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
+- $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
+ $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
+ $(DESTDIR)$(sysconfdir)/DB_CONFIG.example
+
diff --git a/net/openldap23-server/files/slapd.sh b/net/openldap23-server/files/slapd.sh
new file mode 100644
index 000000000000..6c6066220aec
--- /dev/null
+++ b/net/openldap23-server/files/slapd.sh
@@ -0,0 +1,106 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: slapd
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: securelevel
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable slapd:
+#
+#slapd_enable="YES"
+#slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
+#slapd_sockets="/var/run/openldap/ldapi"
+#
+# See slapd(8) for more flags
+#
+# The `-u' and `-g' flags are automatically extracted from slapd_owner,
+# by default slapd runs under the non-privileged user id `ldap'. If you
+# want to run slapd as root, override this in /etc/rc.conf with
+#
+#slapd_owner="DEFAULT"
+#
+
+. "%%RC_SUBR%%"
+
+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"
+
+start_precmd=start_precmd
+start_postcmd=start_postcmd
+
+# extract user and group, adjust ownership of directories and database
+
+start_precmd()
+{
+ local slapd_ownername slapd_groupname
+
+ case x"$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ;;
+ *)
+ chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
+ chown -RL "$slapd_owner" "%%DATABASEDIR%%"
+ chown "$slapd_owner" "%%PREFIX%%/etc/openldap/slapd.conf"
+
+ slapd_ownername=`expr //"$slapd_owner" : //'\([^:]*\)'`
+ slapd_groupname=`expr //"$slapd_owner" : //'.*:\([^:]*\)'`
+
+ if [ -n "$slapd_ownername" ]; then
+ rc_flags="$rc_flags -u $slapd_ownername"
+ fi
+ if [ -n "$slapd_groupname" ]; then
+ rc_flags="$rc_flags -g $slapd_groupname"
+ fi
+ ;;
+ esac
+}
+
+# adjust ownership of created unix sockets
+
+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 "$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ;;
+ *)
+ chown "$slapd_owner" "$socket"
+ ;;
+ esac
+ chmod "$slapd_sockets_mode" "$socket"
+ else
+ warn "slapd: Can't find socket $socket"
+ fi
+ done
+}
+
+# read settings, set defaults
+load_rc_config $name
+: ${slapd_enable="NO"}
+if [ -n "${slapd_args+set}" ]; then
+ warn "slapd_args is deprecated, use slapd_flags"
+ : ${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
new file mode 100644
index 000000000000..79021305b400
--- /dev/null
+++ b/net/openldap23-server/files/slurpd.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: slurpd
+# REQUIRE: slapd
+# BEFORE:
+# KEYWORD: FreeBSD shutdown
+
+# Add the following line to /etc/rc.conf to enable slurpd:
+#
+#slurpd_enable="YES"
+#
+# See slurpd(8) for more flags
+#
+
+. "%%RC_SUBR%%"
+
+name="slurpd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/libexec/slurpd"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
+
+# read settings, set defaults
+load_rc_config $name
+: ${slurpd_enable="NO"}
+if [ -n "${slurpd_args+set}" ]; then
+ warn "slurpd_args is deprecated, use slurpd_flags"
+ : ${slurpd_flags="$slurpd_args"}
+else
+ : ${slurpd_flags=""}
+fi
+
+run_rc_command "$1"
diff --git a/net/openldap23-server/pkg-deinstall b/net/openldap23-server/pkg-deinstall
new file mode 100644
index 000000000000..2a5ec1ef8f65
--- /dev/null
+++ b/net/openldap23-server/pkg-deinstall
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+ECHO_CMD=echo
+
+case $2 in
+POST-DEINSTALL)
+ ${ECHO_CMD}
+ ${ECHO_CMD} "The OpenLDAP server package has been deleted."
+ ${ECHO_CMD} "If you're *not* upgrading and won't be using"
+ ${ECHO_CMD} "it any longer, you may want to issue the"
+ ${ECHO_CMD} "following commands:"
+ ${ECHO_CMD}
+ if [ -d %%DATABASEDIR%% ]; then
+ ${ECHO_CMD} "- to delete the OpenLDAP database permanently (losing all data):"
+ ${ECHO_CMD} " rm -Rf %%DATABASEDIR%%"
+ ${ECHO_CMD}
+ fi
+ if [ -d %%SLURPDIR%% ]; then
+ ${ECHO_CMD} "- to remove the OpenLDAP replication directory:"
+ ${ECHO_CMD} " rm -Rf %%SLURPDIR%%"
+ ${ECHO_CMD}
+ fi
+ ${ECHO_CMD} "- to remove the OpenLDAP user:"
+ ${ECHO_CMD} " pw userdel ldap"
+ ${ECHO_CMD}
+ ${ECHO_CMD} "If you are upgrading, don't forget to restart"
+ ${ECHO_CMD} "slapd and slurpd."
+ ${ECHO_CMD}
+ ;;
+esac
diff --git a/net/openldap23-server/pkg-descr b/net/openldap23-server/pkg-descr
new file mode 100644
index 000000000000..77cca2d8bc81
--- /dev/null
+++ b/net/openldap23-server/pkg-descr
@@ -0,0 +1,12 @@
+OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
+clients, utilities and development tools.
+
+This package includes the following major components:
+
+ * slapd - a stand-alone LDAP directory server
+ * slurpd - a stand-alone LDAP replication server
+ * LDIF tools - data conversion tools for use with slapd
+
+This is an alpha release of OpenLDAP Software for evaluation purposes only.
+
+WWW: http://www.OpenLDAP.org/
diff --git a/net/openldap23-server/pkg-descr.client b/net/openldap23-server/pkg-descr.client
new file mode 100644
index 000000000000..7ac6d7d31d98
--- /dev/null
+++ b/net/openldap23-server/pkg-descr.client
@@ -0,0 +1,13 @@
+OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
+clients, utilities and development tools.
+
+This package includes the following major components:
+
+ * -lldap - a LDAP client library
+ * -llber - a lightweight BER/DER encoding/decoding library
+ * LDAP tools - A collection of command line LDAP utilities
+ * documentation - man pages for all components
+
+This is an alpha release of OpenLDAP Software for evaluation purposes only.
+
+WWW: http://www.OpenLDAP.org/
diff --git a/net/openldap23-server/pkg-install b/net/openldap23-server/pkg-install
new file mode 100644
index 000000000000..aa9b0cf46da9
--- /dev/null
+++ b/net/openldap23-server/pkg-install
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+CHOWN=/usr/sbin/chown
+ECHO_CMD=echo
+GREP=/usr/bin/grep
+PKG_INFO=/usr/sbin/pkg_info
+PW=/usr/sbin/pw
+
+FTPUSERS=/etc/ftpusers
+
+case $2 in
+PRE-INSTALL)
+ if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
+ ${ECHO_CMD}
+ if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
+ if ! ${PW} groupadd -n ldap -g 389; then
+ ${ECHO_CMD} "*** Failed to add a group ldap with id 389."
+ ${ECHO_CMD}
+ ${ECHO_CMD} "Please add the ldap user manually with"
+ ${ECHO_CMD} " ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
+ ${ECHO_CMD} " -d /nonexistent -s /sbin/nologin -h -"
+ ${ECHO_CMD} "and retry installing this package."
+ exit 1
+ fi
+ ${ECHO_CMD} "===> Group 'ldap' created."
+ fi
+ if ! ${PW} useradd -n ldap -u 389 -g ldap -c 'OpenLDAP Server' \
+ -d /nonexistent -s /sbin/nologin -h -; then
+ ${ECHO_CMD} "*** Failed to add an user ldap with id 389."
+ ${ECHO_CMD}
+ ${ECHO_CMD} "Please add the ldap user manually with"
+ ${ECHO_CMD} " ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
+ ${ECHO_CMD} " -d /nonexistent -s /sbin/nologin -h -"
+ ${ECHO_CMD} "and retry installing this package."
+ exit 1
+ fi
+ ${GREP} -qs '^ldap$' ${FTPUSERS} || ${ECHO_CMD} ldap >> ${FTPUSERS}
+ ${ECHO_CMD} "===> Account 'ldap' created."
+ fi
+ ;;
+esac
diff --git a/net/openldap23-server/pkg-message b/net/openldap23-server/pkg-message
new file mode 100644
index 000000000000..0e33140a2747
--- /dev/null
+++ b/net/openldap23-server/pkg-message
@@ -0,0 +1,32 @@
+************************************************************
+
+The OpenLDAP server package has been successfully installed.
+
+In order to run the LDAP server, you need to edit
+ %%PREFIX%%/etc/openldap/slapd.conf
+to suit your needs and add the following lines to /etc/rc.conf:
+ slapd_enable="YES"
+ slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
+ slapd_sockets="/var/run/openldap/ldapi"
+
+Then start the server with
+ %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% start
+or reboot.
+
+Try `man slapd' and the online manual at
+ http://www.OpenLDAP.org/doc/
+for more information.
+
+slapd runs under a non-privileged user id (by default `ldap'),
+see %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% for more information.
+
+************************************************************
+
+############################################################
+
+ CAUTION: This is an alpha release, for evaluation only.
+
+ Do not use in a production environment!
+ Please use OpenLDAP 2.2 instead.
+
+############################################################
diff --git a/net/openldap23-server/pkg-message.client b/net/openldap23-server/pkg-message.client
new file mode 100644
index 000000000000..76a3436a8ca0
--- /dev/null
+++ b/net/openldap23-server/pkg-message.client
@@ -0,0 +1,22 @@
+************************************************************
+
+The OpenLDAP client package has been successfully installed.
+
+Edit
+ %%PREFIX%%/etc/openldap/ldap.conf
+to change the system-wide client defaults.
+
+Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at
+ http://www.OpenLDAP.org/faq/index.cgi?file=3
+for more information.
+
+************************************************************
+
+############################################################
+
+ CAUTION: This is an alpha release, for evaluation only.
+
+ Do not use in a production environment!
+ Please use OpenLDAP 2.2 instead.
+
+############################################################
diff --git a/net/openldap23-server/pkg-plist b/net/openldap23-server/pkg-plist
new file mode 100644
index 000000000000..66b08e8c1aa8
--- /dev/null
+++ b/net/openldap23-server/pkg-plist
@@ -0,0 +1,60 @@
+@comment $FreeBSD$
+@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
+@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
+etc/openldap/DB_CONFIG.example
+%%SLAPI%%lib/libslapi.a
+%%SLAPI%%lib/libslapi.so
+%%SLAPI%%lib/libslapi-2.3.so
+%%SLAPI%%lib/libslapi-2.3.so.0
+%%MODULES%%@exec mkdir -p %D/libexec/openldap
+%%BACK_BDB%%libexec/openldap/back_bdb.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.3.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.3.so.0
+%%BACK_HDB%%libexec/openldap/back_hdb.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.3.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.3.so.0
+%%BACKEND%%libexec/openldap/back_ldap.so
+%%BACKEND%%libexec/openldap/back_ldap-2.3.so
+%%BACKEND%%libexec/openldap/back_ldap-2.3.so.0
+%%BACKEND%%libexec/openldap/back_ldbm.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.3.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.3.so.0
+%%BACKEND%%libexec/openldap/back_meta.so
+%%BACKEND%%libexec/openldap/back_meta-2.3.so
+%%BACKEND%%libexec/openldap/back_meta-2.3.so.0
+%%BACKEND%%libexec/openldap/back_monitor.so
+%%BACKEND%%libexec/openldap/back_monitor-2.3.so
+%%BACKEND%%libexec/openldap/back_monitor-2.3.so.0
+%%BACKEND%%libexec/openldap/back_null.so
+%%BACKEND%%libexec/openldap/back_null-2.3.so
+%%BACKEND%%libexec/openldap/back_null-2.3.so.0
+%%BACK_PERL%%libexec/openldap/back_perl.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.3.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.3.so.0
+%%BACK_SHELL%%libexec/openldap/back_shell.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.3.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.3.so.0
+%%BACK_SQL%%libexec/openldap/back_sql.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.3.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.3.so.0
+%%MODULES%%@unexec rmdir %D/libexec/openldap 2>/dev/null || true
+libexec/slapd
+libexec/slurpd
+sbin/slapacl
+sbin/slapadd
+sbin/slapauth
+sbin/slapcat
+sbin/slapdn
+sbin/slapindex
+sbin/slappasswd
+sbin/slaptest
+@exec mkdir -p %%LDAP_RUN_DIR%%
+@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+@exec mkdir -p %%DATABASEDIR%%
+@unexec rmdir %%DATABASEDIR%% 2>/dev/null || true
+@exec mkdir -p %%SLURPDIR%%
+@unexec rmdir %%SLURPDIR%% 2>/dev/null || true
diff --git a/net/openldap23-server/pkg-plist.client b/net/openldap23-server/pkg-plist.client
new file mode 100644
index 000000000000..fcae8b45066a
--- /dev/null
+++ b/net/openldap23-server/pkg-plist.client
@@ -0,0 +1,42 @@
+@comment $FreeBSD$
+bin/ldapadd
+bin/ldapcompare
+bin/ldapdelete
+bin/ldapmodify
+bin/ldapmodrdn
+bin/ldappasswd
+bin/ldapsearch
+bin/ldapwhoami
+@unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi
+etc/openldap/ldap.conf.default
+@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
+@unexec rmdir %D/etc/openldap 2>/dev/null || true
+include/lber.h
+include/lber_types.h
+include/ldap.h
+include/ldap_cdefs.h
+include/ldap_features.h
+include/ldap_schema.h
+include/ldap_utf8.h
+include/slapi-plugin.h
+lib/liblber.a
+lib/liblber.so
+lib/liblber-2.3.so
+lib/liblber-2.3.so.0
+lib/libldap.a
+lib/libldap.so
+lib/libldap-2.3.so
+lib/libldap-2.3.so.0
+lib/libldap_r.a
+lib/libldap_r.so
+lib/libldap_r-2.3.so
+lib/libldap_r-2.3.so.0
+@comment share/openldap/ucdata/case.dat
+@comment share/openldap/ucdata/cmbcl.dat
+@comment share/openldap/ucdata/comp.dat
+@comment share/openldap/ucdata/ctype.dat
+@comment share/openldap/ucdata/decomp.dat
+@comment share/openldap/ucdata/kdecomp.dat
+@comment share/openldap/ucdata/num.dat
+@comment @dirrm share/openldap/ucdata
+@comment @dirrm share/openldap
diff --git a/net/openldap24-client/Makefile b/net/openldap24-client/Makefile
new file mode 100644
index 000000000000..7d0c00833268
--- /dev/null
+++ b/net/openldap24-client/Makefile
@@ -0,0 +1,16 @@
+# New ports collection makefile for: openldap23-client
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PKGNAMESUFFIX= -client
+
+COMMENT= Open source LDAP client implementation
+
+CLIENT_ONLY= yes
+
+MASTERDIR= ${.CURDIR}/../openldap23-server
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/openldap24-sasl-client/Makefile b/net/openldap24-sasl-client/Makefile
new file mode 100644
index 000000000000..9e084695240b
--- /dev/null
+++ b/net/openldap24-sasl-client/Makefile
@@ -0,0 +1,17 @@
+# New ports collection makefile for: openldap23-sasl-client
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PKGNAMESUFFIX= -sasl-client
+
+COMMENT= Open source LDAP client implementation with SASL2 support
+
+CLIENT_ONLY= yes
+WITH_SASL= yes
+
+MASTERDIR= ${.CURDIR}/../openldap23-server
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile
new file mode 100644
index 000000000000..fdee48b28328
--- /dev/null
+++ b/net/openldap24-server/Makefile
@@ -0,0 +1,436 @@
+# New ports collection makefile for: openldap23-server
+# Date created: 02 May 2005
+# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= openldap
+DISTVERSION= 2.3.2beta
+PORTREVISION= ${OPENLDAP_PORTREVISION}
+CATEGORIES= net databases
+MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
+ http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
+ ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \
+ ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \
+ ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.shellhung.org/pub/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
+ ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \
+ ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \
+ ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \
+ http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \
+ ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
+MASTER_SITE_SUBDIR= openldap-test
+PKGNAMESUFFIX?= -server
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= vsevolod@highsecure.ru
+COMMENT?= Open source LDAP server implementation
+
+UNIQUENAME?= ${PKGNAMEPREFIX}openldap23
+LATEST_LINK?= ${UNIQUENAME}${PKGNAMESUFFIX}
+
+WANT_OPENLDAP_VER?= 23
+.if ${WANT_OPENLDAP_VER} != 23
+BROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
+.endif
+
+PORTREVISION_CLIENT= 0
+PORTREVISION_SERVER= 0
+
+.if defined(CLIENT_ONLY)
+OPENLDAP_PORTREVISION= ${PORTREVISION_CLIENT}
+OPENLDAP_PKGFILESUFX= .client
+
+.if ${PKGNAMESUFFIX} == "-sasl-client"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.[!3].*
+.elif ${PKGNAMESUFFIX} == "-client"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.[!3].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.*
+.else
+BROKEN= Unknown PKGNAMESUFFIX ${PKGNAMESUFFIX}
+.endif
+
+.if !defined(NOPORTDOCS)
+PORTDOCS= CHANGES drafts rfc
+.endif
+
+.if defined(USE_OPENLDAP)
+IGNORE= : You have \`USE_OPENLDAP' defined either in your environment or in make(1) arguments
+.endif
+.else
+OPENLDAP_PORTREVISION= ${PORTREVISION_SERVER}
+OPENLDAP_PKGFILESUFX=
+
+.if defined(WITH_SASL)
+RUN_DEPENDS= ${LOCALBASE}/lib/libldap-2.3.so.0:${PORTSDIR}/net/openldap23-sasl-client
+.else
+RUN_DEPENDS= ${LOCALBASE}/lib/libldap-2.3.so.0:${PORTSDIR}/net/openldap23-client
+.endif
+
+.if ${PKGNAMESUFFIX} == "-sasl-server"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.[!3].*
+.elif ${PKGNAMESUFFIX} == "-server"
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.[!3].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.*
+.else
+BROKEN= Unknown PKGNAMESUFFIX ${PKGNAMESUFFIX}
+.endif
+
+.endif
+
+USE_OPENSSL= yes
+USE_REINPLACE= yes
+USE_LIBTOOL_VER= 15
+
+DESCR= ${PKGDIR}/pkg-descr${OPENLDAP_PKGFILESUFX}
+PLIST= ${PKGDIR}/pkg-plist${OPENLDAP_PKGFILESUFX}
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+
+SCHEMATA= corba core cosine dyngroup \
+ inetorgperson java misc \
+ nis openldap ppolicy
+
+LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= /var/db
+DATABASEDIR?= ${LOCALSTATEDIR}/openldap-data
+SLURPDIR?= ${LOCALSTATEDIR}/openldap-slurp
+
+PLIST_SUB+= LDAP_RUN_DIR=${LDAP_RUN_DIR} \
+ DATABASEDIR=${DATABASEDIR} \
+ SLURPDIR=${SLURPDIR} \
+
+SED_SCRIPT= -e 's,%%PKGNAME%%,${PKGNAME},g' \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
+ -e 's,%%DATABASEDIR%%,${DATABASEDIR},g' \
+ -e 's,%%SLURPDIR%%,${SLURPDIR},g'
+
+CONFIGURE_ARGS= --with-threads=posix \
+ --with-tls=openssl \
+ --enable-dynamic
+
+.if defined(WITH_SASL)
+LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
+CONFIGURE_ARGS+= --with-cyrus-sasl
+.else
+CONFIGURE_ARGS+= --without-cyrus-sasl
+.endif
+
+CONFIGURE_SED+= -e 's,(-lssl) +(-lcrypto),\2 \1,'
+
+.if defined(CLIENT_ONLY)
+# client specific configuration
+
+CONFIGURE_ARGS+= --disable-slapd \
+ --disable-monitor \
+ --disable-bdb \
+ --disable-relay \
+ --disable-glue \
+ --disable-syncprov
+
+INSTALLS_SHLIB= yes
+
+.else
+# server specific configuration
+
+USE_RC_SUBR= yes
+
+EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in
+
+.if defined(WITH_MODULES) || !defined(WITHOUT_DYNAMIC_BACKENDS) || defined(WITH_SLAPI)
+USE_LIBLTDL= yes
+CONFIGURE_ARGS+= --enable-modules
+PLIST_SUB+= MODULES=""
+.else
+PLIST_SUB+= MODULES="@comment "
+.endif
+
+SED_MODULES= -e 's/\(moduleload[ ]*back_[a-z]*\)\.la/\1/'
+
+.if !defined(WITHOUT_DYNAMIC_BACKENDS)
+BACKEND_ENABLE= "mod"
+BACKEND_PLIST= ""
+SED_MODULES+= -e 's/\# *\(modulepath\)/\1/' \
+ -e 's/\# *\(moduleload[ ]*back_bdb\)/\1/'
+.else
+BACKEND_ENABLE= "yes"
+BACKEND_PLIST= "@comment "
+.endif
+
+CONFIGURE_ARGS+= --disable-syncprov
+
+CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
+ --enable-ldbm=${BACKEND_ENABLE} \
+ --enable-crypt \
+ --enable-lmpasswd \
+ --enable-ldap=${BACKEND_ENABLE} \
+ --enable-meta=${BACKEND_ENABLE} \
+ --enable-rewrite \
+ --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(WITH_ACI)
+CONFIGURE_ARGS+= --enable-aci
+.endif
+
+.if defined(WITHOUT_BDB)
+CONFIGURE_ARGS+= --disable-bdb \
+ --disable-hdb \
+ --with-ldbm-api=bcompat
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB="@comment "
+.else
+
+WITH_BDB_VER?= 43
+
+.if ${WITH_BDB_VER} == 43
+CONFIGURE_ARGS+= --enable-bdb=${BACKEND_ENABLE} \
+ --enable-hdb=${BACKEND_ENABLE}
+PLIST_SUB+= BACK_BDB=${BACKEND_PLIST} \
+ BACK_HDB=${BACKEND_PLIST}
+BDBLIB= db-4.3.0
+.elif ${WITH_BDB_VER} == 42
+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 \
+ --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 \
+ --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 \
+ --disable-hdb
+PLIST_SUB+= BACK_BDB="@comment " \
+ BACK_HDB="@comment "
+BDBLIB= db3.3
+.else
+IGNORE= : WITH_BDB_VER must be 3, 4, 41 or 42
+.endif
+
+LIB_DEPENDS+= ${BDBLIB}:${PORTSDIR}/databases/db${WITH_BDB_VER}
+CPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER}
+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(WITHOUT_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=${BACKEND_ENABLE}
+CONFIGURE_ENV+= PERLBIN="${PERL}"
+PLIST_SUB+= BACK_PERL=${BACKEND_PLIST}
+.else
+PLIST_SUB+= BACK_PERL="@comment "
+.endif
+
+.if defined(WITH_SASL)
+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
+.if ${WITH_ODBC_TYPE:L} == iodbc
+LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
+.elif ${WITH_ODBC_TYPE:L} == unixodbc
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
+.else
+IGNORE= : WITH_ODBC_TYPE must be iODBC or unixODBC
+.endif
+.else
+PLIST_SUB+= BACK_SQL="@comment "
+.endif
+
+.if defined(WITH_SLAPI)
+CONFIGURE_ARGS+= --enable-slapi
+PLIST_SUB+= SLAPI=""
+INSTALLS_SHLIB= yes
+.else
+PLIST_SUB+= SLAPI="@comment "
+.endif
+
+.if defined(WITH_SLP)
+CONFIGURE_ARGS+= --enable-slp
+LIB_DEPENDS+= slp.1:${PORTSDIR}/net/openslp
+.endif
+
+# Include tcp-wrapper support
+.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
+CONFIGURE_ARGS+= --enable-wrappers
+.endif
+
+# end of client/server specific configuration
+.endif
+
+.if defined(WITH_CLDAP)
+CPPFLAGS+= -DLDAP_CONNECTIONLESS
+.endif
+
+CPPFLAGS+= ${PTHREAD_CFLAGS} \
+ -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+#LIBS+= ${PTHREAD_LIBS}
+
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBS="${LIBS}"
+
+.include <bsd.port.pre.mk>
+
+.if defined(CLIENT_ONLY)
+.include "${FILESDIR}/manpages"
+.else
+.if defined(WITH_RCORDER) && ( defined(DFOSVERSION) || ${OSVERSION} >= 500038 )
+RC_DIR= /
+RC_SUFX=
+PLIST_SUB+= RCORDER="" RC_DIR=""
+.else
+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::
+ @${ECHO} "============================================================="
+ @${ECHO}
+ @${ECHO} "You can build ${PKGNAME} with the following options:"
+ @${ECHO}
+.if defined(CLIENT_ONLY)
+ @${ECHO} "WITH_SASL with (Cyrus) SASL2 support"
+.else
+ @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 43)"
+ @${ECHO} "WITH_SASL with (Cyrus) SASL2 password verification"
+ @${ECHO} "WITH_PERL with Perl backend"
+ @${ECHO} "WITHOUT_SHELL without Shell backend"
+ @${ECHO} "WITH_ODBC with SQL backend"
+ @${ECHO} "WITH_ODBC_TYPE select ODBC interface (iODBC or unixODBC)"
+ @${ECHO} "WITH_SLP with SLPv2 (RFC 2608) support"
+ @${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_ACI with per-object ACIs (experimental)"
+ @${ECHO} "WITHOUT_DYNAMIC_BACKENDS build static backends"
+.if defined(DFOSVERSION) || ${OSVERSION} >= 500038
+ @${ECHO} "WITH_RCORDER slapd(1) should start early in the boot process"
+.endif
+.endif
+ @${ECHO}
+ @${ECHO} "============================================================="
+ @${ECHO}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/run/,${LDAP_RUN_DIR}/,g' \
+ ${SED_MODULES} ${WRKSRC}/servers/slapd/slapd.conf
+.if defined(CONFIGURE_SED)
+ @${REINPLACE_CMD} -E ${CONFIGURE_SED} \
+ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+
+pre-configure:
+ @if [ -n "`${PKG_INFO} -xI '^bind\(84\)\{0,1\}-base-8\.' 2>/dev/null`" ]; then \
+ ${ECHO_CMD} "${PKGNAME}: bind installed with PORT_REPLACES_BASE_BIND causes build problems."; \
+ ${FALSE}; \
+ fi
+
+post-build:
+.for script in slapd slurpd
+ @${SED} ${SED_SCRIPT} ${FILESDIR}/${script}.sh >${WRKDIR}/${script}.sh
+.endfor
+.for text in pkg-install pkg-message pkg-deinstall
+ @if [ -f ${PKGDIR}/${text}${OPENLDAP_PKGFILESUFX} ]; then \
+ ${SED} ${SED_SCRIPT} ${PKGDIR}/${text}${OPENLDAP_PKGFILESUFX} \
+ >${WRKDIR}/${text}; \
+ fi
+.endfor
+
+.if !defined(CLIENT_ONLY)
+test: build
+ @cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test
+.endif
+
+pre-install:
+ @if [ -f ${PKGINSTALL} ]; then \
+ ${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
+ fi
+.if defined(WITH_MODULES) || !defined(WITHOUT_DYNAMIC_BACKENDS) || defined(WITH_SLAPI)
+ @${MKDIR} ${DESTDIR}${PREFIX}/libexec/openldap
+.endif
+
+post-install:
+.if defined(CLIENT_ONLY)
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DESTDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${DOCSDIR}
+ @for dir in drafts rfc; do \
+ ${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"; \
+ ${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}
+ @[ "${RC_DIR:S/\/$//}" = "${PREFIX}" ] || ${ECHO_CMD} "@cwd ${RC_DIR}" >>${TMPPLIST}
+.for script in slapd slurpd
+ @${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
+ @[ "${RC_DIR:S/\/$//}" = "${PREFIX}" ] || ${ECHO_CMD} "@cwd ${PREFIX}" >>${TMPPLIST}
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/net/openldap24-server/distinfo b/net/openldap24-server/distinfo
new file mode 100644
index 000000000000..8f1ea248ed6a
--- /dev/null
+++ b/net/openldap24-server/distinfo
@@ -0,0 +1,2 @@
+MD5 (openldap-2.3.2beta.tgz) = e0648b2a42107e1fac4a4fde5c10ebbb
+Size (openldap-2.3.2beta.tgz) = 3045685
diff --git a/net/openldap24-server/files/extrapatch-Makefile.in b/net/openldap24-server/files/extrapatch-Makefile.in
new file mode 100644
index 000000000000..e274e6bd35f2
--- /dev/null
+++ b/net/openldap24-server/files/extrapatch-Makefile.in
@@ -0,0 +1,17 @@
+--- Makefile.in.orig Mon Apr 7 22:23:24 2003
++++ Makefile.in Thu Jul 10 17:43:35 2003
+@@ -13,9 +13,11 @@
+ ## top-level directory of the distribution or, alternatively, at
+ ## <http://www.OpenLDAP.org/license.html>.
+
+-SUBDIRS= include libraries clients servers tests doc
+-CLEANDIRS=
+-INSTALLDIRS=
++SUBDIRS=
++ALLDIRS= include libraries clients servers tests doc
++CLEANDIRS= include libraries clients servers tests doc
++DEPENDDIRS= include libraries clients servers tests doc
++INSTALLDIRS= servers
+
+ makefiles: FORCE
+ ./config.status
diff --git a/net/openldap24-server/files/manpages b/net/openldap24-server/files/manpages
new file mode 100644
index 000000000000..1e15fdb640c8
--- /dev/null
+++ b/net/openldap24-server/files/manpages
@@ -0,0 +1,206 @@
+#
+# $FreeBSD$
+#
+
+MAN1+= ldapcompare.1 \
+ ldapdelete.1 \
+ ldapmodify.1 \
+ ldapmodrdn.1 \
+ ldappasswd.1 \
+ ldapsearch.1 \
+ ldapwhoami.1
+MLINKS+= \
+ ldapmodify.1 ldapadd.1
+
+MAN3+= lber-decode.3 \
+ lber-encode.3 \
+ lber-memory.3 \
+ lber-types.3 \
+ ldap.3 \
+ ldap_abandon.3 \
+ ldap_add.3 \
+ ldap_bind.3 \
+ ldap_compare.3 \
+ ldap_delete.3 \
+ ldap_error.3 \
+ ldap_first_attribute.3 \
+ ldap_first_entry.3 \
+ ldap_first_message.3 \
+ ldap_first_reference.3 \
+ ldap_get_dn.3 \
+ ldap_get_values.3 \
+ ldap_modify.3 \
+ ldap_modrdn.3 \
+ ldap_open.3 \
+ ldap_parse_reference.3 \
+ ldap_parse_result.3 \
+ ldap_result.3 \
+ ldap_schema.3 \
+ ldap_search.3 \
+ ldap_sort.3 \
+ ldap_url.3
+MLINKS+= \
+ lber-decode.3 ber_first_element.3 \
+ lber-decode.3 ber_get_bitstring.3 \
+ lber-decode.3 ber_get_boolean.3 \
+ lber-decode.3 ber_get_enum.3 \
+ lber-decode.3 ber_get_int.3 \
+ lber-decode.3 ber_get_next.3 \
+ lber-decode.3 ber_get_null.3 \
+ lber-decode.3 ber_get_stringa.3 \
+ lber-decode.3 ber_get_stringb.3 \
+ lber-decode.3 ber_next_element.3 \
+ lber-decode.3 ber_peek_tag.3 \
+ lber-decode.3 ber_scanf.3 \
+ lber-decode.3 ber_skip_tag.3 \
+ lber-encode.3 ber_alloc_t.3 \
+ lber-encode.3 ber_flush.3 \
+ lber-encode.3 ber_printf.3 \
+ lber-encode.3 ber_put_enum.3 \
+ lber-encode.3 ber_put_int.3 \
+ lber-encode.3 ber_put_null.3 \
+ lber-encode.3 ber_put_ostring.3 \
+ lber-encode.3 ber_put_seq.3 \
+ lber-encode.3 ber_put_set.3 \
+ lber-encode.3 ber_put_string.3 \
+ lber-encode.3 ber_start_set.3 \
+ lber-types.3 ber_bvarray_add.3 \
+ lber-types.3 ber_bvarray_free.3 \
+ lber-types.3 ber_bvdup.3 \
+ lber-types.3 ber_bvecadd.3 \
+ lber-types.3 ber_bvecfree.3 \
+ lber-types.3 ber_bvfree.3 \
+ lber-types.3 ber_bvstr.3 \
+ lber-types.3 ber_bvstrdup.3 \
+ lber-types.3 ber_dupbv.3 \
+ lber-types.3 ber_free.3 \
+ lber-types.3 ber_str2bv.3 \
+ ldap_abandon.3 ldap_abandon_ext.3 \
+ ldap_add.3 ldap_add_ext.3 \
+ ldap_add.3 ldap_add_ext_s.3 \
+ ldap_add.3 ldap_add_s.3 \
+ ldap_bind.3 ldap_bind_s.3 \
+ ldap_bind.3 ldap_kerberos_bind1.3 \
+ ldap_bind.3 ldap_kerberos_bind1_s.3 \
+ ldap_bind.3 ldap_kerberos_bind2.3 \
+ ldap_bind.3 ldap_kerberos_bind2_s.3 \
+ ldap_bind.3 ldap_kerberos_bind_s.3 \
+ ldap_bind.3 ldap_sasl_bind.3 \
+ ldap_bind.3 ldap_sasl_bind_s.3 \
+ ldap_bind.3 ldap_simple_bind.3 \
+ ldap_bind.3 ldap_simple_bind_s.3 \
+ ldap_bind.3 ldap_unbind.3 \
+ ldap_bind.3 ldap_unbind_ext.3 \
+ ldap_bind.3 ldap_unbind_ext_s.3 \
+ ldap_bind.3 ldap_unbind_s.3 \
+ ldap_compare.3 ldap_compare_ext.3 \
+ ldap_compare.3 ldap_compare_ext_s.3 \
+ ldap_compare.3 ldap_compare_s.3 \
+ ldap_delete.3 ldap_delete_ext.3 \
+ ldap_delete.3 ldap_delete_ext_s.3 \
+ ldap_delete.3 ldap_delete_s.3 \
+ ldap_error.3 ld_errno.3 \
+ ldap_error.3 ldap_err2string.3 \
+ ldap_error.3 ldap_errlist.3 \
+ ldap_error.3 ldap_perror.3 \
+ ldap_error.3 ldap_result2error.3 \
+ ldap_first_attribute.3 ldap_next_attribute.3 \
+ ldap_first_entry.3 ldap_count_entries.3 \
+ ldap_first_entry.3 ldap_next_entry.3 \
+ ldap_first_message.3 ldap_count_messages.3 \
+ ldap_first_message.3 ldap_next_message.3 \
+ ldap_first_reference.3 ldap_count_references.3 \
+ ldap_first_reference.3 ldap_next_reference.3 \
+ ldap_get_dn.3 ldap_dcedn2dn.3 \
+ ldap_get_dn.3 ldap_dn2ad_canonical.3 \
+ ldap_get_dn.3 ldap_dn2dcedn.3 \
+ ldap_get_dn.3 ldap_dn2str.3 \
+ ldap_get_dn.3 ldap_dn2ufn.3 \
+ ldap_get_dn.3 ldap_explode_dn.3 \
+ ldap_get_dn.3 ldap_explode_rdn.3 \
+ ldap_get_dn.3 ldap_str2dn.3 \
+ ldap_get_values.3 ldap_count_values.3 \
+ ldap_get_values.3 ldap_count_values_len.3 \
+ ldap_get_values.3 ldap_get_values_len.3 \
+ ldap_get_values.3 ldap_value_free.3 \
+ ldap_get_values.3 ldap_value_free_len.3 \
+ ldap_modify.3 ldap_modify_ext.3 \
+ ldap_modify.3 ldap_modify_ext_s.3 \
+ ldap_modify.3 ldap_modify_s.3 \
+ ldap_modify.3 ldap_mods_free.3 \
+ ldap_modrdn.3 ldap_modrdn2.3 \
+ ldap_modrdn.3 ldap_modrdn2_s.3 \
+ ldap_modrdn.3 ldap_modrdn_s.3 \
+ ldap_open.3 ldap_init.3 \
+ ldap_parse_result.3 ldap_parse_extended_result.3 \
+ ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
+ ldap_result.3 ldap_msgfree.3 \
+ ldap_result.3 ldap_msgid.3 \
+ ldap_result.3 ldap_msgtype.3 \
+ ldap_schema.3 ldap_attributetype2name.3 \
+ ldap_schema.3 ldap_attributetype2str.3 \
+ ldap_schema.3 ldap_attributetype_free.3 \
+ ldap_schema.3 ldap_matchingrule2name.3 \
+ ldap_schema.3 ldap_matchingrule2str.3 \
+ ldap_schema.3 ldap_matchingrule_free.3 \
+ ldap_schema.3 ldap_objectclass2name.3 \
+ ldap_schema.3 ldap_objectclass2str.3 \
+ ldap_schema.3 ldap_objectclass_free.3 \
+ ldap_schema.3 ldap_scherr2str.3 \
+ ldap_schema.3 ldap_str2attributetype.3 \
+ ldap_schema.3 ldap_str2matchingrule.3 \
+ ldap_schema.3 ldap_str2objectclass.3 \
+ ldap_schema.3 ldap_str2syntax.3 \
+ ldap_schema.3 ldap_syntax2name.3 \
+ ldap_schema.3 ldap_syntax2str.3 \
+ ldap_schema.3 ldap_syntax_free.3 \
+ ldap_search.3 ldap_search_ext.3 \
+ ldap_search.3 ldap_search_ext_s.3 \
+ ldap_search.3 ldap_search_s.3 \
+ ldap_search.3 ldap_search_st.3 \
+ ldap_sort.3 ldap_sort_entries.3 \
+ ldap_sort.3 ldap_sort_strcasecmp.3 \
+ ldap_sort.3 ldap_sort_values.3 \
+ ldap_url.3 ldap_free_urldesc.3 \
+ ldap_url.3 ldap_is_ldap_url.3 \
+ ldap_url.3 ldap_url_parse.3
+
+MAN5+= ldap.conf.5 \
+ ldif.5 \
+ slapd-bdb.5 \
+ slapd-dnssrv.5 \
+ slapd-ldap.5 \
+ slapd-ldbm.5 \
+ slapd-meta.5 \
+ slapd-monitor.5 \
+ slapd-null.5 \
+ slapd-passwd.5 \
+ slapd-perl.5 \
+ slapd-relay.5 \
+ slapd-shell.5 \
+ slapd-sql.5 \
+ slapd-tcl.5 \
+ slapd.access.5 \
+ slapd.conf.5 \
+ slapd.plugin.5 \
+ slapd.replog.5 \
+ slapo-chain.5 \
+ slapo-glue.5 \
+ slapo-lastmod.5 \
+ slapo-pcache.5 \
+ slapo-ppolicy.5 \
+ slapo-refint.5 \
+ slapo-rwm.5 \
+ slapo-syncprov.5 \
+ slapo-unique.5
+
+MAN8+= slapacl.8 \
+ slapadd.8 \
+ slapauth.8 \
+ slapcat.8 \
+ slapd.8 \
+ slapdn.8 \
+ slapindex.8 \
+ slappasswd.8 \
+ slaptest.8 \
+ slurpd.8
diff --git a/net/openldap24-server/files/patch-build::top.mk b/net/openldap24-server/files/patch-build::top.mk
new file mode 100644
index 000000000000..105af6b35122
--- /dev/null
+++ b/net/openldap24-server/files/patch-build::top.mk
@@ -0,0 +1,11 @@
+--- build/top.mk.orig Mon Apr 12 20:21:07 2004
++++ build/top.mk Wed May 5 12:49:13 2004
+@@ -196,6 +196,8 @@
+ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@ @SLAPD_GMP_LIBS@
+ SLURPD_LIBS = @SLURPD_LIBS@
+
++SLAPI_LIBS = @SLAPI_LIBS@
++
+ # Our Defaults
+ CC = $(AC_CC)
+ DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
diff --git a/net/openldap24-server/files/patch-configure b/net/openldap24-server/files/patch-configure
new file mode 100644
index 000000000000..7e4fa565bb17
--- /dev/null
+++ b/net/openldap24-server/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure.orig Tue Jul 27 18:33:12 2004
++++ configure Sat Aug 14 17:05:23 2004
+@@ -21782,7 +21782,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 21788 "configure"
+ #include "confdefs.h"
+@@ -21826,7 +21826,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 21832 "configure"
+ #include "confdefs.h"
diff --git a/net/openldap24-server/files/patch-include::ldap_defaults.h b/net/openldap24-server/files/patch-include::ldap_defaults.h
new file mode 100644
index 000000000000..6ea31dbcd65c
--- /dev/null
+++ b/net/openldap24-server/files/patch-include::ldap_defaults.h
@@ -0,0 +1,11 @@
+--- include/ldap_defaults.h.orig Tue Sep 28 20:18:40 2004
++++ include/ldap_defaults.h Tue Sep 28 20:20:01 2004
+@@ -39,7 +39,7 @@
+ #define LDAP_ENV_PREFIX "LDAP"
+
+ /* default ldapi:// socket */
+-#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"
++#define LDAPI_SOCK "/var/run" LDAP_DIRSEP "openldap" LDAP_DIRSEP "ldapi"
+
+ /*
+ * SLAPD DEFINITIONS
diff --git a/net/openldap24-server/files/patch-servers::slapd::Makefile.in b/net/openldap24-server/files/patch-servers::slapd::Makefile.in
new file mode 100644
index 000000000000..3e0ef3eb771c
--- /dev/null
+++ b/net/openldap24-server/files/patch-servers::slapd::Makefile.in
@@ -0,0 +1,19 @@
+--- servers/slapd/Makefile.in.orig Mon Dec 29 19:10:38 2003
++++ servers/slapd/Makefile.in Tue Jan 20 02:33:39 2004
+@@ -360,7 +360,6 @@
+
+ install-slapd: FORCE
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+- -$(MKDIR) $(DESTDIR)$(localstatedir)/run
+ $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
+ slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
+ @for i in $(SUBDIRS); do \
+@@ -424,8 +423,6 @@
+ install-db-config: FORCE
+ @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
+ @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
+- $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
+- $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
+ $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
+ $(DESTDIR)$(sysconfdir)/DB_CONFIG.example
+
diff --git a/net/openldap24-server/files/slapd.sh b/net/openldap24-server/files/slapd.sh
new file mode 100644
index 000000000000..6c6066220aec
--- /dev/null
+++ b/net/openldap24-server/files/slapd.sh
@@ -0,0 +1,106 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: slapd
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: securelevel
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable slapd:
+#
+#slapd_enable="YES"
+#slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
+#slapd_sockets="/var/run/openldap/ldapi"
+#
+# See slapd(8) for more flags
+#
+# The `-u' and `-g' flags are automatically extracted from slapd_owner,
+# by default slapd runs under the non-privileged user id `ldap'. If you
+# want to run slapd as root, override this in /etc/rc.conf with
+#
+#slapd_owner="DEFAULT"
+#
+
+. "%%RC_SUBR%%"
+
+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"
+
+start_precmd=start_precmd
+start_postcmd=start_postcmd
+
+# extract user and group, adjust ownership of directories and database
+
+start_precmd()
+{
+ local slapd_ownername slapd_groupname
+
+ case x"$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ;;
+ *)
+ chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
+ chown -RL "$slapd_owner" "%%DATABASEDIR%%"
+ chown "$slapd_owner" "%%PREFIX%%/etc/openldap/slapd.conf"
+
+ slapd_ownername=`expr //"$slapd_owner" : //'\([^:]*\)'`
+ slapd_groupname=`expr //"$slapd_owner" : //'.*:\([^:]*\)'`
+
+ if [ -n "$slapd_ownername" ]; then
+ rc_flags="$rc_flags -u $slapd_ownername"
+ fi
+ if [ -n "$slapd_groupname" ]; then
+ rc_flags="$rc_flags -g $slapd_groupname"
+ fi
+ ;;
+ esac
+}
+
+# adjust ownership of created unix sockets
+
+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 "$slapd_owner" in
+ ""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
+ ;;
+ *)
+ chown "$slapd_owner" "$socket"
+ ;;
+ esac
+ chmod "$slapd_sockets_mode" "$socket"
+ else
+ warn "slapd: Can't find socket $socket"
+ fi
+ done
+}
+
+# read settings, set defaults
+load_rc_config $name
+: ${slapd_enable="NO"}
+if [ -n "${slapd_args+set}" ]; then
+ warn "slapd_args is deprecated, use slapd_flags"
+ : ${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
new file mode 100644
index 000000000000..79021305b400
--- /dev/null
+++ b/net/openldap24-server/files/slurpd.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: slurpd
+# REQUIRE: slapd
+# BEFORE:
+# KEYWORD: FreeBSD shutdown
+
+# Add the following line to /etc/rc.conf to enable slurpd:
+#
+#slurpd_enable="YES"
+#
+# See slurpd(8) for more flags
+#
+
+. "%%RC_SUBR%%"
+
+name="slurpd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/libexec/slurpd"
+required_files="%%PREFIX%%/etc/openldap/slapd.conf"
+
+# read settings, set defaults
+load_rc_config $name
+: ${slurpd_enable="NO"}
+if [ -n "${slurpd_args+set}" ]; then
+ warn "slurpd_args is deprecated, use slurpd_flags"
+ : ${slurpd_flags="$slurpd_args"}
+else
+ : ${slurpd_flags=""}
+fi
+
+run_rc_command "$1"
diff --git a/net/openldap24-server/pkg-deinstall b/net/openldap24-server/pkg-deinstall
new file mode 100644
index 000000000000..2a5ec1ef8f65
--- /dev/null
+++ b/net/openldap24-server/pkg-deinstall
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+ECHO_CMD=echo
+
+case $2 in
+POST-DEINSTALL)
+ ${ECHO_CMD}
+ ${ECHO_CMD} "The OpenLDAP server package has been deleted."
+ ${ECHO_CMD} "If you're *not* upgrading and won't be using"
+ ${ECHO_CMD} "it any longer, you may want to issue the"
+ ${ECHO_CMD} "following commands:"
+ ${ECHO_CMD}
+ if [ -d %%DATABASEDIR%% ]; then
+ ${ECHO_CMD} "- to delete the OpenLDAP database permanently (losing all data):"
+ ${ECHO_CMD} " rm -Rf %%DATABASEDIR%%"
+ ${ECHO_CMD}
+ fi
+ if [ -d %%SLURPDIR%% ]; then
+ ${ECHO_CMD} "- to remove the OpenLDAP replication directory:"
+ ${ECHO_CMD} " rm -Rf %%SLURPDIR%%"
+ ${ECHO_CMD}
+ fi
+ ${ECHO_CMD} "- to remove the OpenLDAP user:"
+ ${ECHO_CMD} " pw userdel ldap"
+ ${ECHO_CMD}
+ ${ECHO_CMD} "If you are upgrading, don't forget to restart"
+ ${ECHO_CMD} "slapd and slurpd."
+ ${ECHO_CMD}
+ ;;
+esac
diff --git a/net/openldap24-server/pkg-descr b/net/openldap24-server/pkg-descr
new file mode 100644
index 000000000000..77cca2d8bc81
--- /dev/null
+++ b/net/openldap24-server/pkg-descr
@@ -0,0 +1,12 @@
+OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
+clients, utilities and development tools.
+
+This package includes the following major components:
+
+ * slapd - a stand-alone LDAP directory server
+ * slurpd - a stand-alone LDAP replication server
+ * LDIF tools - data conversion tools for use with slapd
+
+This is an alpha release of OpenLDAP Software for evaluation purposes only.
+
+WWW: http://www.OpenLDAP.org/
diff --git a/net/openldap24-server/pkg-descr.client b/net/openldap24-server/pkg-descr.client
new file mode 100644
index 000000000000..7ac6d7d31d98
--- /dev/null
+++ b/net/openldap24-server/pkg-descr.client
@@ -0,0 +1,13 @@
+OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
+clients, utilities and development tools.
+
+This package includes the following major components:
+
+ * -lldap - a LDAP client library
+ * -llber - a lightweight BER/DER encoding/decoding library
+ * LDAP tools - A collection of command line LDAP utilities
+ * documentation - man pages for all components
+
+This is an alpha release of OpenLDAP Software for evaluation purposes only.
+
+WWW: http://www.OpenLDAP.org/
diff --git a/net/openldap24-server/pkg-install b/net/openldap24-server/pkg-install
new file mode 100644
index 000000000000..aa9b0cf46da9
--- /dev/null
+++ b/net/openldap24-server/pkg-install
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+CHOWN=/usr/sbin/chown
+ECHO_CMD=echo
+GREP=/usr/bin/grep
+PKG_INFO=/usr/sbin/pkg_info
+PW=/usr/sbin/pw
+
+FTPUSERS=/etc/ftpusers
+
+case $2 in
+PRE-INSTALL)
+ if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
+ ${ECHO_CMD}
+ if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
+ if ! ${PW} groupadd -n ldap -g 389; then
+ ${ECHO_CMD} "*** Failed to add a group ldap with id 389."
+ ${ECHO_CMD}
+ ${ECHO_CMD} "Please add the ldap user manually with"
+ ${ECHO_CMD} " ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
+ ${ECHO_CMD} " -d /nonexistent -s /sbin/nologin -h -"
+ ${ECHO_CMD} "and retry installing this package."
+ exit 1
+ fi
+ ${ECHO_CMD} "===> Group 'ldap' created."
+ fi
+ if ! ${PW} useradd -n ldap -u 389 -g ldap -c 'OpenLDAP Server' \
+ -d /nonexistent -s /sbin/nologin -h -; then
+ ${ECHO_CMD} "*** Failed to add an user ldap with id 389."
+ ${ECHO_CMD}
+ ${ECHO_CMD} "Please add the ldap user manually with"
+ ${ECHO_CMD} " ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
+ ${ECHO_CMD} " -d /nonexistent -s /sbin/nologin -h -"
+ ${ECHO_CMD} "and retry installing this package."
+ exit 1
+ fi
+ ${GREP} -qs '^ldap$' ${FTPUSERS} || ${ECHO_CMD} ldap >> ${FTPUSERS}
+ ${ECHO_CMD} "===> Account 'ldap' created."
+ fi
+ ;;
+esac
diff --git a/net/openldap24-server/pkg-message b/net/openldap24-server/pkg-message
new file mode 100644
index 000000000000..0e33140a2747
--- /dev/null
+++ b/net/openldap24-server/pkg-message
@@ -0,0 +1,32 @@
+************************************************************
+
+The OpenLDAP server package has been successfully installed.
+
+In order to run the LDAP server, you need to edit
+ %%PREFIX%%/etc/openldap/slapd.conf
+to suit your needs and add the following lines to /etc/rc.conf:
+ slapd_enable="YES"
+ slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
+ slapd_sockets="/var/run/openldap/ldapi"
+
+Then start the server with
+ %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% start
+or reboot.
+
+Try `man slapd' and the online manual at
+ http://www.OpenLDAP.org/doc/
+for more information.
+
+slapd runs under a non-privileged user id (by default `ldap'),
+see %%RC_DIR%%/etc/rc.d/slapd%%RC_SUFX%% for more information.
+
+************************************************************
+
+############################################################
+
+ CAUTION: This is an alpha release, for evaluation only.
+
+ Do not use in a production environment!
+ Please use OpenLDAP 2.2 instead.
+
+############################################################
diff --git a/net/openldap24-server/pkg-message.client b/net/openldap24-server/pkg-message.client
new file mode 100644
index 000000000000..76a3436a8ca0
--- /dev/null
+++ b/net/openldap24-server/pkg-message.client
@@ -0,0 +1,22 @@
+************************************************************
+
+The OpenLDAP client package has been successfully installed.
+
+Edit
+ %%PREFIX%%/etc/openldap/ldap.conf
+to change the system-wide client defaults.
+
+Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at
+ http://www.OpenLDAP.org/faq/index.cgi?file=3
+for more information.
+
+************************************************************
+
+############################################################
+
+ CAUTION: This is an alpha release, for evaluation only.
+
+ Do not use in a production environment!
+ Please use OpenLDAP 2.2 instead.
+
+############################################################
diff --git a/net/openldap24-server/pkg-plist b/net/openldap24-server/pkg-plist
new file mode 100644
index 000000000000..66b08e8c1aa8
--- /dev/null
+++ b/net/openldap24-server/pkg-plist
@@ -0,0 +1,60 @@
+@comment $FreeBSD$
+@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
+@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
+etc/openldap/DB_CONFIG.example
+%%SLAPI%%lib/libslapi.a
+%%SLAPI%%lib/libslapi.so
+%%SLAPI%%lib/libslapi-2.3.so
+%%SLAPI%%lib/libslapi-2.3.so.0
+%%MODULES%%@exec mkdir -p %D/libexec/openldap
+%%BACK_BDB%%libexec/openldap/back_bdb.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.3.so
+%%BACK_BDB%%libexec/openldap/back_bdb-2.3.so.0
+%%BACK_HDB%%libexec/openldap/back_hdb.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.3.so
+%%BACK_HDB%%libexec/openldap/back_hdb-2.3.so.0
+%%BACKEND%%libexec/openldap/back_ldap.so
+%%BACKEND%%libexec/openldap/back_ldap-2.3.so
+%%BACKEND%%libexec/openldap/back_ldap-2.3.so.0
+%%BACKEND%%libexec/openldap/back_ldbm.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.3.so
+%%BACKEND%%libexec/openldap/back_ldbm-2.3.so.0
+%%BACKEND%%libexec/openldap/back_meta.so
+%%BACKEND%%libexec/openldap/back_meta-2.3.so
+%%BACKEND%%libexec/openldap/back_meta-2.3.so.0
+%%BACKEND%%libexec/openldap/back_monitor.so
+%%BACKEND%%libexec/openldap/back_monitor-2.3.so
+%%BACKEND%%libexec/openldap/back_monitor-2.3.so.0
+%%BACKEND%%libexec/openldap/back_null.so
+%%BACKEND%%libexec/openldap/back_null-2.3.so
+%%BACKEND%%libexec/openldap/back_null-2.3.so.0
+%%BACK_PERL%%libexec/openldap/back_perl.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.3.so
+%%BACK_PERL%%libexec/openldap/back_perl-2.3.so.0
+%%BACK_SHELL%%libexec/openldap/back_shell.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.3.so
+%%BACK_SHELL%%libexec/openldap/back_shell-2.3.so.0
+%%BACK_SQL%%libexec/openldap/back_sql.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.3.so
+%%BACK_SQL%%libexec/openldap/back_sql-2.3.so.0
+%%MODULES%%@unexec rmdir %D/libexec/openldap 2>/dev/null || true
+libexec/slapd
+libexec/slurpd
+sbin/slapacl
+sbin/slapadd
+sbin/slapauth
+sbin/slapcat
+sbin/slapdn
+sbin/slapindex
+sbin/slappasswd
+sbin/slaptest
+@exec mkdir -p %%LDAP_RUN_DIR%%
+@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+@exec mkdir -p %%DATABASEDIR%%
+@unexec rmdir %%DATABASEDIR%% 2>/dev/null || true
+@exec mkdir -p %%SLURPDIR%%
+@unexec rmdir %%SLURPDIR%% 2>/dev/null || true
diff --git a/net/openldap24-server/pkg-plist.client b/net/openldap24-server/pkg-plist.client
new file mode 100644
index 000000000000..fcae8b45066a
--- /dev/null
+++ b/net/openldap24-server/pkg-plist.client
@@ -0,0 +1,42 @@
+@comment $FreeBSD$
+bin/ldapadd
+bin/ldapcompare
+bin/ldapdelete
+bin/ldapmodify
+bin/ldapmodrdn
+bin/ldappasswd
+bin/ldapsearch
+bin/ldapwhoami
+@unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi
+etc/openldap/ldap.conf.default
+@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
+@unexec rmdir %D/etc/openldap 2>/dev/null || true
+include/lber.h
+include/lber_types.h
+include/ldap.h
+include/ldap_cdefs.h
+include/ldap_features.h
+include/ldap_schema.h
+include/ldap_utf8.h
+include/slapi-plugin.h
+lib/liblber.a
+lib/liblber.so
+lib/liblber-2.3.so
+lib/liblber-2.3.so.0
+lib/libldap.a
+lib/libldap.so
+lib/libldap-2.3.so
+lib/libldap-2.3.so.0
+lib/libldap_r.a
+lib/libldap_r.so
+lib/libldap_r-2.3.so
+lib/libldap_r-2.3.so.0
+@comment share/openldap/ucdata/case.dat
+@comment share/openldap/ucdata/cmbcl.dat
+@comment share/openldap/ucdata/comp.dat
+@comment share/openldap/ucdata/ctype.dat
+@comment share/openldap/ucdata/decomp.dat
+@comment share/openldap/ucdata/kdecomp.dat
+@comment share/openldap/ucdata/num.dat
+@comment @dirrm share/openldap/ucdata
+@comment @dirrm share/openldap