diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2003-08-14 11:55:21 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2003-08-14 11:55:21 +0800 |
commit | 6556c46049aeaebe0f14e3abe280716bff31d3c0 (patch) | |
tree | f1edc72418fe137d027d64c79e001ed168fa71ba | |
parent | 557eca9704ed27a310cfb39d91318370dfe8cf24 (diff) | |
download | freebsd-ports-gnome-6556c46049aeaebe0f14e3abe280716bff31d3c0.tar.gz freebsd-ports-gnome-6556c46049aeaebe0f14e3abe280716bff31d3c0.tar.zst freebsd-ports-gnome-6556c46049aeaebe0f14e3abe280716bff31d3c0.zip |
Split openldap[012] into client and server.
PR: ports/54436
Submitted by: Oliver Eikemeier <eikemeier@fillmore-labs.com> (maintainer)
65 files changed, 2187 insertions, 1478 deletions
diff --git a/net/openldap20-client/Makefile b/net/openldap20-client/Makefile new file mode 100644 index 000000000000..14efa20a204c --- /dev/null +++ b/net/openldap20-client/Makefile @@ -0,0 +1,16 @@ +# New ports collection makefile for: openldap20-client +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# +# $FreeBSD$ +# + +PORTNAME= openldap + +COMMENT= Open source LDAP client implementation + +CLIENT_ONLY= yes + +MASTERDIR= ${.CURDIR}/../openldap20-server + +.include "${MASTERDIR}/Makefile" diff --git a/net/openldap20-server/Makefile b/net/openldap20-server/Makefile index 5da9b9fd0fe2..580a51d59f2e 100644 --- a/net/openldap20-server/Makefile +++ b/net/openldap20-server/Makefile @@ -1,146 +1,231 @@ -# New ports collection makefile for: OpenLDAP 2.x -# Date created: 20 Sep 1998 -# Whom: Lachlan O'Dea +# New ports collection makefile for: openldap20-server +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier # # $FreeBSD$ # -PORTNAME= openldap20 -PORTVERSION= 2.0.27 -CATEGORIES= net databases -MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ - http://www.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.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \ - ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \ - ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/ -MASTER_SITE_SUBDIR= openldap-release -DISTNAME= openldap-${PORTVERSION} -EXTRACT_SUFX= .tgz - -MAINTAINER= eikemeier@fillmore-labs.com -COMMENT= Open source LDAP client and server software - -.if !defined(WITH_BDB_VER) || ${WITH_BDB_VER} == 3 -LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3 -.elif defined(WITH_BDB_VER) && ${WITH_BDB_VER} == 4 -LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4 +PORTNAME= openldap +PORTVERSION= ${OPENLDAP_VERSION} +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 +PKGNAMESUFFIX= ${OPENLDAP_PKGNAMESUFFIX} +EXTRACT_SUFX= .tgz + +MAINTAINER= eikemeier@fillmore-labs.com +COMMENT?= Open source LDAP server implementation + +OPENLDAP_VERSION= 2.0.27 + +LATEST_LINK= ${PKGNAMEPREFIX}openldap20${PKGNAMESUFFIX} +CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-* + +WANT_OPENLDAP_VER?= 20 +.if ${WANT_OPENLDAP_VER} != 20 +BROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}" +.endif + +.if defined(CLIENT_ONLY) +OPENLDAP_PORTVERSION= 0 +OPENLDAP_PKGNAMESUFFIX?=-client +OPENLDAP_PKGFILESUFX?= .client .else -.error WITH_BDB_VER must be 3 or 4 +OPENLDAP_PORTVERSION= 0 +OPENLDAP_PKGNAMESUFFIX?=-server +OPENLDAP_PKGFILESUFX?= + +LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap20-client .endif + +USE_OPENSSL= yes +USE_REINPLACE= yes +USE_LIBTOOL_VER= 13 + +DESCR= ${PKGDIR}/pkg-descr${OPENLDAP_PKGFILESUFX} +PLIST= ${WRKDIR}/pkg-plist +PKGINSTALL= ${WRKDIR}/pkg-install +PKGMESSAGE= ${WRKDIR}/pkg-message + +LOCALSTATEDIR?= ${DESTDIR}/var/db +LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap + +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+= sasl.8:${PORTSDIR}/security/cyrus-sasl -.endif -.if defined(WITH_ODBC) -LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc +LIB_DEPENDS+= sasl.8:${PORTSDIR}/security/cyrus-sasl +CPPFLAGS+= -I${LOCALBASE}/include/sasl1 +CONFIGURE_ARGS+= --with-cyrus-sasl +.else +CONFIGURE_ARGS+= --without-cyrus-sasl .endif -GNU_CONFIGURE= yes -USE_OPENSSL= yes -USE_REINPLACE= yes -CONFIGURE_TARGET= +.if defined(CLIENT_ONLY) +# client specific configuration -LATEST_LINK= openldap2 +CONFIGURE_ARGS+= --disable-slapd -WITH_BDB_VER?= 3 +INSTALLS_SHLIB= yes -LOCALSTATEDIR?= /var/db -LDAP_RUN_DIR?= /var/run +.else +# server specific configuration -PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} +EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in -CONFIGURE_ARGS= --localstatedir=${LOCALSTATEDIR} \ - --with-threads \ - --enable-shared \ - --enable-dnssrv \ - --enable-ldap \ - --enable-shell \ - --with-tls=openssl +CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \ + --enable-ldbm \ + --with-ldbm-api=berkeley \ + --enable-ldap -# Include tcp-wrapper support -.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h) -CONFIGURE_ARGS+= --enable-wrappers +WITH_BDB_VER?= 3 + +.if ${WITH_BDB_VER} == 41 +BROKEN= "OpenLDAP 2.0 doesn't support Berkeley DB 4.1" +.elif ${WITH_BDB_VER} == 4 +LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4 +.elif ${WITH_BDB_VER} == 3 +LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3 +.else +.error WITH_BDB_VER must be 3 or 4 .endif +LIBS+= -ldb${WITH_BDB_VER} +CPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER} -# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both. -CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ - -I${LOCALBASE}/include \ - -I${LOCALBASE}/include/db${WITH_BDB_VER} -LDFLAGS+= -L${LOCALBASE}/lib -LIBS+= -ldb${WITH_BDB_VER} +.if defined(WITH_SHELL) +CONFIGURE_ARGS+= --enable-shell +.endif .if defined(WITH_SASL) -CPPFLAGS+= -I${LOCALBASE}/include/sasl1 -.else -CONFIGURE_ARGS+= --without-cyrus-sasl +CONFIGURE_ARGS+= --enable-spasswd .endif .if defined(WITH_ODBC) -CONFIGURE_ARGS+=--enable-sql +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc +CONFIGURE_ARGS+= --enable-sql +.endif + +# Include tcp-wrapper support +.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h) +CONFIGURE_ARGS+= --enable-wrappers .endif -CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - LIBS="${LIBS}" +# end of client/server specific configuration +.endif -INSTALLS_SHLIB= yes +# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both. +CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ + -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -BINS= bin/ldapadd \ - bin/ldapdelete \ - bin/ldapmodify \ - bin/ldapmodrdn \ - bin/ldappasswd \ - bin/ldapsearch \ - bin/ud \ - libexec/fax500 \ - libexec/go500 \ - libexec/go500gw \ - libexec/in.xfingerd \ - libexec/mail500 \ - libexec/maildap \ - libexec/rcpt500 \ - libexec/rp500 \ - libexec/slapd \ - libexec/slurpd +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" +.endif -.if exists(${LOCALBASE}/lib/libdb4.so) && ${WITH_BDB_VER} != 4 pre-everything:: - @${ECHO_CMD} "==================================================" - @${ECHO_CMD} - @${ECHO_CMD} "If you want to build OpenLDAP with Berkeley DB 4.0" - @${ECHO_CMD} "hit Ctrl-C right now and type \"make WITH_BDB_VER=4\"" - @${ECHO_CMD} - @${ECHO_CMD} "==================================================" - @${ECHO_CMD} + @${ECHO} "=============================================================" + @${ECHO} + @${ECHO} "You can build ${PKGNAME} with the following options:" + @${ECHO} +.if defined(CLIENT_ONLY) + @${ECHO} "WITH_SASL with (Cyrus) SASL1 support" +.else + @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 3)" + @${ECHO} "WITH_SASL with (Cyrus) SASL1 password verification" + @${ECHO} "WITH_SHELL with Shell backend" + @${ECHO} "WITH_ODBC with SQL backend" + @${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support" .endif + @${ECHO} + @${ECHO} "=============================================================" + @${ECHO} + +post-patch: + @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \ + ${WRKSRC}/servers/slapd/slapd.conf -pre-build: - @cd ${WRKSRC} ; ${MAKE} depend +pre-configure: + @${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \ + ${WRKSRC}/configure post-build: - @${REINPLACE_CMD} -e 's,${LOCALSTATEDIR}/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \ - ${WRKSRC}/servers/slapd/slapd.conf.tmp - @${SED} -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@LDAP_RUN_DIR@@,${LDAP_RUN_DIR},g' \ - ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh.sample - @${SED} -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@LDAP_RUN_DIR@@,${LDAP_RUN_DIR},g' \ - ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh.sample +.for script in slapd.sh slurpd.sh + @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script} +.endfor +.for text in pkg-install pkg-message + @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} ${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 \ + | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \ + >>${PLIST}; \ + ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \ + done + @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST} +.endif +.endif post-install: -.for f in ${BINS} - @strip ${PREFIX}/${f} +.if defined(CLIENT_ONLY) +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @for dir in rfc drafts; do \ + ${MKDIR} ${DOCSDIR}/$${dir}; \ + ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \ + -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \ + done +.endif +.else +.for script in slapd.sh slurpd.sh + @${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}.sample .endfor - @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh.sample ${WRKDIR}/slurpd.sh.sample ${PREFIX}/etc/rc.d + @${MKDIR} ${LDAP_RUN_DIR} +.endif @${CAT} ${PKGMESSAGE} +.include "${.CURDIR}/../openldap20-server/bsd.openldap.mk" .include <bsd.port.post.mk> diff --git a/net/openldap20-server/bsd.openldap.mk b/net/openldap20-server/bsd.openldap.mk new file mode 100644 index 000000000000..a18f1ac15178 --- /dev/null +++ b/net/openldap20-server/bsd.openldap.mk @@ -0,0 +1,34 @@ +#-*- mode: makefile; tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +# USE_OPENLDAP - Says that the port uses the OpenLDAP libraries +# - Implies WANT_OPENLDAP_VER?=21. +# WANT_OPENLDAP_VER - legal values are: 12, 20, 21 and 22 +# - If set to an unknown value, the port is marked BROKEN. +## + +###################################################################### + +###################################################################### +# OpenLDAP + +.if defined(USE_OPENLDAP_VER) +USE_OPENLDAP?= yes +WANT_OPENLDAP_VER= ${USE_OPENLDAP_VER} +.endif + +.if defined(USE_OPENLDAP) +WANT_OPENLDAP_VER?= 21 +.if ${WANT_OPENLDAP_VER} == 12 +LIB_DEPENDS+= ldap.1:${PORTSDIR}/net/openldap12 +.elif ${WANT_OPENLDAP_VER} == 20 || ${WANT_OPENLDAP_VER} == 21 || \ + ${WANT_OPENLDAP_VER} == 22 +LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap${WANT_OPENLDAP_VER}-client +.else +BROKEN= "unknown OpenLDAP version: ${WANT_OPENLDAP_VER}" +.endif +.endif + +# END OpenLDAP diff --git a/net/openldap20-server/files/extrapatch-Makefile.in b/net/openldap20-server/files/extrapatch-Makefile.in new file mode 100644 index 000000000000..d4515b2c462e --- /dev/null +++ b/net/openldap20-server/files/extrapatch-Makefile.in @@ -0,0 +1,17 @@ +--- Makefile.in.orig Fri Jan 4 21:29:47 2002 ++++ Makefile.in Thu Jul 10 23:45:33 2003 +@@ -10,9 +10,11 @@ + ## in file LICENSE in the top-level directory of the distribution. + ## + +-SUBDIRS= include libraries clients servers tests doc +-CLEANDIRS= contrib +-INSTALLDIRS= ++SUBDIRS= ++ALLDIRS= include libraries clients servers tests doc ++CLEANDIRS= include libraries clients servers tests doc contrib ++DEPENDDIRS= include libraries clients servers tests doc ++INSTALLDIRS= servers + + makefiles: FORCE + ./config.status diff --git a/net/openldap20-server/files/manpages b/net/openldap20-server/files/manpages index b10af04f6545..cb2bd8764417 100644 --- a/net/openldap20-server/files/manpages +++ b/net/openldap20-server/files/manpages @@ -1,206 +1,216 @@ -MAN1+= ldapdelete.1 -MAN1+= ldapmodify.1 -MAN1+= ldapmodrdn.1 -MAN1+= ldappasswd.1 -MAN1+= ldapsearch.1 -MAN1+= ud.1 -MAN3+= lber-decode.3 -MAN3+= lber-encode.3 -MAN3+= lber-memory.3 -MAN3+= lber-types.3 -MAN3+= ldap.3 -MAN3+= ldap_abandon.3 -MAN3+= ldap_add.3 -MAN3+= ldap_bind.3 -MAN3+= ldap_cache.3 -MAN3+= ldap_compare.3 -MAN3+= ldap_delete.3 -MAN3+= ldap_disptmpl.3 -MAN3+= ldap_entry2text.3 -MAN3+= ldap_error.3 -MAN3+= ldap_first_attribute.3 -MAN3+= ldap_first_entry.3 -MAN3+= ldap_friendly.3 -MAN3+= ldap_get_dn.3 -MAN3+= ldap_get_values.3 -MAN3+= ldap_getfilter.3 -MAN3+= ldap_modify.3 -MAN3+= ldap_modrdn.3 -MAN3+= ldap_open.3 -MAN3+= ldap_result.3 -MAN3+= ldap_schema.3 -MAN3+= ldap_search.3 -MAN3+= ldap_searchprefs.3 -MAN3+= ldap_sort.3 -MAN3+= ldap_ufn.3 -MAN3+= ldap_url.3 -MAN5+= ldap.conf.5 -MAN5+= ldapfilter.conf.5 -MAN5+= ldapfriendly.5 -MAN5+= ldapsearchprefs.conf.5 -MAN5+= ldaptemplates.conf.5 -MAN5+= ldif.5 -MAN5+= slapd.conf.5 -MAN5+= slapd.replog.5 -MAN5+= ud.conf.5 -MAN8+= go500.8 -MAN8+= go500gw.8 -MAN8+= in.xfingerd.8 -MAN8+= mail500.8 -MAN8+= rcpt500.8 -MAN8+= slapadd.8 -MAN8+= slapcat.8 -MAN8+= slapd.8 -MAN8+= slapindex.8 -MAN8+= slappasswd.8 -MAN8+= slurpd.8 -MLINKS+= lber-decode.3 ber_first_element.3 -MLINKS+= lber-decode.3 ber_get_bitstring.3 -MLINKS+= lber-decode.3 ber_get_boolean.3 -MLINKS+= lber-decode.3 ber_get_enum.3 -MLINKS+= lber-decode.3 ber_get_int.3 -MLINKS+= lber-decode.3 ber_get_next.3 -MLINKS+= lber-decode.3 ber_get_null.3 -MLINKS+= lber-decode.3 ber_get_stringa.3 -MLINKS+= lber-decode.3 ber_get_stringb.3 -MLINKS+= lber-decode.3 ber_next_element.3 -MLINKS+= lber-decode.3 ber_peek_tag.3 -MLINKS+= lber-decode.3 ber_scanf.3 -MLINKS+= lber-decode.3 ber_skip_tag.3 -MLINKS+= lber-encode.3 ber_alloc_t.3 -MLINKS+= lber-encode.3 ber_flush.3 -MLINKS+= lber-encode.3 ber_printf.3 -MLINKS+= lber-encode.3 ber_put_enum.3 -MLINKS+= lber-encode.3 ber_put_int.3 -MLINKS+= lber-encode.3 ber_put_null.3 -MLINKS+= lber-encode.3 ber_put_ostring.3 -MLINKS+= lber-encode.3 ber_put_seq.3 -MLINKS+= lber-encode.3 ber_put_set.3 -MLINKS+= lber-encode.3 ber_put_string.3 -MLINKS+= lber-encode.3 ber_start_set.3 -MLINKS+= ldap_abandon.3 ldap_abandon_ext.3 -MLINKS+= ldap_add.3 ldap_add_ext.3 -MLINKS+= ldap_add.3 ldap_add_ext_s.3 -MLINKS+= ldap_add.3 ldap_add_s.3 -MLINKS+= ldap_bind.3 ldap_bind_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind1.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind1_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind2.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind2_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind_s.3 -MLINKS+= ldap_bind.3 ldap_sasl_bind.3 -MLINKS+= ldap_bind.3 ldap_sasl_bind_s.3 -MLINKS+= ldap_bind.3 ldap_simple_bind.3 -MLINKS+= ldap_bind.3 ldap_simple_bind_s.3 -MLINKS+= ldap_bind.3 ldap_unbind.3 -MLINKS+= ldap_bind.3 ldap_unbind_ext.3 -MLINKS+= ldap_bind.3 ldap_unbind_ext_s.3 -MLINKS+= ldap_bind.3 ldap_unbind_s.3 -MLINKS+= ldap_cache.3 ldap_destroy_cache.3 -MLINKS+= ldap_cache.3 ldap_disable_cache.3 -MLINKS+= ldap_cache.3 ldap_enable_cache.3 -MLINKS+= ldap_cache.3 ldap_flush_cache.3 -MLINKS+= ldap_cache.3 ldap_set_cache_options.3 -MLINKS+= ldap_cache.3 ldap_uncache_entry.3 -MLINKS+= ldap_cache.3 ldap_uncache_request.3 -MLINKS+= ldap_compare.3 ldap_compare_ext.3 -MLINKS+= ldap_compare.3 ldap_compare_ext_s.3 -MLINKS+= ldap_compare.3 ldap_compare_s.3 -MLINKS+= ldap_delete.3 ldap_delete_ext.3 -MLINKS+= ldap_delete.3 ldap_delete_ext_s.3 -MLINKS+= ldap_delete.3 ldap_delete_s.3 -MLINKS+= ldap_disptmpl.3 ldap_first_disptmpl.3 -MLINKS+= ldap_disptmpl.3 ldap_first_tmplcol.3 -MLINKS+= ldap_disptmpl.3 ldap_first_tmplrow.3 -MLINKS+= ldap_disptmpl.3 ldap_free_templates.3 -MLINKS+= ldap_disptmpl.3 ldap_init_templates.3 -MLINKS+= ldap_disptmpl.3 ldap_init_templates_buf.3 -MLINKS+= ldap_disptmpl.3 ldap_next_disptmpl.3 -MLINKS+= ldap_disptmpl.3 ldap_next_tmplcol.3 -MLINKS+= ldap_disptmpl.3 ldap_next_tmplrow.3 -MLINKS+= ldap_disptmpl.3 ldap_oc2template.3 -MLINKS+= ldap_disptmpl.3 ldap_tmplattrs.3 -MLINKS+= ldap_entry2text.3 ldap_entry2html.3 -MLINKS+= ldap_entry2text.3 ldap_entry2html_search.3 -MLINKS+= ldap_entry2text.3 ldap_entry2text_search.3 -MLINKS+= ldap_entry2text.3 ldap_vals2html.3 -MLINKS+= ldap_entry2text.3 ldap_vals2text.3 -MLINKS+= ldap_error.3 ld_errno.3 -MLINKS+= ldap_error.3 ldap_err2string.3 -MLINKS+= ldap_error.3 ldap_errlist.3 -MLINKS+= ldap_error.3 ldap_perror.3 -MLINKS+= ldap_error.3 ldap_result2error.3 -MLINKS+= ldap_first_attribute.3 ldap_next_attribute.3 -MLINKS+= ldap_first_entry.3 ldap_count_entries.3 -MLINKS+= ldap_first_entry.3 ldap_next_entry.3 -MLINKS+= ldap_friendly.3 ldap_free_friendlymap.3 -MLINKS+= ldap_friendly.3 ldap_friendly_name.3 -MLINKS+= ldap_get_dn.3 ldap_dn2ufn.3 -MLINKS+= ldap_get_dn.3 ldap_explode_dn.3 -MLINKS+= ldap_get_dn.3 ldap_explode_rdn.3 -MLINKS+= ldap_get_values.3 ldap_count_values.3 -MLINKS+= ldap_get_values.3 ldap_count_values_len.3 -MLINKS+= ldap_get_values.3 ldap_get_values_len.3 -MLINKS+= ldap_get_values.3 ldap_value_free.3 -MLINKS+= ldap_get_values.3 ldap_value_free_len.3 -MLINKS+= ldap_getfilter.3 ldap_build_filter.3 -MLINKS+= ldap_getfilter.3 ldap_getfilter_free.3 -MLINKS+= ldap_getfilter.3 ldap_getfirstfilter.3 -MLINKS+= ldap_getfilter.3 ldap_getnextfilter.3 -MLINKS+= ldap_getfilter.3 ldap_init_getfilter.3 -MLINKS+= ldap_getfilter.3 ldap_init_getfilter_buf.3 -MLINKS+= ldap_getfilter.3 ldap_setfilteraffixes.3 -MLINKS+= ldap_modify.3 ldap_modify_ext.3 -MLINKS+= ldap_modify.3 ldap_modify_ext_s.3 -MLINKS+= ldap_modify.3 ldap_modify_s.3 -MLINKS+= ldap_modify.3 ldap_mods_free.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn2.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn2_s.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn_s.3 -MLINKS+= ldap_open.3 ldap_init.3 -MLINKS+= ldap_result.3 ldap_msgfree.3 -MLINKS+= ldap_result.3 ldap_msgid.3 -MLINKS+= ldap_result.3 ldap_msgtype.3 -MLINKS+= ldap_schema.3 ldap_attributetype2name.3 -MLINKS+= ldap_schema.3 ldap_attributetype2str.3 -MLINKS+= ldap_schema.3 ldap_attributetype_free.3 -MLINKS+= ldap_schema.3 ldap_matchingrule2name.3 -MLINKS+= ldap_schema.3 ldap_matchingrule2str.3 -MLINKS+= ldap_schema.3 ldap_matchingrule_free.3 -MLINKS+= ldap_schema.3 ldap_objectclass2name.3 -MLINKS+= ldap_schema.3 ldap_objectclass2str.3 -MLINKS+= ldap_schema.3 ldap_objectclass_free.3 -MLINKS+= ldap_schema.3 ldap_scherr2str.3 -MLINKS+= ldap_schema.3 ldap_str2attributetype.3 -MLINKS+= ldap_schema.3 ldap_str2matchingrule.3 -MLINKS+= ldap_schema.3 ldap_str2objectclass.3 -MLINKS+= ldap_schema.3 ldap_str2syntax.3 -MLINKS+= ldap_schema.3 ldap_syntax2name.3 -MLINKS+= ldap_schema.3 ldap_syntax2str.3 -MLINKS+= ldap_schema.3 ldap_syntax_free.3 -MLINKS+= ldap_search.3 ldap_search_ext.3 -MLINKS+= ldap_search.3 ldap_search_ext_s.3 -MLINKS+= ldap_search.3 ldap_search_s.3 -MLINKS+= ldap_search.3 ldap_search_st.3 -MLINKS+= ldap_searchprefs.3 ldap_first_searchobj.3 -MLINKS+= ldap_searchprefs.3 ldap_free_searchprefs.3 -MLINKS+= ldap_searchprefs.3 ldap_init_searchprefs.3 -MLINKS+= ldap_searchprefs.3 ldap_init_searchprefs_buf.3 -MLINKS+= ldap_searchprefs.3 ldap_next_searchobj.3 -MLINKS+= ldap_sort.3 ldap_sort_entries.3 -MLINKS+= ldap_sort.3 ldap_sort_strcasecmp.3 -MLINKS+= ldap_sort.3 ldap_sort_values.3 -MLINKS+= ldap_ufn.3 ldap_ufn_search_c.3 -MLINKS+= ldap_ufn.3 ldap_ufn_search_ct.3 -MLINKS+= ldap_ufn.3 ldap_ufn_search_s.3 -MLINKS+= ldap_ufn.3 ldap_ufn_setfilter.3 -MLINKS+= ldap_ufn.3 ldap_ufn_setprefix.3 -MLINKS+= ldap_ufn.3 ldap_ufn_timeout.3 -MLINKS+= ldap_url.3 ldap_free_urldesc.3 -MLINKS+= ldap_url.3 ldap_is_ldap_url.3 -MLINKS+= ldap_url.3 ldap_url_parse.3 -MLINKS+= ldap_url.3 ldap_url_search.3 -MLINKS+= ldap_url.3 ldap_url_search_s.3 -MLINKS+= ldap_url.3 ldap_url_search_st.3 -MLINKS+= ldapmodify.1 ldapadd.1 -MLINKS+= mail500.8 fax500.8 +# +# $FreeBSD$ +# + +MAN1+= ldapdelete.1 \ + ldapmodify.1 \ + ldapmodrdn.1 \ + ldappasswd.1 \ + ldapsearch.1 \ + ud.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_cache.3 \ + ldap_compare.3 \ + ldap_delete.3 \ + ldap_disptmpl.3 \ + ldap_entry2text.3 \ + ldap_error.3 \ + ldap_first_attribute.3 \ + ldap_first_entry.3 \ + ldap_friendly.3 \ + ldap_get_dn.3 \ + ldap_get_values.3 \ + ldap_getfilter.3 \ + ldap_modify.3 \ + ldap_modrdn.3 \ + ldap_open.3 \ + ldap_result.3 \ + ldap_schema.3 \ + ldap_search.3 \ + ldap_searchprefs.3 \ + ldap_sort.3 \ + ldap_ufn.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 \ + 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_cache.3 ldap_destroy_cache.3 \ + ldap_cache.3 ldap_disable_cache.3 \ + ldap_cache.3 ldap_enable_cache.3 \ + ldap_cache.3 ldap_flush_cache.3 \ + ldap_cache.3 ldap_set_cache_options.3 \ + ldap_cache.3 ldap_uncache_entry.3 \ + ldap_cache.3 ldap_uncache_request.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_disptmpl.3 ldap_first_disptmpl.3 \ + ldap_disptmpl.3 ldap_first_tmplcol.3 \ + ldap_disptmpl.3 ldap_first_tmplrow.3 \ + ldap_disptmpl.3 ldap_free_templates.3 \ + ldap_disptmpl.3 ldap_init_templates.3 \ + ldap_disptmpl.3 ldap_init_templates_buf.3 \ + ldap_disptmpl.3 ldap_next_disptmpl.3 \ + ldap_disptmpl.3 ldap_next_tmplcol.3 \ + ldap_disptmpl.3 ldap_next_tmplrow.3 \ + ldap_disptmpl.3 ldap_oc2template.3 \ + ldap_disptmpl.3 ldap_tmplattrs.3 \ + ldap_entry2text.3 ldap_entry2html.3 \ + ldap_entry2text.3 ldap_entry2html_search.3 \ + ldap_entry2text.3 ldap_entry2text_search.3 \ + ldap_entry2text.3 ldap_vals2html.3 \ + ldap_entry2text.3 ldap_vals2text.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_friendly.3 ldap_free_friendlymap.3 \ + ldap_friendly.3 ldap_friendly_name.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_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_getfilter.3 ldap_build_filter.3 \ + ldap_getfilter.3 ldap_getfilter_free.3 \ + ldap_getfilter.3 ldap_getfirstfilter.3 \ + ldap_getfilter.3 ldap_getnextfilter.3 \ + ldap_getfilter.3 ldap_init_getfilter.3 \ + ldap_getfilter.3 ldap_init_getfilter_buf.3 \ + ldap_getfilter.3 ldap_setfilteraffixes.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_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_searchprefs.3 ldap_first_searchobj.3 \ + ldap_searchprefs.3 ldap_free_searchprefs.3 \ + ldap_searchprefs.3 ldap_init_searchprefs.3 \ + ldap_searchprefs.3 ldap_init_searchprefs_buf.3 \ + ldap_searchprefs.3 ldap_next_searchobj.3 \ + ldap_sort.3 ldap_sort_entries.3 \ + ldap_sort.3 ldap_sort_strcasecmp.3 \ + ldap_sort.3 ldap_sort_values.3 \ + ldap_ufn.3 ldap_ufn_search_c.3 \ + ldap_ufn.3 ldap_ufn_search_ct.3 \ + ldap_ufn.3 ldap_ufn_search_s.3 \ + ldap_ufn.3 ldap_ufn_setfilter.3 \ + ldap_ufn.3 ldap_ufn_setprefix.3 \ + ldap_ufn.3 ldap_ufn_timeout.3 \ + ldap_url.3 ldap_free_urldesc.3 \ + ldap_url.3 ldap_is_ldap_url.3 \ + ldap_url.3 ldap_url_parse.3 \ + ldap_url.3 ldap_url_search.3 \ + ldap_url.3 ldap_url_search_s.3 \ + ldap_url.3 ldap_url_search_st.3 + +MAN5+= ldap.conf.5 \ + ldapfilter.conf.5 \ + ldapfriendly.5 \ + ldapsearchprefs.conf.5 \ + ldaptemplates.conf.5 \ + ldif.5 \ + slapd.conf.5 \ + slapd.replog.5 \ + ud.conf.5 + +MAN8+= go500.8 \ + go500gw.8 \ + in.xfingerd.8 \ + mail500.8 \ + rcpt500.8 \ + slapadd.8 \ + slapcat.8 \ + slapd.8 \ + slapindex.8 \ + slappasswd.8 \ + slurpd.8 +MLINKS+= \ + mail500.8 fax500.8 diff --git a/net/openldap20-server/files/patch-build::mod.mk b/net/openldap20-server/files/patch-build::mod.mk new file mode 100644 index 000000000000..05911c2f8c36 --- /dev/null +++ b/net/openldap20-server/files/patch-build::mod.mk @@ -0,0 +1,11 @@ +--- build/mod.mk.orig Fri Jan 4 21:38:06 2002 ++++ build/mod.mk Sat Jul 12 19:30:28 2003 +@@ -10,7 +10,7 @@ + LIBRARY = $(LIBBASE).la + LIBSTAT = lib$(LIBBASE).a + +-LTFLAGS = --only-$(LINKAGE) ++LTFLAGS = # --only-$(LINKAGE) + + COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(MODDEFS) -c + LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -rpath $(moduledir) \ diff --git a/net/openldap20-server/files/patch-clients_ud_Makefile.in b/net/openldap20-server/files/patch-clients::ud::Makefile.in index 9cf81be04cdd..9cf81be04cdd 100644 --- a/net/openldap20-server/files/patch-clients_ud_Makefile.in +++ b/net/openldap20-server/files/patch-clients::ud::Makefile.in diff --git a/net/openldap20-server/files/patch-daemon.c b/net/openldap20-server/files/patch-servers::slapd::daemon.c index 75fced252e07..75fced252e07 100644 --- a/net/openldap20-server/files/patch-daemon.c +++ b/net/openldap20-server/files/patch-servers::slapd::daemon.c diff --git a/net/openldap20-server/files/patch-servers_slapd_schema b/net/openldap20-server/files/patch-servers_slapd_schema deleted file mode 100644 index 31969e8bb621..000000000000 --- a/net/openldap20-server/files/patch-servers_slapd_schema +++ /dev/null @@ -1,20 +0,0 @@ ---- servers/slapd/schema/krb5-kdc.schema.orig Tue Sep 5 13:28:34 2000 -+++ servers/slapd/schema/krb5-kdc.schema Mon Oct 30 13:09:19 2000 -@@ -96,7 +96,7 @@ - attributetype ( 1.3.6.1.4.1.5322.10.1.10 - NAME 'krb5Key' - DESC 'Encoded ASN1 Key as an octet string' -- SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 ) -+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) - - attributetype ( 1.3.6.1.4.1.5322.10.1.11 - NAME 'krb5PrincipalRealm' -@@ -112,7 +112,7 @@ - - objectclass ( 1.3.6.1.4.1.5322.10.2.1 - NAME 'krb5Principal' -- SUP top -+ SUP person - AUXILIARY - MUST ( krb5PrincipalName ) - MAY ( cn $ krb5PrincipalRealm ) ) diff --git a/net/openldap20-server/files/slapd.sh b/net/openldap20-server/files/slapd.sh index 08a215cd5ea8..e7e385bbc625 100644 --- a/net/openldap20-server/files/slapd.sh +++ b/net/openldap20-server/files/slapd.sh @@ -2,47 +2,57 @@ # # $FreeBSD$ -slapd_program=@@PREFIX@@/libexec/slapd +slapd_program=%%PREFIX%%/libexec/slapd -# Uncomment one of the following: -# -# IPv4 Only -#slapd_args='-h ldap://0.0.0.0' +slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid + +slapd_enable="YES" + +slapd_args= + +# Add the following lines to /etc/rc.conf to enable slapd: # -# IPv6 and IPv4 -#slapd_ags='-h "ldap://[::] ldap://0.0.0.0"' +#slapd_enable="YES" +#slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"' # -# IPv6 Only -#slapd_args='-h ldap://[::]' +# See sldap(8) for details # -# Add '-u ldap -g ldap' when you do not want to run -# slapd as root +# Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args +# if you want to run slapd as a non-privileged user (recommended) # -slapd_args= -pidfile=@@LDAP_RUN_DIR@@/slapd.pid +# Suck in the configuration variables. +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi -case "$1" in -start) - if [ -x ${slapd_program} ]; then - echo -n ' slapd' - eval ${slapd_program} ${slapd_args} - - fi - ;; -stop) - if [ -f $pidfile ]; then - kill `cat $pidfile` - telnet localhost ldap </dev/null >/dev/null 2>&1 - echo -n ' slapd' - rm $pidfile - else - echo ' slapd: not running' - fi +case "$slapd_enable" in +[Yy][Ee][Ss]) + case "$1" in + start) + if [ -x ${slapd_program} ]; then + echo -n ' slapd' + eval ${slapd_program} ${slapd_args} + fi + ;; + stop) + if [ -f $slapd_pidfile ]; then + kill `cat $slapd_pidfile` + echo -n ' slapd' + else + echo ' slapd: not running' + fi + ;; + *) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; + esac ;; *) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 ;; esac diff --git a/net/openldap20-server/files/slurpd.sh b/net/openldap20-server/files/slurpd.sh index 0eafcbeebcd7..46a1a6dbc18b 100644 --- a/net/openldap20-server/files/slurpd.sh +++ b/net/openldap20-server/files/slurpd.sh @@ -2,25 +2,48 @@ # # $FreeBSD$ -slurpd_program=@@PREFIX@@/libexec/slurpd +slurpd_program=%%PREFIX%%/libexec/slurpd + +slurpd_enable="YES" slurpd_args= -case "$1" in -start) - if [ -x ${slurpd_program} ]; then - echo -n ' slurpd' - ${slurpd_program} ${slurpd_args} - fi - ;; -stop) - if ! killall `basename ${slurpd_program}`; then - echo ' slurpd: not running' - fi +# Add the following line to /etc/rc.conf to enable slurpd: +# +#slurpd_enable="YES" +# +# See slurpd(8) for details +# + +# Suck in the configuration variables. +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +case "$slurpd_enable" in +[Yy][Ee][Ss]) + case "$1" in + start) + if [ -x ${slurpd_program} ]; then + echo -n ' slurpd' + ${slurpd_program} ${slurpd_args} + fi + ;; + stop) + if ! killall `basename ${slurpd_program}`; then + echo ' slurpd: not running' + fi + ;; + *) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; + esac ;; *) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 ;; esac diff --git a/net/openldap20-server/pkg-descr b/net/openldap20-server/pkg-descr index aec3ae0f7cf4..e71fb3954dd2 100644 --- a/net/openldap20-server/pkg-descr +++ b/net/openldap20-server/pkg-descr @@ -1,12 +1,15 @@ -OpenLDAP is a suite of Lightweight Directory Access Protocol (LDAP) servers, -clients, utilities and development tools. LDAP is an Internet standard -directory service protocol that can be used stand-alone, or as a front end -to an X.500 directory. LDAP is defined by RFCs 1777 through 1779. +OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers, +clients, utilities and development tools. -OpenLDAP is derived from the University of Michigan LDAP release 3.3 and is -distributed under an open source license. +This package includes the following major components: -WWW: http://www.openldap.org/ + * slapd - a stand-alone LDAP directory server + * slurpd - a stand-alone LDAP replication server + * LDIF tools - data conversion tools for use with slapd -Lachlan O'Dea -ulmo@earthling.net +This release is an old version, you should upgrade. + +WWW: http://www.OpenLDAP.org/ + +- Oliver Eikemeier +eikemeier@fillmore-labs.com diff --git a/net/openldap20-server/pkg-descr.client b/net/openldap20-server/pkg-descr.client new file mode 100644 index 000000000000..16f2eb0cbdb7 --- /dev/null +++ b/net/openldap20-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 an old version, you should upgrade. + +WWW: http://www.OpenLDAP.org/ + +- Oliver Eikemeier +eikemeier@fillmore-labs.com diff --git a/net/openldap20-server/pkg-install b/net/openldap20-server/pkg-install new file mode 100644 index 000000000000..77902951e265 --- /dev/null +++ b/net/openldap20-server/pkg-install @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $FreeBSD$ +# +if [ X"$2" != X"POST-INSTALL" ]; then + exit 0; +fi + +mkdir -p "%%LDAP_RUN_DIR%%" +mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-ldbm" +mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp" diff --git a/net/openldap20-server/pkg-message b/net/openldap20-server/pkg-message index 047bb0c9d5b4..272da08aa168 100644 --- a/net/openldap20-server/pkg-message +++ b/net/openldap20-server/pkg-message @@ -1,7 +1,28 @@ ************************************************************ -If you are upgrading an older (1.85) database, be sure to -convert the *.dbb files, e.g: - mv file.dbb file.old - db_dump185 file.old | db_load file.dbb +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 next lines to /etc/rc.conf: + slapd_enable="YES" + slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"' + +Then add a link to %%PREFIX%%/etc/rc.d/slapd.sh.sample: + ln -s %%PREFIX%%/etc/rc.d/slapd.sh.sample %%PREFIX%%/etc/rc.d/slapd.sh +and 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-ldbm %%PREFIX%%/etc/openldap/slapd.conf +and your server runs with a non-privileged user id. + ************************************************************ diff --git a/net/openldap20-server/pkg-message.client b/net/openldap20-server/pkg-message.client new file mode 100644 index 000000000000..ef3234fa4b86 --- /dev/null +++ b/net/openldap20-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/openldap20-server/pkg-plist b/net/openldap20-server/pkg-plist index cf3ea759dc0e..f7de9f2bc442 100644 --- a/net/openldap20-server/pkg-plist +++ b/net/openldap20-server/pkg-plist @@ -1,22 +1,6 @@ -bin/ldapadd -bin/ldapdelete -bin/ldapmodify -bin/ldapmodrdn -bin/ldappasswd -bin/ldapsearch -bin/ud -@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 if cmp -s %D/etc/openldap/ldapfilter.conf %D/etc/openldap/ldapfilter.conf.default; then rm -f %D/etc/openldap/ldapfilter.conf; fi -etc/openldap/ldapfilter.conf.default -@exec [ -f %B/ldapfilter.conf ] || cp %B/%f %B/ldapfilter.conf -@unexec if cmp -s %D/etc/openldap/ldapsearchprefs.conf %D/etc/openldap/ldapsearchprefs.conf.default; then rm -f %D/etc/openldap/ldapsearchprefs.conf; fi -etc/openldap/ldapsearchprefs.conf.default -@exec [ -f %B/ldapsearchprefs.conf ] || cp %B/%f %B/ldapsearchprefs.conf -@unexec if cmp -s %D/etc/openldap/ldaptemplates.conf %D/etc/openldap/ldaptemplates.conf.default; then rm -f %D/etc/openldap/ldaptemplates.conf; fi -etc/openldap/ldaptemplates.conf.default -@exec [ -f %B/ldaptemplates.conf ] || cp %B/%f %B/ldaptemplates.conf +@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 @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 @@ -47,48 +31,16 @@ etc/openldap/schema/openldap.schema.default @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 /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true -@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true -@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-ldbm 2>/dev/null || true -@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true +@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true +@unexec rmdir %D/etc/openldap 2>/dev/null || true etc/rc.d/slapd.sh.sample etc/rc.d/slurpd.sh.sample -include/disptmpl.h -include/lber.h -include/lber_types.h -include/ldap.h -include/ldap_cdefs.h -include/ldap_features.h -include/ldap_schema.h -include/srchpref.h -lib/liblber.a -lib/liblber.la -lib/liblber.so -lib/liblber.so.2 -lib/libldap.a -lib/libldap.la -lib/libldap.so -lib/libldap.so.2 -lib/libldap_r.a -lib/libldap_r.la -lib/libldap_r.so -lib/libldap_r.so.2 -libexec/fax500 -libexec/go500 -libexec/go500gw -libexec/in.xfingerd -libexec/mail500 -libexec/maildap -libexec/rcpt500 -libexec/rp500 libexec/slapd libexec/slurpd -libexec/xrpcomp sbin/slapadd sbin/slapcat sbin/slapindex sbin/slappasswd -share/openldap/go500gw.help -share/openldap/ldapfriendly -share/openldap/rcpt500.help -@dirrm share/openldap +@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true +@unexec rmdir %%LOCALSTATEDIR%%/openldap-ldbm 2>/dev/null || true +@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true diff --git a/net/openldap20-server/pkg-plist.client b/net/openldap20-server/pkg-plist.client new file mode 100644 index 000000000000..74128f59c27d --- /dev/null +++ b/net/openldap20-server/pkg-plist.client @@ -0,0 +1,54 @@ +@comment $FreeBSD$ +bin/ldapadd +bin/ldapdelete +bin/ldapmodify +bin/ldapmodrdn +bin/ldappasswd +bin/ldapsearch +bin/ud +@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 if cmp -s %D/etc/openldap/ldapfilter.conf %D/etc/openldap/ldapfilter.conf.default; then rm -f %D/etc/openldap/ldapfilter.conf; fi +etc/openldap/ldapfilter.conf.default +@exec [ -f %B/ldapfilter.conf ] || cp %B/%f %B/ldapfilter.conf +@unexec if cmp -s %D/etc/openldap/ldapsearchprefs.conf %D/etc/openldap/ldapsearchprefs.conf.default; then rm -f %D/etc/openldap/ldapsearchprefs.conf; fi +etc/openldap/ldapsearchprefs.conf.default +@exec [ -f %B/ldapsearchprefs.conf ] || cp %B/%f %B/ldapsearchprefs.conf +@unexec if cmp -s %D/etc/openldap/ldaptemplates.conf %D/etc/openldap/ldaptemplates.conf.default; then rm -f %D/etc/openldap/ldaptemplates.conf; fi +etc/openldap/ldaptemplates.conf.default +@exec [ -f %B/ldaptemplates.conf ] || cp %B/%f %B/ldaptemplates.conf +@unexec rmdir %D/etc/openldap 2>/dev/null || true +include/disptmpl.h +include/lber.h +include/lber_types.h +include/ldap.h +include/ldap_cdefs.h +include/ldap_features.h +include/ldap_schema.h +include/srchpref.h +lib/liblber.a +lib/liblber.la +lib/liblber.so +lib/liblber.so.2 +lib/libldap.a +lib/libldap.la +lib/libldap.so +lib/libldap.so.2 +lib/libldap_r.a +lib/libldap_r.la +lib/libldap_r.so +lib/libldap_r.so.2 +libexec/fax500 +libexec/go500 +libexec/go500gw +libexec/in.xfingerd +libexec/mail500 +libexec/maildap +libexec/rcpt500 +libexec/rp500 +libexec/xrpcomp +share/openldap/go500gw.help +share/openldap/ldapfriendly +share/openldap/rcpt500.help +@dirrm share/openldap diff --git a/net/openldap21-client/Makefile b/net/openldap21-client/Makefile new file mode 100644 index 000000000000..1140a8b6be9f --- /dev/null +++ b/net/openldap21-client/Makefile @@ -0,0 +1,16 @@ +# New ports collection makefile for: openldap21-client +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# +# $FreeBSD$ +# + +PORTNAME= openldap + +COMMENT= Open source LDAP client implementation + +CLIENT_ONLY= yes + +MASTERDIR= ${.CURDIR}/../openldap21-server + +.include "${MASTERDIR}/Makefile" diff --git a/net/openldap21-server/Makefile b/net/openldap21-server/Makefile index 52d78b73026e..4528ec23710a 100644 --- a/net/openldap21-server/Makefile +++ b/net/openldap21-server/Makefile @@ -1,348 +1,244 @@ -# New ports collection makefile for: OpenLDAP 2.1 -# Date created: 5 Dec 2002 -# Whom: Christian Kratzer <ck@cksoft.de> -# -# This port allows separation of the openldap client and servers -# using following options -# -# default builds openldap21-PORTVERSION -# CLIENT_ONLY builds openldap21-client-PORTVERSION (clients and libs) -# WITH_SASL build with cyrus SASL2 support +# New ports collection makefile for: openldap21-server +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier # # $FreeBSD$ # -PORTNAME= openldap -PORTVERSION= 2.1.22 -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.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \ - ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \ - ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/ -MASTER_SITE_SUBDIR= openldap-release +PORTNAME= openldap +PORTVERSION= ${OPENLDAP_VERSION} +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 +PKGNAMESUFFIX= ${OPENLDAP_PKGNAMESUFFIX} EXTRACT_SUFX= .tgz -MAINTAINER= ck@cksoft.de -COMMENT= Open source LDAP client and server software +MAINTAINER= eikemeier@fillmore-labs.com +COMMENT?= Open source LDAP server implementation + +OPENLDAP_VERSION= 2.1.22 + +LATEST_LINK= ${PKGNAMEPREFIX}openldap21${PKGNAMESUFFIX} +CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-* + +WANT_OPENLDAP_VER?= 21 +.if ${WANT_OPENLDAP_VER} != 21 +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+= db41:${PORTSDIR}/databases/db41 +LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21-client +.endif -CXXFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ - -I${LOCALBASE}/include \ - -I${LOCALBASE}/include/db41 +USE_OPENSSL= yes +USE_REINPLACE= yes +USE_LIBTOOL_VER= 14 -CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ - -I${LOCALBASE}/include \ - -I${LOCALBASE}/include/db41 +DESCR= ${PKGDIR}/pkg-descr${OPENLDAP_PKGFILESUFX} +PLIST= ${WRKDIR}/pkg-plist +PKGINSTALL= ${WRKDIR}/pkg-install +PKGMESSAGE= ${WRKDIR}/pkg-message -LDFLAGS+= -L${LOCALBASE}/lib +LOCALSTATEDIR?= ${DESTDIR}/var/db +LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap -USE_OPENSSL= yes -HAS_CONFIGURE= yes +PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} \ + LDAP_RUN_DIR=${LDAP_RUN_DIR} -CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}" \ - CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" +SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ + -e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \ + -e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g' -CONFIGURE_ARGS+=--prefix=${PREFIX} \ - --enable-bdb \ - --enable-crypt +CONFIGURE_ARGS= --with-threads \ + --with-tls=openssl \ + --enable-dynamic .if defined(WITH_SASL) -LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 -CONFIGURE_ARGS+= \ - --with-cyrus-sasl \ - --enable-spasswd +LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2 +CONFIGURE_ARGS+= --with-cyrus-sasl .else -CONFIGURE_ARGS+= \ - --without-cyrus-sasl +CONFIGURE_ARGS+= --without-cyrus-sasl .endif -# ------------------------------------------------------------------------------ -# common configure -# -CONFIGURE_ARGS+= \ - --with-tls \ - --localstatedir=/var/db +.if defined(CLIENT_ONLY) +# client specific configuration + +CONFIGURE_ARGS+= --disable-slapd + +INSTALLS_SHLIB= yes + +.else +# server specific configuration + +EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in + +CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \ + --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 +CONFIGURE_ARGS+= --enable-bdb +.elif ${WITH_BDB_VER} == 4 +LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4 +CONFIGURE_ARGS+= --disable-bdb +.elif ${WITH_BDB_VER} == 3 +LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3 +CONFIGURE_ARGS+= --disable-bdb +.else +.error WITH_BDB_VER must be 3, 4 or 41 +.endif +LIBS+= -ldb${WITH_BDB_VER} +CPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER} + +.if defined(WITH_SHELL) +CONFIGURE_ARGS+= --enable-shell +.endif + +.if defined(WITH_PERL) +USE_PERL5= yes +CONFIGURE_ARGS+= --enable-perl +.endif + +.if defined(WITH_SASL) +CONFIGURE_ARGS+= --enable-spasswd +.endif + +.if defined(WITH_ODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc +CONFIGURE_ARGS+= --enable-sql +.endif # Include tcp-wrapper support -.if exists(/usr/include/tcpd.h) +.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h) CONFIGURE_ARGS+= --enable-wrappers .endif -.include <bsd.port.pre.mk> -.if ${OSVERSION} >= 400014 -CONFIGURE_ARGS+= --enable-ipv6 +# end of client/server specific configuration .endif -.if defined(CLIENT_ONLY) -# ------------------------------------------------------------------------------ -# libraries and client applications only -# -INSTALLS_SHLIB= yes -PKGNAMESUFFIX= -client -COMMENT= Open source LDAP client software -CONFIGURE_ARGS+= \ - --disable-slapd \ - --disable-slurpd \ - --enable-shared \ - --enable-static +# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both. +CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ + -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -.else -# ------------------------------------------------------------------------------ -# -# full package -# -INSTALLS_SHLIB= yes -CONFIGURE_ARGS+= \ - --with-threads \ - --enable-slapd \ - --enable-slurpd \ - --enable-ldbm \ - --enable-ldap \ - --enable-shell \ - --enable-shared \ - --enable-static +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" .endif -# ------------------------------------------------------------------------------ -# PLIST subs and MAN?/MLINKS -# -MAN1+= ldapcompare.1 -MAN1+= ldapdelete.1 -MAN1+= ldapmodify.1 -MLINKS+= ldapmodify.1 ldapadd.1 -MAN1+= ldapmodrdn.1 -MAN1+= ldappasswd.1 -MAN1+= ldapsearch.1 -MAN1+= ldapwhoami.1 -MAN3+= lber-decode.3 -MLINKS+= lber-decode.3 ber_get_next.3 -MLINKS+= lber-decode.3 ber_skip_tag.3 -MLINKS+= lber-decode.3 ber_peek_tag.3 -MLINKS+= lber-decode.3 ber_scanf.3 -MLINKS+= lber-decode.3 ber_get_int.3 -MLINKS+= lber-decode.3 ber_get_enum.3 -MLINKS+= lber-decode.3 ber_get_stringb.3 -MLINKS+= lber-decode.3 ber_get_stringa.3 -MLINKS+= lber-decode.3 ber_get_stringal.3 -MLINKS+= lber-decode.3 ber_get_stringbv.3 -MLINKS+= lber-decode.3 ber_get_null.3 -MLINKS+= lber-decode.3 ber_get_boolean.3 -MLINKS+= lber-decode.3 ber_get_bitstring.3 -MLINKS+= lber-decode.3 ber_first_element.3 -MLINKS+= lber-decode.3 ber_next_element.3 -MAN3+= lber-encode.3 -MLINKS+= lber-encode.3 ber_alloc_t.3 -MLINKS+= lber-encode.3 ber_flush.3 -MLINKS+= lber-encode.3 ber_printf.3 -MLINKS+= lber-encode.3 ber_put_int.3 -MLINKS+= lber-encode.3 ber_put_enum.3 -MLINKS+= lber-encode.3 ber_put_ostring.3 -MLINKS+= lber-encode.3 ber_put_string.3 -MLINKS+= lber-encode.3 ber_put_null.3 -MLINKS+= lber-encode.3 ber_put_boolean.3 -MLINKS+= lber-encode.3 ber_put_bitstring.3 -MLINKS+= lber-encode.3 ber_start_seq.3 -MLINKS+= lber-encode.3 ber_start_set.3 -MLINKS+= lber-encode.3 ber_put_seq.3 -MLINKS+= lber-encode.3 ber_put_set.3 -MAN3+= lber-memory.3 -MLINKS+= lber-memory.3 ber_memalloc.3 -MLINKS+= lber-memory.3 ber_memcalloc.3 -MLINKS+= lber-memory.3 ber_memrealloc.3 -MLINKS+= lber-memory.3 ber_memfree.3 -MLINKS+= lber-memory.3 ber_memvfree.3 -MAN3+= lber-types.3 -MLINKS+= lber-types.3 ber_int_t.3 -MLINKS+= lber-types.3 ber_uint_t.3 -MLINKS+= lber-types.3 ber_len_t.3 -MLINKS+= lber-types.3 ber_slen_t.3 -MLINKS+= lber-types.3 ber_tag_t.3 -MAN3+= ldap.3 -MAN3+= ldap_abandon.3 -MLINKS+= ldap_abandon.3 ldap_abandon_ext.3 -MAN3+= ldap_add.3 -MLINKS+= ldap_add.3 ldap_add_s.3 -MLINKS+= ldap_add.3 ldap_add_ext.3 -MLINKS+= ldap_add.3 ldap_add_ext_s.3 -MAN3+= ldap_bind.3 -MLINKS+= ldap_bind.3 ldap_bind_s.3 -MLINKS+= ldap_bind.3 ldap_simple_bind.3 -MLINKS+= ldap_bind.3 ldap_simple_bind_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind1.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind1_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind2.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind2_s.3 -MLINKS+= ldap_bind.3 ldap_sasl_bind.3 -MLINKS+= ldap_bind.3 ldap_sasl_bind_s.3 -MLINKS+= ldap_bind.3 ldap_sasl_interactive_bind_s.3 -MLINKS+= ldap_bind.3 ldap_unbind.3 -MLINKS+= ldap_bind.3 ldap_unbind_s.3 -MLINKS+= ldap_bind.3 ldap_unbind_ext.3 -MLINKS+= ldap_bind.3 ldap_unbind_ext_s.3 -MLINKS+= ldap_bind.3 ldap_set_rebind_proc.3 -MAN3+= ldap_compare.3 -MLINKS+= ldap_compare.3 ldap_compare_s.3 -MLINKS+= ldap_compare.3 ldap_compare_ext.3 -MLINKS+= ldap_compare.3 ldap_compare_ext_s.3 -MAN3+= ldap_delete.3 -MLINKS+= ldap_delete.3 ldap_delete_s.3 -MLINKS+= ldap_delete.3 ldap_delete_ext.3 -MLINKS+= ldap_delete.3 ldap_delete_ext_s.3 -MAN3+= ldap_error.3 -MLINKS+= ldap_error.3 ldap_perror.3 -MLINKS+= ldap_error.3 ld_errno.3 -MLINKS+= ldap_error.3 ldap_result2error.3 -MLINKS+= ldap_error.3 ldap_errlist.3 -MLINKS+= ldap_error.3 ldap_err2string.3 -MAN3+= ldap_first_attribute.3 -MLINKS+= ldap_first_attribute.3 ldap_next_attribute.3 -MAN3+= ldap_first_entry.3 -MLINKS+= ldap_first_entry.3 ldap_next_entry.3 -MLINKS+= ldap_first_entry.3 ldap_count_entries.3 -MAN3+= ldap_first_message.3 -MLINKS+= ldap_first_message.3 ldap_next_message.3 -MLINKS+= ldap_first_message.3 ldap_count_messages.3 -MAN3+= ldap_first_reference.3 -MLINKS+= ldap_first_reference.3 ldap_next_reference.3 -MLINKS+= ldap_first_reference.3 ldap_count_references.3 -MAN3+= ldap_get_dn.3 -MLINKS+= ldap_get_dn.3 ldap_explode_dn.3 -MLINKS+= ldap_get_dn.3 ldap_explode_rdn.3 -MLINKS+= ldap_get_dn.3 ldap_dn2ufn.3 -MLINKS+= ldap_get_dn.3 ldap_str2dn.3 -MLINKS+= ldap_get_dn.3 ldap_dn2str.3 -MLINKS+= ldap_get_dn.3 ldap_dn2dcedn.3 -MLINKS+= ldap_get_dn.3 ldap_dcedn2dn.3 -MLINKS+= ldap_get_dn.3 ldap_dn2ad_canonical.3 -MAN3+= ldap_get_values.3 -MLINKS+= ldap_get_values.3 ldap_get_values_len.3 -MLINKS+= ldap_get_values.3 ldap_count_values.3 -MLINKS+= ldap_get_values.3 ldap_count_values_len.3 -MLINKS+= ldap_get_values.3 ldap_value_free.3 -MLINKS+= ldap_get_values.3 ldap_value_free_len.3 -MAN3+= ldap_modify.3 -MLINKS+= ldap_modify.3 ldap_modify_s.3 -MLINKS+= ldap_modify.3 ldap_modify_ext.3 -MLINKS+= ldap_modify.3 ldap_modify_ext_s.3 -MLINKS+= ldap_modify.3 ldap_mods_free.3 -MAN3+= ldap_open.3 -MLINKS+= ldap_open.3 ldap_init.3 -MAN3+= ldap_modrdn.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn_s.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn2.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn2_s.3 -MAN3+= ldap_parse_reference.3 -MAN3+= ldap_parse_result.3 -MLINKS+= ldap_parse_result.3 ldap_parse_sasl_bind_result.3 -MLINKS+= ldap_parse_result.3 ldap_parse_extended_result.3 -MAN3+= ldap_result.3 -MLINKS+= ldap_result.3 ldap_msgfree.3 -MLINKS+= ldap_result.3 ldap_msgtype.3 -MLINKS+= ldap_result.3 ldap_msgid.3 -MAN3+= ldap_schema.3 -MLINKS+= ldap_schema.3 ldap_str2syntax.3 -MLINKS+= ldap_schema.3 ldap_syntax2str.3 -MLINKS+= ldap_schema.3 ldap_syntax2name.3 -MLINKS+= ldap_schema.3 ldap_syntax_free.3 -MLINKS+= ldap_schema.3 ldap_str2matchingrule.3 -MLINKS+= ldap_schema.3 ldap_matchingrule2str.3 -MLINKS+= ldap_schema.3 ldap_matchingrule2name.3 -MLINKS+= ldap_schema.3 ldap_matchingrule_free.3 -MLINKS+= ldap_schema.3 ldap_str2attributetype.3 -MLINKS+= ldap_schema.3 ldap_attributetype2str.3 -MLINKS+= ldap_schema.3 ldap_attributetype2name.3 -MLINKS+= ldap_schema.3 ldap_attributetype_free.3 -MLINKS+= ldap_schema.3 ldap_str2objectclass.3 -MLINKS+= ldap_schema.3 ldap_objectclass2str.3 -MLINKS+= ldap_schema.3 ldap_objectclass2name.3 -MLINKS+= ldap_schema.3 ldap_objectclass_free.3 -MLINKS+= ldap_schema.3 ldap_scherr2str.3 -MAN3+= ldap_search.3 -MLINKS+= ldap_search.3 ldap_search_s.3 -MLINKS+= ldap_search.3 ldap_search_st.3 -MLINKS+= ldap_search.3 ldap_search_ext.3 -MLINKS+= ldap_search.3 ldap_search_ext_s.3 -MAN3+= ldap_sort.3 -MLINKS+= ldap_sort.3 ldap_sort_entries.3 -MLINKS+= ldap_sort.3 ldap_sort_values.3 -MLINKS+= ldap_sort.3 ldap_sort_strcasecmp.3 -MAN3+= ldap_url.3 -MLINKS+= ldap_url.3 ldap_is_ldap_url.3 -MLINKS+= ldap_url.3 ldap_url_parse.3 -MLINKS+= ldap_url.3 ldap_free_urldesc.3 -.if !defined(CLIENT_ONLY) -PLIST_SUB+= NO_SERVERS= -MAN5+= ldap.conf.5 -MAN5+= ldif.5 -MAN5+= slapd-bdb.5 -MAN5+= slapd-dnssrv.5 -MAN5+= slapd-ldap.5 -MAN5+= slapd-ldbm.5 -MAN5+= slapd-meta.5 -MAN5+= slapd-null.5 -MAN5+= slapd-passwd.5 -MAN5+= slapd-perl.5 -MAN5+= slapd-shell.5 -MAN5+= slapd-sql.5 -MAN5+= slapd-tcl.5 -MAN5+= slapd.access.5 -MAN5+= slapd.conf.5 -MAN5+= slapd.replog.5 -MAN8+= slapadd.8 -MAN8+= slapcat.8 -MAN8+= slapd.8 -MAN8+= slapindex.8 -MAN8+= slappasswd.8 -MAN8+= slurpd.8 +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 -PLIST_SUB+= NO_SERVERS="@comment " + @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 4.1)" + @${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} "WITHOUT_TCP_WRAPPERS without tcp wrapper support" .endif + @${ECHO} + @${ECHO} "=============================================================" + @${ECHO} post-patch: - @${CP} ${WRKSRC}/servers/slapd/slapd.conf \ - ${WRKSRC}/servers/slapd/slapd.conf.Dist - @${SED} -e '/^pidfile/s#%LOCALSTATEDIR%#/var/run/ldap#' \ - -e '/^argsfile/s#%LOCALSTATEDIR%#/var/run/ldap#' \ - ${WRKSRC}/servers/slapd/slapd.conf.Dist > \ + @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \ ${WRKSRC}/servers/slapd/slapd.conf +pre-configure: + @${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \ + ${WRKSRC}/configure + post-build: +.for script in slapd.sh slurpd.sh + @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script} +.endfor +.for text in pkg-install pkg-message + @if [ -f ${MASTERDIR}/${text}${OPENLDAP_PKGFILESUFX} ]; then \ + ${SED} ${SED_SCRIPT} ${MASTERDIR}/${text}${OPENLDAP_PKGFILESUFX} \ + >${WRKDIR}/${text}; \ + fi +.endfor + .if !defined(CLIENT_ONLY) - @${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh - @${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh +test: build + @cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \ + ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test .endif -do-install: -.if !defined(CLIENT_ONLY) - @cd ${WRKSRC} && ${MAKE} install - @${STRIP_CMD} ${PREFIX}/libexec/slapd - @${STRIP_CMD} ${PREFIX}/libexec/slurpd -.else - @cd ${WRKSRC}/include && ${MAKE} install - @cd ${WRKSRC}/clients && ${MAKE} install - @cd ${WRKSRC}/libraries && ${MAKE} install -.for i in 1 3 - @cd ${WRKSRC}/doc/man/man$i && ${MAKE} install -.endfor +pre-install: + @${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 \ + | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \ + >>${PLIST}; \ + ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \ + done + @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST} +.endif .endif post-install: -.if !defined(CLIENT_ONLY) - @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample - @${INSTALL_SCRIPT} ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d/slurpd.sh.sample +.if defined(CLIENT_ONLY) +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @for dir in rfc drafts; do \ + ${MKDIR} ${DOCSDIR}/$${dir}; \ + ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \ + -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/openldap21-server/distinfo b/net/openldap21-server/distinfo index dabbac3f898d..b28ce95a8cde 100644 --- a/net/openldap21-server/distinfo +++ b/net/openldap21-server/distinfo @@ -1,2 +1 @@ MD5 (openldap-2.1.22.tgz) = 391512053eded93e73ffa0d377ce272a - diff --git a/net/openldap21-server/files/extrapatch-Makefile.in b/net/openldap21-server/files/extrapatch-Makefile.in new file mode 100644 index 000000000000..bb83ea2b572a --- /dev/null +++ b/net/openldap21-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/openldap21-server/files/manpages b/net/openldap21-server/files/manpages new file mode 100644 index 000000000000..2fe09f704645 --- /dev/null +++ b/net/openldap21-server/files/manpages @@ -0,0 +1,190 @@ +# +# $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-null.5 \ + slapd-passwd.5 \ + slapd-perl.5 \ + slapd-shell.5 \ + slapd-sql.5 \ + slapd-tcl.5 \ + slapd.access.5 \ + slapd.conf.5 \ + slapd.replog.5 + +MAN8+= slapadd.8 \ + slapcat.8 \ + slapd.8 \ + slapindex.8 \ + slappasswd.8 \ + slurpd.8 diff --git a/net/openldap21-server/files/slapd.sh b/net/openldap21-server/files/slapd.sh index e8f6ed6b018d..21bdf775a0b1 100644 --- a/net/openldap21-server/files/slapd.sh +++ b/net/openldap21-server/files/slapd.sh @@ -2,44 +2,57 @@ # # $FreeBSD$ -slapd_program=@@PREFIX@@/libexec/slapd +slapd_program=%%PREFIX%%/libexec/slapd -# Uncomment one of the following: -# -# IPv4 Only -#slapd_args='-u ldap -g ldap -h ldap://0.0.0.0' +slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid + +slapd_enable="NO" + +slapd_args= + +# Add the following lines to /etc/rc.conf to enable slapd: # -# IPv6 and IPv4 -#slapd_ags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"' +#slapd_enable="YES" +#slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"' # -# IPv6 Only -#slapd_args='-u ldap -g ldap -h ldap://[::]' +# See sldap(8) for details # +# Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args +# if you want to run slapd as a non-privileged user (recommended) # -slapd_args="-u ldap -g ldap" - -pidfile=/var/run/ldap/slapd.pid -case "$1" in -start) - if [ -x $slapd ]; then - echo -n ' slapd' - eval ${slapd_program} ${slapd_args} +# Suck in the configuration variables. +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi - fi - ;; -stop) - if [ -f $pidfile ]; then - kill `cat $pidfile` - echo -n ' slapd' - rm $pidfile - else - echo ' slapd: not running' - fi +case "$slapd_enable" in +[Yy][Ee][Ss]) + case "$1" in + start) + if [ -x ${slapd_program} ]; then + echo -n ' slapd' + eval ${slapd_program} ${slapd_args} + fi + ;; + stop) + if [ -f $slapd_pidfile ]; then + kill `cat $slapd_pidfile` + echo -n ' slapd' + else + echo ' slapd: not running' + fi + ;; + *) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; + esac ;; *) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 ;; esac diff --git a/net/openldap21-server/files/slurpd.sh b/net/openldap21-server/files/slurpd.sh index 9f347253a5d6..fc9f88f21cd6 100644 --- a/net/openldap21-server/files/slurpd.sh +++ b/net/openldap21-server/files/slurpd.sh @@ -1,34 +1,50 @@ #!/bin/sh # # $FreeBSD$ + +slurpd_program=%%PREFIX%%/libexec/slurpd + +slurpd_enable="NO" + +slurpd_args= + +# Add the following line to /etc/rc.conf to enable slurpd: +# +#slurpd_enable="YES" +# +# See slurpd(8) for details # -slurpd=@@PREFIX@@/libexec/slurpd -pidfile=/var/run/ldap/slurpd.pid +# Suck in the configuration variables. +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi -case "$1" in -start) - if [ -x $slurpd ]; then - echo -n ' slurpd' - $slurpd & - echo $! > $pidfile - fi - ;; -stop) - pids=`ps xa | awk '/slurpd/{ print $1 }'` - for pid in $pids; do - kill $pid - echo -n " slurpd($pid)" - done - ;; -restart) - $0 stop - $0 start - ;; +case "$slurpd_enable" in +[Yy][Ee][Ss]) + case "$1" in + start) + if [ -x ${slurpd_program} ]; then + echo -n ' slurpd' + ${slurpd_program} ${slurpd_args} + fi + ;; + stop) + if ! killall `basename ${slurpd_program}`; then + echo ' slurpd: not running' + fi + ;; + *) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; + esac + ;; *) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; + ;; esac exit 0 diff --git a/net/openldap21-server/pkg-descr b/net/openldap21-server/pkg-descr index d582b6305fad..509e40a2462f 100644 --- a/net/openldap21-server/pkg-descr +++ b/net/openldap21-server/pkg-descr @@ -1,10 +1,15 @@ -OpenLDAP is a suite of Lightweight Directory Access Protocol(LDAP) -servers, clients, utilities and development tools. +OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers, +clients, utilities and development tools. -OpenLDAP is derived from the University of Michigan LDAP release 3.3 -and is distributed under an open source license. +This package includes the following major components: -WWW: http://www.openldap.org/ + * slapd - a stand-alone LDAP directory server + * slurpd - a stand-alone LDAP replication server + * LDIF tools - data conversion tools for use with slapd -Bjoern A. Zeeb -bzeeb+freebsdports@zabbadoz.net +This is the latest release of OpenLDAP Software for general use. + +WWW: http://www.OpenLDAP.org/ + +- Oliver Eikemeier +eikemeier@fillmore-labs.com diff --git a/net/openldap21-server/pkg-descr.client b/net/openldap21-server/pkg-descr.client new file mode 100644 index 000000000000..7e508c450d4a --- /dev/null +++ b/net/openldap21-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 is the latest release of OpenLDAP Software for general use. + +WWW: http://www.OpenLDAP.org/ + +- Oliver Eikemeier +eikemeier@fillmore-labs.com diff --git a/net/openldap21-server/pkg-install b/net/openldap21-server/pkg-install index 76c6c8ff1b31..6f6b98653853 100644 --- a/net/openldap21-server/pkg-install +++ b/net/openldap21-server/pkg-install @@ -1,52 +1,11 @@ #!/bin/sh # -# $FreeBSD$ +# $FreeBSD$ # - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} -BATCH=${BATCH:=no} - -USER=ldap -USER_UID=389 - -GROUP=ldap -GROUP_GID=389 - -if [ x"$2" = xPRE-INSTALL ]; then - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -g ${GROUP_GID} -h - - then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -u ${USER_UID} -g ${GROUP} -h - \ - -d /nonexistent \ - -s /sbin/nologin \ - -c "OpenLDAP Server" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi -fi - -if [ x"$2" = xPOST-INSTALL ]; then - chown -R $USER:$GROUP /var/db/openldap-data - chown -R $USER:$GROUP /var/run/ldap - chown $USER:$GROUP $PKG_PREFIX/etc/openldap/slapd.conf - chown $USER:$GROUP $PKG_PREFIX/etc/openldap/slapd.conf.default +if [ X"$2" != X"POST-INSTALL" ]; then + exit 0; fi +mkdir -p "%%LDAP_RUN_DIR%%" +mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data" +mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp" diff --git a/net/openldap21-server/pkg-message b/net/openldap21-server/pkg-message index dce1c78534b1..07ec67b4cc5b 100644 --- a/net/openldap21-server/pkg-message +++ b/net/openldap21-server/pkg-message @@ -1,8 +1,26 @@ -The openldap21 port now creates a ldap user an a ldap group. +************************************************************ -If you use slapadd as root to populate your ldap Database please -remember to chown the database directories and containing files -to user ldap and group ldap. +The OpenLDAP server package has been successfully installed. - chown -R ldap:ldap /var/db/openldap-data +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. + +************************************************************ diff --git a/net/openldap21-server/pkg-message.client b/net/openldap21-server/pkg-message.client new file mode 100644 index 000000000000..ef3234fa4b86 --- /dev/null +++ b/net/openldap21-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/openldap21-server/pkg-plist b/net/openldap21-server/pkg-plist index 3aedb7ffca3f..3f185a2b376a 100644 --- a/net/openldap21-server/pkg-plist +++ b/net/openldap21-server/pkg-plist @@ -1,97 +1,44 @@ -@comment ----------------------------------------- -@comment BUILD_CLIENTS -@comment ----------------------------------------- -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 -@comment -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 -@comment -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 -@comment using USE_LIBTOOL make openldap to no longer to compile, so intall these 3 :( -lib/liblber.la -lib/libldap.la -lib/libldap_r.la -@comment -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/num.dat -share/openldap/ucdata/kdecomp.dat -@dirrm share/openldap/ucdata -@dirrm share/openldap -@comment ----------------------------------------- -@comment BUILD_SLURPD -@comment ----------------------------------------- -%%NO_SERVERS%%etc/rc.d/slurpd.sh.sample -%%NO_SERVERS%%libexec/slurpd -%%NO_SERVERS%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp -%%NO_SERVERS%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true -@comment -@comment ----------------------------------------- -@comment BUILD_SLAPD -@comment ----------------------------------------- -%%NO_SERVERS%%etc/rc.d/slapd.sh.sample -%%NO_SERVERS%%libexec/slapd -%%NO_SERVERS%%sbin/slapadd -%%NO_SERVERS%%sbin/slapcat -%%NO_SERVERS%%sbin/slapindex -%%NO_SERVERS%%sbin/slappasswd -%%NO_SERVERS%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi -%%NO_SERVERS%%etc/openldap/slapd.conf.default -%%NO_SERVERS%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/README -%%NO_SERVERS%%etc/openldap/schema/corba.schema.default -%%NO_SERVERS%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/core.schema.default -%%NO_SERVERS%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/cosine.schema.default -%%NO_SERVERS%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/inetorgperson.schema.default -%%NO_SERVERS%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/java.schema.default -%%NO_SERVERS%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/misc.schema.default -%%NO_SERVERS%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/nis.schema.default -%%NO_SERVERS%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema -%%NO_SERVERS%%@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 -%%NO_SERVERS%%etc/openldap/schema/openldap.schema.default -%%NO_SERVERS%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema -%%NO_SERVERS%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true -%%NO_SERVERS%%@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true -%%NO_SERVERS%%@exec [ -d /var/db/openldap-data ] || /bin/mkdir /var/db/openldap-data -%%NO_SERVERS%%@unexec /bin/rmdir /var/db/openldap-data 2>/dev/null || true -%%NO_SERVERS%%@exec [ -d /var/run/ldap ] || /bin/mkdir /var/run/ldap -%%NO_SERVERS%%@unexec /bin/rmdir /var/run/ldap 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 +etc/rc.d/slapd.sh +etc/rc.d/slurpd.sh +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/openldap21-server/pkg-plist.client b/net/openldap21-server/pkg-plist.client new file mode 100644 index 000000000000..a62ad6de5920 --- /dev/null +++ b/net/openldap21-server/pkg-plist.client @@ -0,0 +1,38 @@ +@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 +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 diff --git a/net/openldap22-client/Makefile b/net/openldap22-client/Makefile new file mode 100644 index 000000000000..172fa7d40eec --- /dev/null +++ b/net/openldap22-client/Makefile @@ -0,0 +1,16 @@ +# New ports collection makefile for: openldap22-client +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# +# $FreeBSD$ +# + +PORTNAME= openldap + +COMMENT= Open source LDAP client implementation + +CLIENT_ONLY= yes + +MASTERDIR= ${.CURDIR}/../openldap22-server + +.include "${MASTERDIR}/Makefile" 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 diff --git a/net/openldap23-client/Makefile b/net/openldap23-client/Makefile new file mode 100644 index 000000000000..172fa7d40eec --- /dev/null +++ b/net/openldap23-client/Makefile @@ -0,0 +1,16 @@ +# New ports collection makefile for: openldap22-client +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# +# $FreeBSD$ +# + +PORTNAME= openldap + +COMMENT= Open source LDAP client implementation + +CLIENT_ONLY= yes + +MASTERDIR= ${.CURDIR}/../openldap22-server + +.include "${MASTERDIR}/Makefile" diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile index f13c39a1e86f..c92f580906a6 100644 --- a/net/openldap23-server/Makefile +++ b/net/openldap23-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/openldap23-server/files/extrapatch-Makefile.in b/net/openldap23-server/files/extrapatch-Makefile.in new file mode 100644 index 000000000000..bb83ea2b572a --- /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 +@@ -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/openldap23-server/files/manpages b/net/openldap23-server/files/manpages index d3830d3afa8b..a5a10214c69c 100644 --- a/net/openldap23-server/files/manpages +++ b/net/openldap23-server/files/manpages @@ -1,3 +1,7 @@ +# +# $FreeBSD$ +# + MAN1+= ldapcompare.1 \ ldapdelete.1 \ ldapmodify.1 \ diff --git a/net/openldap23-server/pkg-descr b/net/openldap23-server/pkg-descr index 432cb85b0400..2b568c691c89 100644 --- a/net/openldap23-server/pkg-descr +++ b/net/openldap23-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/openldap23-server/pkg-descr.client b/net/openldap23-server/pkg-descr.client new file mode 100644 index 000000000000..3b9be2330c70 --- /dev/null +++ b/net/openldap23-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/openldap23-server/pkg-install b/net/openldap23-server/pkg-install index 86dae2ce74da..6f6b98653853 100644 --- a/net/openldap23-server/pkg-install +++ b/net/openldap23-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/openldap23-server/pkg-message b/net/openldap23-server/pkg-message index fa99c9a88dd8..07ec67b4cc5b 100644 --- a/net/openldap23-server/pkg-message +++ b/net/openldap23-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/openldap23-server/pkg-message.client b/net/openldap23-server/pkg-message.client new file mode 100644 index 000000000000..ef3234fa4b86 --- /dev/null +++ b/net/openldap23-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/openldap23-server/pkg-plist b/net/openldap23-server/pkg-plist index 9306575d05f9..1665eb495c1b 100644 --- a/net/openldap23-server/pkg-plist +++ b/net/openldap23-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/openldap23-server/pkg-plist.client b/net/openldap23-server/pkg-plist.client new file mode 100644 index 000000000000..28e37f5316cb --- /dev/null +++ b/net/openldap23-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 diff --git a/net/openldap24-client/Makefile b/net/openldap24-client/Makefile new file mode 100644 index 000000000000..172fa7d40eec --- /dev/null +++ b/net/openldap24-client/Makefile @@ -0,0 +1,16 @@ +# New ports collection makefile for: openldap22-client +# Date created: 10 Jul 2003 +# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# +# $FreeBSD$ +# + +PORTNAME= openldap + +COMMENT= Open source LDAP client implementation + +CLIENT_ONLY= yes + +MASTERDIR= ${.CURDIR}/../openldap22-server + +.include "${MASTERDIR}/Makefile" diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile index f13c39a1e86f..c92f580906a6 100644 --- a/net/openldap24-server/Makefile +++ b/net/openldap24-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/openldap24-server/files/extrapatch-Makefile.in b/net/openldap24-server/files/extrapatch-Makefile.in new file mode 100644 index 000000000000..bb83ea2b572a --- /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 +@@ -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/openldap24-server/files/manpages b/net/openldap24-server/files/manpages index d3830d3afa8b..a5a10214c69c 100644 --- a/net/openldap24-server/files/manpages +++ b/net/openldap24-server/files/manpages @@ -1,3 +1,7 @@ +# +# $FreeBSD$ +# + MAN1+= ldapcompare.1 \ ldapdelete.1 \ ldapmodify.1 \ diff --git a/net/openldap24-server/pkg-descr b/net/openldap24-server/pkg-descr index 432cb85b0400..2b568c691c89 100644 --- a/net/openldap24-server/pkg-descr +++ b/net/openldap24-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/openldap24-server/pkg-descr.client b/net/openldap24-server/pkg-descr.client new file mode 100644 index 000000000000..3b9be2330c70 --- /dev/null +++ b/net/openldap24-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/openldap24-server/pkg-install b/net/openldap24-server/pkg-install index 86dae2ce74da..6f6b98653853 100644 --- a/net/openldap24-server/pkg-install +++ b/net/openldap24-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/openldap24-server/pkg-message b/net/openldap24-server/pkg-message index fa99c9a88dd8..07ec67b4cc5b 100644 --- a/net/openldap24-server/pkg-message +++ b/net/openldap24-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/openldap24-server/pkg-message.client b/net/openldap24-server/pkg-message.client new file mode 100644 index 000000000000..ef3234fa4b86 --- /dev/null +++ b/net/openldap24-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/openldap24-server/pkg-plist b/net/openldap24-server/pkg-plist index 9306575d05f9..1665eb495c1b 100644 --- a/net/openldap24-server/pkg-plist +++ b/net/openldap24-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/openldap24-server/pkg-plist.client b/net/openldap24-server/pkg-plist.client new file mode 100644 index 000000000000..28e37f5316cb --- /dev/null +++ b/net/openldap24-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 |