summaryrefslogtreecommitdiff
path: root/net/openldap22-server
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2003-08-14 03:55:21 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2003-08-14 03:55:21 +0000
commit075f1093db54972920e7186e140f45970aac7ccf (patch)
tree0e19fa3f5ae45c3a238908fc4c4bdb4876d56076 /net/openldap22-server
parentUn-hork ID tag. (diff)
Split openldap[012] into client and server.
PR: ports/54436 Submitted by: Oliver Eikemeier <eikemeier@fillmore-labs.com> (maintainer)
Diffstat (limited to 'net/openldap22-server')
-rw-r--r--net/openldap22-server/Makefile167
-rw-r--r--net/openldap22-server/files/extrapatch-Makefile.in17
-rw-r--r--net/openldap22-server/files/manpages4
-rw-r--r--net/openldap22-server/pkg-descr10
-rw-r--r--net/openldap22-server/pkg-descr.client16
-rw-r--r--net/openldap22-server/pkg-install6
-rw-r--r--net/openldap22-server/pkg-message46
-rw-r--r--net/openldap22-server/pkg-message.client9
-rw-r--r--net/openldap22-server/pkg-plist122
-rw-r--r--net/openldap22-server/pkg-plist.client39
10 files changed, 263 insertions, 173 deletions
diff --git a/net/openldap22-server/Makefile b/net/openldap22-server/Makefile
index f13c39a1e86f..c92f580906a6 100644
--- a/net/openldap22-server/Makefile
+++ b/net/openldap22-server/Makefile
@@ -1,46 +1,64 @@
-# New ports collection makefile for: OpenLDAP 2.2
-# Date created: 20 Sep 1998
-# Whom: Lachlan O'Dea
+# New ports collection makefile for: openldap22-server
+# Date created: 10 Jul 2003
+# Whom: Oliver Eikemeier
#
# $FreeBSD$
#
-PORTNAME= openldap
-PORTVERSION= ${OPENLDAP_VERSION}.a
-PORTREVISION= 2
-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.dti.ad.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.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
- ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
+PORTNAME= openldap
+PORTVERSION= ${OPENLDAP_VERSION}.a
+PORTREVISION= ${OPENLDAP_PORTVERSION}
+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.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
-DISTNAME= openldap-${OPENLDAP_VERSION}alpha
-EXTRACT_SUFX= .tgz
+PKGNAMESUFFIX= ${OPENLDAP_PKGNAMESUFFIX}
+DISTNAME= openldap-${OPENLDAP_VERSION}alpha
+EXTRACT_SUFX= .tgz
-MAINTAINER= eikemeier@fillmore-labs.com
-COMMENT= Open source LDAP client and server implementation
+MAINTAINER= eikemeier@fillmore-labs.com
+COMMENT?= Open source LDAP server implementation
OPENLDAP_VERSION= 2.2.0
-CONFLICTS= openldap*
+LATEST_LINK= ${PKGNAMEPREFIX}openldap22${PKGNAMESUFFIX}
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-*
-LATEST_LINK= openldap2
+WANT_OPENLDAP_VER?= 22
+.if ${WANT_OPENLDAP_VER} != 22
+BROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
+.endif
+
+.if defined(CLIENT_ONLY)
+OPENLDAP_PORTVERSION= 0
+OPENLDAP_PKGNAMESUFFIX?=-client
+OPENLDAP_PKGFILESUFX?= .client
+.else
+OPENLDAP_PORTVERSION= 0
+OPENLDAP_PKGNAMESUFFIX?=-server
+OPENLDAP_PKGFILESUFX?=
+
+LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap22-client
+.endif
USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
+DESCR= ${PKGDIR}/pkg-descr${OPENLDAP_PKGFILESUFX}
PLIST= ${WRKDIR}/pkg-plist
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
@@ -48,41 +66,56 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
LOCALSTATEDIR?= ${DESTDIR}/var/db
LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap
-WITH_BDB_VER?= 41
-
-CONFIGURE_ARGS= --enable-dynamic \
- --with-threads \
- --with-tls=openssl
+PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} \
+ LDAP_RUN_DIR=${LDAP_RUN_DIR}
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
+CONFIGURE_ARGS= --with-threads \
+ --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
+
.if defined(CLIENT_ONLY)
-PKGNAMESUFFIX= -client
+# client specific configuration
+
CONFIGURE_ARGS+= --disable-slapd
-PLIST_SUB+= SERVER="@comment " \
- SLAPI="@comment "
-SED_SCRIPT+= -e '/^%%SERVER%%/d'
+
+INSTALLS_SHLIB= yes
+
.else
+# server specific configuration
+
+EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in
+
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
- --enable-lmpasswd \
--enable-ldbm \
--with-ldbm-api=berkeley \
+ --enable-lmpasswd \
--enable-ldap \
--enable-meta \
--enable-rewrite \
--enable-null \
--enable-monitor
+WITH_BDB_VER?= 41
+
.if ${WITH_BDB_VER} == 41
-LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
+LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41
CONFIGURE_ARGS+= --enable-bdb
.elif ${WITH_BDB_VER} == 4
-LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4
+LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4
CONFIGURE_ARGS+= --disable-bdb
.elif ${WITH_BDB_VER} == 3
-LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
+LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3
CONFIGURE_ARGS+= --disable-bdb
.else
.error WITH_BDB_VER must be 3, 4 or 41
@@ -100,11 +133,7 @@ CONFIGURE_ARGS+= --enable-perl
.endif
.if defined(WITH_SASL)
-LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
-CONFIGURE_ARGS+= --with-cyrus-sasl \
- --enable-spasswd
-.else
-CONFIGURE_ARGS+= --without-cyrus-sasl
+CONFIGURE_ARGS+= --enable-spasswd
.endif
.if defined(WITH_ODBC)
@@ -125,13 +154,9 @@ PLIST_SUB+= SLAPI="@comment "
CONFIGURE_ARGS+= --enable-wrappers
.endif
-PLIST_SUB+= SERVER=""
-SED_SCRIPT+= -e '/^%%SERVER%%/s,,,'
+# end of client/server specific configuration
.endif
-PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} \
- LDAP_RUN_DIR=${LDAP_RUN_DIR}
-
# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include
@@ -142,23 +167,28 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
-INSTALLS_SHLIB= yes
-
.include <bsd.port.pre.mk>
+
+.if defined(CLIENT_ONLY)
.include "${FILESDIR}/manpages"
+.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 4.1)"
- @${ECHO} "WITH_SASL with SASL2 authorization"
+ @${ECHO} "WITH_SASL with (Cyrus) SASL2 password verification"
@${ECHO} "WITH_PERL with Perl backend"
@${ECHO} "WITH_SHELL with Shell backend"
@${ECHO} "WITH_ODBC with SQL backend"
@${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API
@${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support"
+.endif
@${ECHO}
@${ECHO} "============================================================="
@${ECHO}
@@ -168,7 +198,7 @@ post-patch:
${WRKSRC}/servers/slapd/slapd.conf
pre-configure:
- @${REINPLACE_CMD} -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ @${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \
${WRKSRC}/configure
post-build:
@@ -176,11 +206,21 @@ post-build:
@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
.endfor
.for text in pkg-install pkg-message
- @${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
+ @if [ -f ${MASTERDIR}/${text}${OPENLDAP_PKGFILESUFX} ]; then \
+ ${SED} ${SED_SCRIPT} ${MASTERDIR}/${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:
- @${CP} ${.CURDIR}/pkg-plist ${PLIST}
+ @${CP} ${MASTERDIR}/pkg-plist${OPENLDAP_PKGFILESUFX} ${PLIST}
+.if defined(CLIENT_ONLY)
.if !defined(NOPORTDOCS)
@for dir in rfc drafts; do \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
@@ -190,12 +230,10 @@ pre-install:
done
@${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
.endif
+.endif
post-install:
-.if !defined(CLIENT_ONLY)
- @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
- @${MKDIR} ${LDAP_RUN_DIR}
-.endif
+.if defined(CLIENT_ONLY)
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@for dir in rfc drafts; do \
@@ -204,6 +242,13 @@ post-install:
-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
done
.endif
+.else
+.for script in slapd.sh slurpd.sh
+ @${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}
+.endfor
+ @${MKDIR} ${LDAP_RUN_DIR}
+.endif
@${CAT} ${PKGMESSAGE}
+.include "${.CURDIR}/../openldap20-server/bsd.openldap.mk"
.include <bsd.port.post.mk>
diff --git a/net/openldap22-server/files/extrapatch-Makefile.in b/net/openldap22-server/files/extrapatch-Makefile.in
new file mode 100644
index 000000000000..bb83ea2b572a
--- /dev/null
+++ b/net/openldap22-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
+@@ -10,9 +10,11 @@
+ ## in file LICENSE in the top-level directory of the distribution.
+ ##
+
+-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/openldap22-server/files/manpages b/net/openldap22-server/files/manpages
index d3830d3afa8b..a5a10214c69c 100644
--- a/net/openldap22-server/files/manpages
+++ b/net/openldap22-server/files/manpages
@@ -1,3 +1,7 @@
+#
+# $FreeBSD$
+#
+
MAN1+= ldapcompare.1 \
ldapdelete.1 \
ldapmodify.1 \
diff --git a/net/openldap22-server/pkg-descr b/net/openldap22-server/pkg-descr
index 432cb85b0400..2b568c691c89 100644
--- a/net/openldap22-server/pkg-descr
+++ b/net/openldap22-server/pkg-descr
@@ -1,15 +1,15 @@
OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
clients, utilities and development tools.
-This release includes the following major components:
+This package includes the following major components:
* slapd - a stand-alone LDAP directory server
* slurpd - a stand-alone LDAP replication server
- * -lldap - a LDAP client library
- * -llber - a lightweight BER/DER encoding/decoding library
* LDIF tools - data conversion tools for use with slapd
- * LDAP tools - A collection of command line LDAP utilities
+
+This release is meant for testing purposes only, it is not for general use.
WWW: http://www.OpenLDAP.org/
-Lachlan O'Dea, Oliver Eikemeier
+- Oliver Eikemeier
+eikemeier@fillmore-labs.com
diff --git a/net/openldap22-server/pkg-descr.client b/net/openldap22-server/pkg-descr.client
new file mode 100644
index 000000000000..3b9be2330c70
--- /dev/null
+++ b/net/openldap22-server/pkg-descr.client
@@ -0,0 +1,16 @@
+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 release is meant for testing purposes only, it is not for general use.
+
+WWW: http://www.OpenLDAP.org/
+
+- Oliver Eikemeier
+eikemeier@fillmore-labs.com
diff --git a/net/openldap22-server/pkg-install b/net/openldap22-server/pkg-install
index 86dae2ce74da..6f6b98653853 100644
--- a/net/openldap22-server/pkg-install
+++ b/net/openldap22-server/pkg-install
@@ -6,6 +6,6 @@ if [ X"$2" != X"POST-INSTALL" ]; then
exit 0;
fi
-%%SERVER%%mkdir -p "%%LDAP_RUN_DIR%%"
-%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
-%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"
+mkdir -p "%%LDAP_RUN_DIR%%"
+mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
+mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"
diff --git a/net/openldap22-server/pkg-message b/net/openldap22-server/pkg-message
index fa99c9a88dd8..07ec67b4cc5b 100644
--- a/net/openldap22-server/pkg-message
+++ b/net/openldap22-server/pkg-message
@@ -1,30 +1,26 @@
************************************************************
-The OpenLDAP package has been successfully installed.
+The OpenLDAP server package has been successfully installed.
-Edit
- %%PREFIX%%/etc/openldap/ldap.conf
-to change the system-wide client defaults.
+In order to run the LDAP server, you need to edit
+ %%PREFIX%%/etc/openldap/slapd.conf
+to suit your needs and add the next lines to /etc/rc.conf:
+ slapd_enable="YES"
+ slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
+
+Then start the server with
+ %%PREFIX%%/etc/rc.d/slapd.sh start
+or reboot.
+
+NOTE: There is no real reason to run slapd as root. Add
+ '-u ldap -g ldap'
+to slapd_args, create a user "ldap" with
+ pw add group ldap -g 389
+ pw add user ldap -u 389 -g 389 -d /nonexistent \
+ -c "OpenLDAP Server" -s /sbin/nologin -p "*"
+and do
+ chown -R ldap:ldap %%LDAP_RUN_DIR%% \
+ %%LOCALSTATEDIR%%/openldap-data %%PREFIX%%/etc/openldap/slapd.conf
+and your server runs with a non-privileged user id.
-%%SERVER%%In order to run the OpenLDAP server, you need to edit
-%%SERVER%% %%PREFIX%%/etc/openldap/slapd.conf
-%%SERVER%%to suit your needs and add the next lines to /etc/rc.conf:
-%%SERVER%% slapd_enable="YES"
-%%SERVER%% slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
-%%SERVER%%
-%%SERVER%%Then start the server with
-%%SERVER%% %%PREFIX%%/etc/rc.d/slapd.sh start
-%%SERVER%%or reboot.
-%%SERVER%%
-%%SERVER%%NOTE: There is no real reason to run slapd as root. Add
-%%SERVER%% '-u ldap -g ldap'
-%%SERVER%%to slapd_args, create a user "ldap" with
-%%SERVER%% pw add group ldap -g 389
-%%SERVER%% pw add user ldap -u 389 -g 389 -d /nonexistent \
-%%SERVER%% -c "OpenLDAP Server" -s /sbin/nologin -p "*"
-%%SERVER%%and do
-%%SERVER%% chown -R ldap:ldap %%LDAP_RUN_DIR%% \
-%%SERVER%% %%LOCALSTATEDIR%%/openldap-data %%PREFIX%%/etc/openldap/slapd.conf
-%%SERVER%%and your server runs with a non-privileged user id.
-%%SERVER%%
************************************************************
diff --git a/net/openldap22-server/pkg-message.client b/net/openldap22-server/pkg-message.client
new file mode 100644
index 000000000000..ef3234fa4b86
--- /dev/null
+++ b/net/openldap22-server/pkg-message.client
@@ -0,0 +1,9 @@
+************************************************************
+
+The OpenLDAP client package has been successfully installed.
+
+Edit
+ %%PREFIX%%/etc/openldap/ldap.conf
+to change the system-wide client defaults.
+
+************************************************************
diff --git a/net/openldap22-server/pkg-plist b/net/openldap22-server/pkg-plist
index 9306575d05f9..1665eb495c1b 100644
--- a/net/openldap22-server/pkg-plist
+++ b/net/openldap22-server/pkg-plist
@@ -1,83 +1,47 @@
-bin/ldapadd
-bin/ldapcompare
-bin/ldapdelete
-bin/ldapmodify
-bin/ldapmodrdn
-bin/ldappasswd
-bin/ldapsearch
-bin/ldapwhoami
-%%SERVER%%@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
-%%SERVER%%@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
-@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
-%%SERVER%%etc/openldap/schema/README
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/corba.schema %D/etc/openldap/schema/corba.schema.default; then rm -f %D/etc/openldap/schema/corba.schema; fi
-%%SERVER%%etc/openldap/schema/corba.schema.default
-%%SERVER%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/core.schema %D/etc/openldap/schema/core.schema.default; then rm -f %D/etc/openldap/schema/core.schema; fi
-%%SERVER%%etc/openldap/schema/core.schema.default
-%%SERVER%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/cosine.schema %D/etc/openldap/schema/cosine.schema.default; then rm -f %D/etc/openldap/schema/cosine.schema; fi
-%%SERVER%%etc/openldap/schema/cosine.schema.default
-%%SERVER%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/inetorgperson.schema %D/etc/openldap/schema/inetorgperson.schema.default; then rm -f %D/etc/openldap/schema/inetorgperson.schema; fi
-%%SERVER%%etc/openldap/schema/inetorgperson.schema.default
-%%SERVER%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/java.schema %D/etc/openldap/schema/java.schema.default; then rm -f %D/etc/openldap/schema/java.schema; fi
-%%SERVER%%etc/openldap/schema/java.schema.default
-%%SERVER%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/misc.schema %D/etc/openldap/schema/misc.schema.default; then rm -f %D/etc/openldap/schema/misc.schema; fi
-%%SERVER%%etc/openldap/schema/misc.schema.default
-%%SERVER%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/nis.schema %D/etc/openldap/schema/nis.schema.default; then rm -f %D/etc/openldap/schema/nis.schema; fi
-%%SERVER%%etc/openldap/schema/nis.schema.default
-%%SERVER%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/schema/openldap.schema %D/etc/openldap/schema/openldap.schema.default; then rm -f %D/etc/openldap/schema/openldap.schema; fi
-%%SERVER%%etc/openldap/schema/openldap.schema.default
-%%SERVER%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
-%%SERVER%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
-%%SERVER%%etc/openldap/slapd.conf.default
-%%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
-%%SERVER%%@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
+@comment $FreeBSD$
+@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
+@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
+etc/openldap/schema/README
+@unexec if cmp -s %D/etc/openldap/schema/corba.schema %D/etc/openldap/schema/corba.schema.default; then rm -f %D/etc/openldap/schema/corba.schema; fi
+etc/openldap/schema/corba.schema.default
+@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
+@unexec if cmp -s %D/etc/openldap/schema/core.schema %D/etc/openldap/schema/core.schema.default; then rm -f %D/etc/openldap/schema/core.schema; fi
+etc/openldap/schema/core.schema.default
+@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
+@unexec if cmp -s %D/etc/openldap/schema/cosine.schema %D/etc/openldap/schema/cosine.schema.default; then rm -f %D/etc/openldap/schema/cosine.schema; fi
+etc/openldap/schema/cosine.schema.default
+@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
+@unexec if cmp -s %D/etc/openldap/schema/inetorgperson.schema %D/etc/openldap/schema/inetorgperson.schema.default; then rm -f %D/etc/openldap/schema/inetorgperson.schema; fi
+etc/openldap/schema/inetorgperson.schema.default
+@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
+@unexec if cmp -s %D/etc/openldap/schema/java.schema %D/etc/openldap/schema/java.schema.default; then rm -f %D/etc/openldap/schema/java.schema; fi
+etc/openldap/schema/java.schema.default
+@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
+@unexec if cmp -s %D/etc/openldap/schema/misc.schema %D/etc/openldap/schema/misc.schema.default; then rm -f %D/etc/openldap/schema/misc.schema; fi
+etc/openldap/schema/misc.schema.default
+@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
+@unexec if cmp -s %D/etc/openldap/schema/nis.schema %D/etc/openldap/schema/nis.schema.default; then rm -f %D/etc/openldap/schema/nis.schema; fi
+etc/openldap/schema/nis.schema.default
+@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
+@unexec if cmp -s %D/etc/openldap/schema/openldap.schema %D/etc/openldap/schema/openldap.schema.default; then rm -f %D/etc/openldap/schema/openldap.schema; fi
+etc/openldap/schema/openldap.schema.default
+@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
+@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
+@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
@unexec rmdir %D/etc/openldap 2>/dev/null || true
-%%SERVER%%etc/rc.d/slapd.sh
-%%SERVER%%etc/rc.d/slurpd.sh
-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.so.2
-lib/libldap.a
-lib/libldap.so
-lib/libldap.so.2
-lib/libldap_r.a
-lib/libldap_r.so
-lib/libldap_r.so.2
+etc/rc.d/slapd.sh
+etc/rc.d/slurpd.sh
%%SLAPI%%lib/libslapi.a
%%SLAPI%%lib/libslapi.so
%%SLAPI%%lib/libslapi.so.2
-%%SERVER%%libexec/slapd
-%%SERVER%%libexec/slurpd
-%%SERVER%%sbin/slapadd
-%%SERVER%%sbin/slapcat
-%%SERVER%%sbin/slapindex
-%%SERVER%%sbin/slappasswd
-share/openldap/ucdata/case.dat
-share/openldap/ucdata/cmbcl.dat
-share/openldap/ucdata/comp.dat
-share/openldap/ucdata/ctype.dat
-share/openldap/ucdata/decomp.dat
-share/openldap/ucdata/kdecomp.dat
-share/openldap/ucdata/num.dat
-@dirrm share/openldap/ucdata
-@dirrm share/openldap
-%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
-%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
-%%SERVER%%@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+libexec/slapd
+libexec/slurpd
+sbin/slapadd
+sbin/slapcat
+sbin/slapindex
+sbin/slappasswd
+@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
+@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
+@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
diff --git a/net/openldap22-server/pkg-plist.client b/net/openldap22-server/pkg-plist.client
new file mode 100644
index 000000000000..28e37f5316cb
--- /dev/null
+++ b/net/openldap22-server/pkg-plist.client
@@ -0,0 +1,39 @@
+@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.so.2
+lib/libldap.a
+lib/libldap.so
+lib/libldap.so.2
+lib/libldap_r.a
+lib/libldap_r.so
+lib/libldap_r.so.2
+share/openldap/ucdata/case.dat
+share/openldap/ucdata/cmbcl.dat
+share/openldap/ucdata/comp.dat
+share/openldap/ucdata/ctype.dat
+share/openldap/ucdata/decomp.dat
+share/openldap/ucdata/kdecomp.dat
+share/openldap/ucdata/num.dat
+@dirrm share/openldap/ucdata
+@dirrm share/openldap