Add openldap22 port after repocopy from openldap21.

Submitted by:	Oliver Eikemeier <eikemeier@fillmore-labs.com>
PR:		ports/53571
This commit is contained in:
Jun Kuriyama 2003-07-02 14:49:57 +00:00
parent f83ffcffea
commit 1e125b279c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=84047
49 changed files with 2353 additions and 2496 deletions

View file

@ -404,6 +404,7 @@
SUBDIR += openldap12 SUBDIR += openldap12
SUBDIR += openldap20 SUBDIR += openldap20
SUBDIR += openldap21 SUBDIR += openldap21
SUBDIR += openldap22
SUBDIR += openmcu SUBDIR += openmcu
SUBDIR += openreg SUBDIR += openreg
SUBDIR += openslp SUBDIR += openslp

View file

@ -1,26 +1,12 @@
# New ports collection makefile for: OpenLDAP 2.1 # New ports collection makefile for: OpenLDAP 2.2
# Date created: 5 Dec 2002 # Date created: 20 Sep 1998
# Whom: Christian Kratzer <ck@cksoft.de> # Whom: Lachlan O'Dea
#
# 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)
# SLAPD_ONLY builds openldap21-slapd-PORTVERSION (slapd and slapd tools)
# SLURPD_ONLY builds openldap21-slurpd-PORTVERSION (slurpd only)
# SERVERS_ONLY builds openldap21-servers-PORTVERSION (slapd and slurpd)
# WITHOUT_SASL do not build against sasl2
#
# OPENLDAP_STABLE an attempt to track the openldap stable branch
# It remains to be seen if this stays practical.
# #
# $FreeBSD$ # $FreeBSD$
# #
PORTNAME= openldap21 PORTNAME= openldap
PORTVERSION= 2.1.20 PORTVERSION= ${OPENLDAP_VERSION}.a
PORTREVISION= 1
CATEGORIES= net databases CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \ http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@ -34,427 +20,177 @@ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \ ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \ ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \
ftp://sunsite.cnlab-switch.ch/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%/ ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
.if defined(OPENLDAP_STABLE) MASTER_SITE_SUBDIR= openldap-test
MASTER_SITE_SUBDIR= openldap-stable DISTNAME= openldap-${OPENLDAP_VERSION}alpha
DISTNAME= openldap-stable-20030410
PKGNAMESUFFIX= -stable
WRKSRC= ${WRKDIR}/openldap-${PORTVERSION}
.else
MASTER_SITE_SUBDIR= openldap-release
DISTNAME= openldap-${PORTVERSION}
.endif
EXTRACT_SUFX= .tgz EXTRACT_SUFX= .tgz
MAINTAINER= ck@cksoft.de MAINTAINER= eikemeier@fillmore-labs.com
COMMENT= Open source LDAP client and server software COMMENT= Open source LDAP client and server implementation
LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 OPENLDAP_VERSION= 2.2.0
CXXFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ CONFLICTS= openldap*
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ LATEST_LINK= openldap2
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
LDFLAGS+= -L${LOCALBASE}/lib USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
USE_OPENSSL= yes PKGINSTALL= ${WRKDIR}/pkg-install
HAS_CONFIGURE= yes PKGMESSAGE= ${WRKDIR}/pkg-message
CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}" \ LOCALSTATEDIR?= /var/db
CPPFLAGS="${CPPFLAGS}" \ LDAP_RUN_DIR?= /var/run/openldap
LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS+=--prefix=${PREFIX} \ WITH_BDB_VER?= 41
--enable-bdb \
--enable-crypt
.if defined(WITHOUT_SASL) CONFIGURE_ARGS= --with-threads \
CONFIGURE_ARGS+= \ --with-tls=openssl
--without-cyrus-sasl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
.if defined(CLIENT_ONLY)
PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else .else
LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
CONFIGURE_ARGS+= \ --enable-lmpasswd \
--with-cyrus-sasl \ --enable-ldbm \
--enable-spasswd --with-ldbm-api=berkeley \
--enable-ldap \
--enable-meta \
--enable-rewrite \
--enable-null \
--enable-monitor
.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 .endif
# ------------------------------------------------------------------------------ .if defined(WITH_PERL)
# common configure .error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
# USE_PERL5= yes
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= --enable-perl
--with-tls \ .endif
--localstatedir=/var/db
.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
.endif
.if defined(WITH_ODBC)
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
CONFIGURE_ARGS+= --enable-sql
.endif
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
.endif
# Include tcp-wrapper support # Include tcp-wrapper support
.if exists(/usr/include/tcpd.h) .if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+= --enable-wrappers CONFIGURE_ARGS+= --enable-wrappers
.endif .endif
PLIST_SUB+= SERVER=""
SED_SCRIPT+= -e '/^%%SERVER%%/s,,,'
.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
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
INSTALLS_SHLIB= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014 .include "${FILESDIR}/manpages"
CONFIGURE_ARGS+= --enable-ipv6
.endif
.if defined(CLIENT_ONLY) pre-everything::
# ------------------------------------------------------------------------------ @${ECHO} "============================================================="
# libraries and client applications only @${ECHO}
# @${ECHO} "You can build ${PKGNAME} with the following options:"
BUILD_CLIENTS= yes @${ECHO}
INSTALLS_SHLIB= yes @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 4.1)"
PKGNAMESUFFIX= -client @${ECHO} "WITH_SASL with SASL2 authorization"
COMMENT= Open source LDAP client software @${ECHO} "WITH_PERL with Perl backend"
CONFIGURE_ARGS+= \ @${ECHO} "WITH_SHELL with Shell backend"
--disable-slapd \ @${ECHO} "WITH_ODBC with SQL backend"
--disable-slurpd \ @${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API
--enable-shared \ @${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support"
--enable-static @${ECHO}
@${ECHO} "============================================================="
.elif defined(SLAPD_ONLY) @${ECHO}
# ------------------------------------------------------------------------------
# slapd only
#
BUILD_SLAPD= yes
PKGNAMESUFFIX= -slapd
COMMENT= Open source LDAP server software (slapd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--disable-slurpd \
--disable-shared \
--disable-static \
--without-threads \
--enable-ldbm \
--enable-ldap \
--enable-shell
.elif defined(SLURPD_ONLY)
# ------------------------------------------------------------------------------
# slurpd only
# NOTE: to build slurpd only package we have to build slapd
# and some backend we just don't install them later on
#
BUILD_SLURPD= yes
PKGNAMESUFFIX= -slurpd
COMMENT= Open source LDAP server software (slurpd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
RUN_DEPENDS+= ${LOCALBASE}/libexec/slapd:${PORTSDIR}/net/openldap-slapd2.1
CONFIGURE_ARGS+= \
--enable-slurpd \
--enable-slapd \
--disable-shared \
--disable-static \
--enable-ldbm \
--disable-ldap \
--disable-shell \
--with-threads
.elif defined(SERVERS_ONLY)
# ------------------------------------------------------------------------------
# slapd and slurpd
#
BUILD_SLAPD= yes
BUILD_SLURPD= yes
PKGNAMESUFFIX= -server
COMMENT= Open source LDAP server software (slapd and slurpd)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--enable-slurpd \
--disable-shared \
--disable-static \
--with-threads \
--enable-ldbm \
--disable-ldap \
--disable-shell
.else
# ------------------------------------------------------------------------------
#
# full package
#
INSTALLS_SHLIB= yes
BUILD_CLIENTS= yes
BUILD_SLAPD= yes
BUILD_SLURPD= yes
CONFIGURE_ARGS+= \
--with-threads \
--enable-slapd \
--enable-slurpd \
--enable-ldbm \
--enable-ldap \
--enable-shell \
--enable-shared \
--enable-static
.endif
# ------------------------------------------------------------------------------
# PLIST subs and MAN?/MLINKS
#
.if defined(BUILD_CLIENTS)
PLIST_SUB+= NO_CLIENTS=
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
.else
PLIST_SUB+= NO_CLIENTS="@comment "
.endif
.if defined(BUILD_SLAPD)
PLIST_SUB+= NO_SLAPD=
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
.else
PLIST_SUB+= NO_SLAPD="@comment "
.endif
.if defined(BUILD_SLURPD)
PLIST_SUB+= NO_SLUPRD=""
MAN8+= slurpd.8
.else
PLIST_SUB+= NO_SLUPRD="@comment "
.endif
post-patch: post-patch:
@${CP} ${WRKSRC}/servers/slapd/slapd.conf \ @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${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 > \
${WRKSRC}/servers/slapd/slapd.conf ${WRKSRC}/servers/slapd/slapd.conf
post-build: post-build:
.if defined(BUILD_SLAPD) .for script in slapd.sh slurpd.sh
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
.endif .endfor
.if defined(BUILD_SLURPD) .for text in pkg-install pkg-message
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh @${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endif
do-install:
.if defined(BUILD_CLIENTS) && defined (BUILD_SLAPD) && defined (BUILD_SLURPD)
@cd ${WRKSRC} && ${MAKE} install
@${STRIP_CMD} ${PREFIX}/libexec/slapd
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.else
.if defined(BUILD_CLIENTS)
@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 .endfor
.endif
.if defined(BUILD_SLAPD)
@cd ${WRKSRC}/servers/slapd && ${MAKE} install
@cd ${WRKSRC}/doc/man/man5 && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapadd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapcat.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapindex.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slappasswd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${MKDIR} /var/db
@${STRIP_CMD} ${PREFIX}/libexec/slapd
.endif
.if defined(BUILD_SLURPD)
@cd ${WRKSRC}/servers/slurpd && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slurpd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${INSTALL_TARGET} -c -o root -g wheel -m 700 -d /var/db/openldap-slurp
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.endif
.endif
post-install: post-install:
.if defined(BUILD_SLAPD) .if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@${MKDIR} ${LDAP_RUN_DIR}
.endif .endif
.if defined(BUILD_SLURPD) .if !defined(NOPORTDOCS)
@${INSTALL_SCRIPT} ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d/slurpd.sh.sample @${MKDIR} ${DOCSDIR}
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
| ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
>>${TMPPLIST}; \
${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
done
@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif .endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,2 +1 @@
MD5 (openldap-stable-20030410.tgz) = 53fb6c157a7c54b988cf7555e56f11e6 MD5 (openldap-2.2.0alpha.tgz) = 72fe342067b717a37b9697898dacfa0a
MD5 (openldap-2.1.20.tgz) = fe6d5f8571672e3107b42299a03e92ce

View file

@ -0,0 +1,188 @@
MAN1+= ldapcompare.1 \
ldapdelete.1 \
ldapmodify.1 \
ldapmodrdn.1 \
ldappasswd.1 \
ldapsearch.1 \
ldapwhoami.1
MLINKS+= \
ldapmodify.1 ldapadd.1
MAN3+= lber-decode.3 \
lber-encode.3 \
lber-memory.3 \
lber-types.3 \
ldap.3 \
ldap_abandon.3 \
ldap_add.3 \
ldap_bind.3 \
ldap_compare.3 \
ldap_delete.3 \
ldap_error.3 \
ldap_first_attribute.3 \
ldap_first_entry.3 \
ldap_first_message.3 \
ldap_first_reference.3 \
ldap_get_dn.3 \
ldap_get_values.3 \
ldap_modify.3 \
ldap_modrdn.3 \
ldap_open.3 \
ldap_parse_reference.3 \
ldap_parse_result.3 \
ldap_result.3 \
ldap_schema.3 \
ldap_search.3 \
ldap_sort.3 \
ldap_url.3
MLINKS+= \
lber-decode.3 ber_first_element.3 \
lber-decode.3 ber_get_bitstring.3 \
lber-decode.3 ber_get_boolean.3 \
lber-decode.3 ber_get_enum.3 \
lber-decode.3 ber_get_int.3 \
lber-decode.3 ber_get_next.3 \
lber-decode.3 ber_get_null.3 \
lber-decode.3 ber_get_stringa.3 \
lber-decode.3 ber_get_stringb.3 \
lber-decode.3 ber_next_element.3 \
lber-decode.3 ber_peek_tag.3 \
lber-decode.3 ber_scanf.3 \
lber-decode.3 ber_skip_tag.3 \
lber-encode.3 ber_alloc_t.3 \
lber-encode.3 ber_flush.3 \
lber-encode.3 ber_printf.3 \
lber-encode.3 ber_put_enum.3 \
lber-encode.3 ber_put_int.3 \
lber-encode.3 ber_put_null.3 \
lber-encode.3 ber_put_ostring.3 \
lber-encode.3 ber_put_seq.3 \
lber-encode.3 ber_put_set.3 \
lber-encode.3 ber_put_string.3 \
lber-encode.3 ber_start_set.3 \
lber-types.3 ber_bvarray_add.3 \
lber-types.3 ber_bvarray_free.3 \
lber-types.3 ber_bvdup.3 \
lber-types.3 ber_bvecadd.3 \
lber-types.3 ber_bvecfree.3 \
lber-types.3 ber_bvfree.3 \
lber-types.3 ber_bvstr.3 \
lber-types.3 ber_bvstrdup.3 \
lber-types.3 ber_dupbv.3 \
lber-types.3 ber_free.3 \
lber-types.3 ber_str2bv.3 \
ldap_abandon.3 ldap_abandon_ext.3 \
ldap_add.3 ldap_add_ext.3 \
ldap_add.3 ldap_add_ext_s.3 \
ldap_add.3 ldap_add_s.3 \
ldap_bind.3 ldap_bind_s.3 \
ldap_bind.3 ldap_kerberos_bind1.3 \
ldap_bind.3 ldap_kerberos_bind1_s.3 \
ldap_bind.3 ldap_kerberos_bind2.3 \
ldap_bind.3 ldap_kerberos_bind2_s.3 \
ldap_bind.3 ldap_kerberos_bind_s.3 \
ldap_bind.3 ldap_sasl_bind.3 \
ldap_bind.3 ldap_sasl_bind_s.3 \
ldap_bind.3 ldap_simple_bind.3 \
ldap_bind.3 ldap_simple_bind_s.3 \
ldap_bind.3 ldap_unbind.3 \
ldap_bind.3 ldap_unbind_ext.3 \
ldap_bind.3 ldap_unbind_ext_s.3 \
ldap_bind.3 ldap_unbind_s.3 \
ldap_compare.3 ldap_compare_ext.3 \
ldap_compare.3 ldap_compare_ext_s.3 \
ldap_compare.3 ldap_compare_s.3 \
ldap_delete.3 ldap_delete_ext.3 \
ldap_delete.3 ldap_delete_ext_s.3 \
ldap_delete.3 ldap_delete_s.3 \
ldap_error.3 ld_errno.3 \
ldap_error.3 ldap_err2string.3 \
ldap_error.3 ldap_errlist.3 \
ldap_error.3 ldap_perror.3 \
ldap_error.3 ldap_result2error.3 \
ldap_first_attribute.3 ldap_next_attribute.3 \
ldap_first_entry.3 ldap_count_entries.3 \
ldap_first_entry.3 ldap_next_entry.3 \
ldap_first_message.3 ldap_count_messages.3 \
ldap_first_message.3 ldap_next_message.3 \
ldap_first_reference.3 ldap_count_references.3 \
ldap_first_reference.3 ldap_next_reference.3 \
ldap_get_dn.3 ldap_dcedn2dn.3 \
ldap_get_dn.3 ldap_dn2ad_canonical.3 \
ldap_get_dn.3 ldap_dn2dcedn.3 \
ldap_get_dn.3 ldap_dn2str.3 \
ldap_get_dn.3 ldap_dn2ufn.3 \
ldap_get_dn.3 ldap_explode_dn.3 \
ldap_get_dn.3 ldap_explode_rdn.3 \
ldap_get_dn.3 ldap_str2dn.3 \
ldap_get_values.3 ldap_count_values.3 \
ldap_get_values.3 ldap_count_values_len.3 \
ldap_get_values.3 ldap_get_values_len.3 \
ldap_get_values.3 ldap_value_free.3 \
ldap_get_values.3 ldap_value_free_len.3 \
ldap_modify.3 ldap_modify_ext.3 \
ldap_modify.3 ldap_modify_ext_s.3 \
ldap_modify.3 ldap_modify_s.3 \
ldap_modify.3 ldap_mods_free.3 \
ldap_modrdn.3 ldap_modrdn2.3 \
ldap_modrdn.3 ldap_modrdn2_s.3 \
ldap_modrdn.3 ldap_modrdn_s.3 \
ldap_open.3 ldap_init.3 \
ldap_parse_result.3 ldap_parse_extended_result.3 \
ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
ldap_result.3 ldap_msgfree.3 \
ldap_result.3 ldap_msgid.3 \
ldap_result.3 ldap_msgtype.3 \
ldap_schema.3 ldap_attributetype2name.3 \
ldap_schema.3 ldap_attributetype2str.3 \
ldap_schema.3 ldap_attributetype_free.3 \
ldap_schema.3 ldap_matchingrule2name.3 \
ldap_schema.3 ldap_matchingrule2str.3 \
ldap_schema.3 ldap_matchingrule_free.3 \
ldap_schema.3 ldap_objectclass2name.3 \
ldap_schema.3 ldap_objectclass2str.3 \
ldap_schema.3 ldap_objectclass_free.3 \
ldap_schema.3 ldap_scherr2str.3 \
ldap_schema.3 ldap_str2attributetype.3 \
ldap_schema.3 ldap_str2matchingrule.3 \
ldap_schema.3 ldap_str2objectclass.3 \
ldap_schema.3 ldap_str2syntax.3 \
ldap_schema.3 ldap_syntax2name.3 \
ldap_schema.3 ldap_syntax2str.3 \
ldap_schema.3 ldap_syntax_free.3 \
ldap_search.3 ldap_search_ext.3 \
ldap_search.3 ldap_search_ext_s.3 \
ldap_search.3 ldap_search_s.3 \
ldap_search.3 ldap_search_st.3 \
ldap_sort.3 ldap_sort_entries.3 \
ldap_sort.3 ldap_sort_strcasecmp.3 \
ldap_sort.3 ldap_sort_values.3 \
ldap_url.3 ldap_free_urldesc.3 \
ldap_url.3 ldap_is_ldap_url.3 \
ldap_url.3 ldap_url_parse.3
MAN5+= ldap.conf.5 \
ldif.5 \
slapd-bdb.5 \
slapd-dnssrv.5 \
slapd-ldap.5 \
slapd-ldbm.5 \
slapd-meta.5 \
slapd-monitor.5 \
slapd-null.5 \
slapd-passwd.5 \
slapd-perl.5 \
slapd-shell.5 \
slapd-sql.5 \
slapd-tcl.5 \
slapd.access.5 \
slapd.conf.5 \
slapd.plugin.5 \
slapd.replog.5
MAN8+= slapadd.8 \
slapcat.8 \
slapd.8 \
slapindex.8 \
slappasswd.8 \
slurpd.8

View file

@ -0,0 +1,15 @@
--- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
@@ -4285,12 +4285,6 @@
IFS="$save_ifs"
fi
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
;;

View file

@ -0,0 +1,14 @@
#
# ITS#2562: add missing arg to hash_lanman
#
--- libraries/liblutil/passwd.c.orig Fri May 2 13:29:29 2003
+++ libraries/liblutil/passwd.c Sun Jun 22 03:08:18 2003
@@ -632,7 +632,7 @@
{
struct berval *hash;
- hash = hash_lanman( scheme, cred );
+ hash = hash_lanman( scheme, cred, text );
return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32);
}
#endif /* SLAPD_LMHASH */

View file

@ -0,0 +1,11 @@
--- servers/slapd/daemon.c.orig Sat May 24 21:12:20 2003
+++ servers/slapd/daemon.c Sun Jun 22 19:26:22 2003
@@ -858,7 +858,7 @@
#ifdef LDAP_PF_LOCAL
case AF_LOCAL: {
char *addr = ((struct sockaddr_un *)*sal)->sun_path;
-#if 0 /* don't muck with socket perms */
+#if 1
if ( chmod( addr, l.sl_perms ) < 0 && crit ) {
int err = sock_errno();
#ifdef NEW_LOGGING

View file

@ -2,44 +2,57 @@
# #
# $FreeBSD$ # $FreeBSD$
slapd_program=@@PREFIX@@/libexec/slapd slapd_program=%%PREFIX%%/libexec/slapd
# Uncomment one of the following: slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
#
# IPv4 Only
#slapd_args='-u ldap -g ldap -h ldap://0.0.0.0'
#
# IPv6 and IPv4
#slapd_ags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
#
# IPv6 Only
#slapd_args='-u ldap -g ldap -h ldap://[::]'
#
#
slapd_args="-u ldap -g ldap"
pidfile=/var/run/ldap/slapd.pid slapd_enable="NO"
case "$1" in slapd_args=
start)
if [ -x $slapd ]; then
echo -n ' slapd'
eval ${slapd_program} ${slapd_args}
fi # Add the following lines to /etc/rc.conf to enable slapd:
;; #
stop) #slapd_enable="YES"
if [ -f $pidfile ]; then #slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
kill `cat $pidfile` #
echo -n ' slapd' # See sldap(8) for details
rm $pidfile #
else # Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
echo ' slapd: not running' # if you want to run slapd as a non-privileged user (recommended)
fi #
# 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 "$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 esac

View file

@ -1,34 +1,50 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $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 # Suck in the configuration variables.
pidfile=/var/run/ldap/slurpd.pid 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 case "$slurpd_enable" in
start) [Yy][Ee][Ss])
if [ -x $slurpd ]; then case "$1" in
echo -n ' slurpd' start)
$slurpd & if [ -x ${slurpd_program} ]; then
echo $! > $pidfile echo -n ' slurpd'
fi ${slurpd_program} ${slurpd_args}
;; fi
stop) ;;
pids=`ps xa | awk '/slurpd/{ print $1 }'` stop)
for pid in $pids; do if ! killall `basename ${slurpd_program}`; then
kill $pid echo ' slurpd: not running'
echo -n " slurpd($pid)" fi
done ;;
;; *)
restart) echo "Usage: `basename $0` {start|stop}" >&2
$0 stop exit 64
$0 start ;;
;; esac
;;
*) *)
echo "Usage: `basename $0` {start|stop}" >&2 ;;
exit 64
;;
esac esac
exit 0 exit 0

View file

@ -1,10 +1,15 @@
OpenLDAP is a suite of Lightweight Directory Access Protocol(LDAP) OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
servers, clients, utilities and development tools. clients, utilities and development tools.
OpenLDAP is derived from the University of Michigan LDAP release 3.3 This release includes the following major components:
and is distributed under an open source license.
WWW: http://www.openldap.org/ * 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
Bjoern A. Zeeb WWW: http://www.OpenLDAP.org/
bzeeb+freebsdports@zabbadoz.net
Lachlan O'Dea, Oliver Eikemeier

View file

@ -1,52 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $FreeBSD$
# #
if [ X"$2" != X"POST-INSTALL" ]; then
PKG_PREFIX=${PKG_PREFIX:=/usr/local} exit 0;
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
fi fi
%%SERVER%%mkdir -p "%%LDAP_RUN_DIR%%"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"

View file

@ -1,8 +1,30 @@
The openldap21 port now creates a ldap user an a ldap group. ************************************************************
If you use slapadd as root to populate your ldap Database please The OpenLDAP package has been successfully installed.
remember to chown the database directories and containing files
to user ldap and group ldap.
chown -R ldap:ldap /var/db/openldap-data Edit
%%PREFIX%%/etc/openldap/ldap.conf
to change the system-wide client defaults.
%%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%%
************************************************************

View file

@ -1,97 +1,83 @@
@comment ----------------------------------------- bin/ldapadd
@comment BUILD_CLIENTS bin/ldapcompare
@comment ----------------------------------------- bin/ldapdelete
%%NO_CLIENTS%%bin/ldapadd bin/ldapmodify
%%NO_CLIENTS%%bin/ldapcompare bin/ldapmodrdn
%%NO_CLIENTS%%bin/ldapdelete bin/ldappasswd
%%NO_CLIENTS%%bin/ldapmodify bin/ldapsearch
%%NO_CLIENTS%%bin/ldapmodrdn bin/ldapwhoami
%%NO_CLIENTS%%bin/ldappasswd %%SERVER%%@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%bin/ldapsearch %%SERVER%%@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%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
%%NO_CLIENTS%%@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
%%NO_CLIENTS%%etc/openldap/ldap.conf.default @exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
%%NO_CLIENTS%%@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf %%SERVER%%etc/openldap/schema/README
@comment %%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
%%NO_CLIENTS%%include/lber.h %%SERVER%%etc/openldap/schema/corba.schema.default
%%NO_CLIENTS%%include/lber_types.h %%SERVER%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
%%NO_CLIENTS%%include/ldap.h %%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
%%NO_CLIENTS%%include/ldap_cdefs.h %%SERVER%%etc/openldap/schema/core.schema.default
%%NO_CLIENTS%%include/ldap_features.h %%SERVER%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
%%NO_CLIENTS%%include/ldap_schema.h %%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
%%NO_CLIENTS%%include/ldap_utf8.h %%SERVER%%etc/openldap/schema/cosine.schema.default
@comment %%SERVER%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
%%NO_CLIENTS%%lib/liblber.a %%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
%%NO_CLIENTS%%lib/liblber.so %%SERVER%%etc/openldap/schema/inetorgperson.schema.default
%%NO_CLIENTS%%lib/liblber.so.2 %%SERVER%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
%%NO_CLIENTS%%lib/libldap.a %%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
%%NO_CLIENTS%%lib/libldap.so %%SERVER%%etc/openldap/schema/java.schema.default
%%NO_CLIENTS%%lib/libldap.so.2 %%SERVER%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
%%NO_CLIENTS%%lib/libldap_r.a %%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
%%NO_CLIENTS%%lib/libldap_r.so %%SERVER%%etc/openldap/schema/misc.schema.default
%%NO_CLIENTS%%lib/libldap_r.so.2 %%SERVER%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
@comment using USE_LIBTOOL make openldap to no longer to compile, so intall these 3 :( %%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
%%NO_CLIENTS%%lib/liblber.la %%SERVER%%etc/openldap/schema/nis.schema.default
%%NO_CLIENTS%%lib/libldap.la %%SERVER%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_CLIENTS%%lib/libldap_r.la %%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
@comment %%SERVER%%etc/openldap/schema/openldap.schema.default
%%NO_CLIENTS%%share/openldap/ucdata/case.dat %%SERVER%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_CLIENTS%%share/openldap/ucdata/cmbcl.dat %%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
%%NO_CLIENTS%%share/openldap/ucdata/comp.dat %%SERVER%%etc/openldap/slapd.conf.default
%%NO_CLIENTS%%share/openldap/ucdata/ctype.dat %%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
%%NO_CLIENTS%%share/openldap/ucdata/decomp.dat %%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/num.dat @unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/kdecomp.dat %%SERVER%%etc/rc.d/slapd.sh
%%NO_CLIENTS%%@dirrm share/openldap/ucdata %%SERVER%%etc/rc.d/slurpd.sh
%%NO_CLIENTS%%@dirrm share/openldap include/lber.h
@comment ----------------------------------------- include/lber_types.h
@comment BUILD_SLURPD include/ldap.h
@comment ----------------------------------------- include/ldap_cdefs.h
%%NO_SLUPRD%%etc/rc.d/slurpd.sh.sample include/ldap_features.h
%%NO_SLUPRD%%libexec/slurpd include/ldap_schema.h
%%NO_SLUPRD%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp include/ldap_utf8.h
%%NO_SLUPRD%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true include/slapi-plugin.h
@comment lib/liblber.a
@comment ----------------------------------------- lib/liblber.so
@comment BUILD_SLAPD lib/liblber.so.2
@comment ----------------------------------------- lib/libldap.a
%%NO_SLAPD%%etc/rc.d/slapd.sh.sample lib/libldap.so
%%NO_SLAPD%%libexec/slapd lib/libldap.so.2
%%NO_SLAPD%%sbin/slapadd lib/libldap_r.a
%%NO_SLAPD%%sbin/slapcat lib/libldap_r.so
%%NO_SLAPD%%sbin/slapindex lib/libldap_r.so.2
%%NO_SLAPD%%sbin/slappasswd %%SLAPI%%lib/libslapi.a
%%NO_SLAPD%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi %%SLAPI%%lib/libslapi.so
%%NO_SLAPD%%etc/openldap/slapd.conf.default %%SLAPI%%lib/libslapi.so.2
%%NO_SLAPD%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf %%SERVER%%libexec/slapd
%%NO_SLAPD%%@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%%libexec/slurpd
%%NO_SLAPD%%etc/openldap/schema/README %%SERVER%%sbin/slapadd
%%NO_SLAPD%%etc/openldap/schema/corba.schema.default %%SERVER%%sbin/slapcat
%%NO_SLAPD%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema %%SERVER%%sbin/slapindex
%%NO_SLAPD%%@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%%sbin/slappasswd
%%NO_SLAPD%%etc/openldap/schema/core.schema.default share/openldap/ucdata/case.dat
%%NO_SLAPD%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema share/openldap/ucdata/cmbcl.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/comp.dat
%%NO_SLAPD%%etc/openldap/schema/cosine.schema.default share/openldap/ucdata/ctype.dat
%%NO_SLAPD%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema share/openldap/ucdata/decomp.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/kdecomp.dat
%%NO_SLAPD%%etc/openldap/schema/inetorgperson.schema.default share/openldap/ucdata/num.dat
%%NO_SLAPD%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema @dirrm share/openldap/ucdata
%%NO_SLAPD%%@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 @dirrm share/openldap
%%NO_SLAPD%%etc/openldap/schema/java.schema.default %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
%%NO_SLAPD%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@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%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
%%NO_SLAPD%%etc/openldap/schema/misc.schema.default
%%NO_SLAPD%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/nis.schema.default
%%NO_SLAPD%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/openldap.schema.default
%%NO_SLAPD%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/db/openldap-data ] || /bin/mkdir /var/db/openldap-data
%%NO_SLAPD%%@unexec /bin/rmdir /var/db/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/run/ldap ] || /bin/mkdir /var/run/ldap
%%NO_SLAPD%%@unexec /bin/rmdir /var/run/ldap 2>/dev/null || true

View file

@ -1,26 +1,12 @@
# New ports collection makefile for: OpenLDAP 2.1 # New ports collection makefile for: OpenLDAP 2.2
# Date created: 5 Dec 2002 # Date created: 20 Sep 1998
# Whom: Christian Kratzer <ck@cksoft.de> # Whom: Lachlan O'Dea
#
# 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)
# SLAPD_ONLY builds openldap21-slapd-PORTVERSION (slapd and slapd tools)
# SLURPD_ONLY builds openldap21-slurpd-PORTVERSION (slurpd only)
# SERVERS_ONLY builds openldap21-servers-PORTVERSION (slapd and slurpd)
# WITHOUT_SASL do not build against sasl2
#
# OPENLDAP_STABLE an attempt to track the openldap stable branch
# It remains to be seen if this stays practical.
# #
# $FreeBSD$ # $FreeBSD$
# #
PORTNAME= openldap21 PORTNAME= openldap
PORTVERSION= 2.1.20 PORTVERSION= ${OPENLDAP_VERSION}.a
PORTREVISION= 1
CATEGORIES= net databases CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \ http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@ -34,427 +20,177 @@ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \ ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \ ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \
ftp://sunsite.cnlab-switch.ch/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%/ ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
.if defined(OPENLDAP_STABLE) MASTER_SITE_SUBDIR= openldap-test
MASTER_SITE_SUBDIR= openldap-stable DISTNAME= openldap-${OPENLDAP_VERSION}alpha
DISTNAME= openldap-stable-20030410
PKGNAMESUFFIX= -stable
WRKSRC= ${WRKDIR}/openldap-${PORTVERSION}
.else
MASTER_SITE_SUBDIR= openldap-release
DISTNAME= openldap-${PORTVERSION}
.endif
EXTRACT_SUFX= .tgz EXTRACT_SUFX= .tgz
MAINTAINER= ck@cksoft.de MAINTAINER= eikemeier@fillmore-labs.com
COMMENT= Open source LDAP client and server software COMMENT= Open source LDAP client and server implementation
LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 OPENLDAP_VERSION= 2.2.0
CXXFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ CONFLICTS= openldap*
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ LATEST_LINK= openldap2
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
LDFLAGS+= -L${LOCALBASE}/lib USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
USE_OPENSSL= yes PKGINSTALL= ${WRKDIR}/pkg-install
HAS_CONFIGURE= yes PKGMESSAGE= ${WRKDIR}/pkg-message
CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}" \ LOCALSTATEDIR?= /var/db
CPPFLAGS="${CPPFLAGS}" \ LDAP_RUN_DIR?= /var/run/openldap
LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS+=--prefix=${PREFIX} \ WITH_BDB_VER?= 41
--enable-bdb \
--enable-crypt
.if defined(WITHOUT_SASL) CONFIGURE_ARGS= --with-threads \
CONFIGURE_ARGS+= \ --with-tls=openssl
--without-cyrus-sasl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
.if defined(CLIENT_ONLY)
PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else .else
LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
CONFIGURE_ARGS+= \ --enable-lmpasswd \
--with-cyrus-sasl \ --enable-ldbm \
--enable-spasswd --with-ldbm-api=berkeley \
--enable-ldap \
--enable-meta \
--enable-rewrite \
--enable-null \
--enable-monitor
.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 .endif
# ------------------------------------------------------------------------------ .if defined(WITH_PERL)
# common configure .error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
# USE_PERL5= yes
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= --enable-perl
--with-tls \ .endif
--localstatedir=/var/db
.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
.endif
.if defined(WITH_ODBC)
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
CONFIGURE_ARGS+= --enable-sql
.endif
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
.endif
# Include tcp-wrapper support # Include tcp-wrapper support
.if exists(/usr/include/tcpd.h) .if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+= --enable-wrappers CONFIGURE_ARGS+= --enable-wrappers
.endif .endif
PLIST_SUB+= SERVER=""
SED_SCRIPT+= -e '/^%%SERVER%%/s,,,'
.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
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
INSTALLS_SHLIB= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014 .include "${FILESDIR}/manpages"
CONFIGURE_ARGS+= --enable-ipv6
.endif
.if defined(CLIENT_ONLY) pre-everything::
# ------------------------------------------------------------------------------ @${ECHO} "============================================================="
# libraries and client applications only @${ECHO}
# @${ECHO} "You can build ${PKGNAME} with the following options:"
BUILD_CLIENTS= yes @${ECHO}
INSTALLS_SHLIB= yes @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 4.1)"
PKGNAMESUFFIX= -client @${ECHO} "WITH_SASL with SASL2 authorization"
COMMENT= Open source LDAP client software @${ECHO} "WITH_PERL with Perl backend"
CONFIGURE_ARGS+= \ @${ECHO} "WITH_SHELL with Shell backend"
--disable-slapd \ @${ECHO} "WITH_ODBC with SQL backend"
--disable-slurpd \ @${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API
--enable-shared \ @${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support"
--enable-static @${ECHO}
@${ECHO} "============================================================="
.elif defined(SLAPD_ONLY) @${ECHO}
# ------------------------------------------------------------------------------
# slapd only
#
BUILD_SLAPD= yes
PKGNAMESUFFIX= -slapd
COMMENT= Open source LDAP server software (slapd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--disable-slurpd \
--disable-shared \
--disable-static \
--without-threads \
--enable-ldbm \
--enable-ldap \
--enable-shell
.elif defined(SLURPD_ONLY)
# ------------------------------------------------------------------------------
# slurpd only
# NOTE: to build slurpd only package we have to build slapd
# and some backend we just don't install them later on
#
BUILD_SLURPD= yes
PKGNAMESUFFIX= -slurpd
COMMENT= Open source LDAP server software (slurpd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
RUN_DEPENDS+= ${LOCALBASE}/libexec/slapd:${PORTSDIR}/net/openldap-slapd2.1
CONFIGURE_ARGS+= \
--enable-slurpd \
--enable-slapd \
--disable-shared \
--disable-static \
--enable-ldbm \
--disable-ldap \
--disable-shell \
--with-threads
.elif defined(SERVERS_ONLY)
# ------------------------------------------------------------------------------
# slapd and slurpd
#
BUILD_SLAPD= yes
BUILD_SLURPD= yes
PKGNAMESUFFIX= -server
COMMENT= Open source LDAP server software (slapd and slurpd)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--enable-slurpd \
--disable-shared \
--disable-static \
--with-threads \
--enable-ldbm \
--disable-ldap \
--disable-shell
.else
# ------------------------------------------------------------------------------
#
# full package
#
INSTALLS_SHLIB= yes
BUILD_CLIENTS= yes
BUILD_SLAPD= yes
BUILD_SLURPD= yes
CONFIGURE_ARGS+= \
--with-threads \
--enable-slapd \
--enable-slurpd \
--enable-ldbm \
--enable-ldap \
--enable-shell \
--enable-shared \
--enable-static
.endif
# ------------------------------------------------------------------------------
# PLIST subs and MAN?/MLINKS
#
.if defined(BUILD_CLIENTS)
PLIST_SUB+= NO_CLIENTS=
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
.else
PLIST_SUB+= NO_CLIENTS="@comment "
.endif
.if defined(BUILD_SLAPD)
PLIST_SUB+= NO_SLAPD=
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
.else
PLIST_SUB+= NO_SLAPD="@comment "
.endif
.if defined(BUILD_SLURPD)
PLIST_SUB+= NO_SLUPRD=""
MAN8+= slurpd.8
.else
PLIST_SUB+= NO_SLUPRD="@comment "
.endif
post-patch: post-patch:
@${CP} ${WRKSRC}/servers/slapd/slapd.conf \ @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${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 > \
${WRKSRC}/servers/slapd/slapd.conf ${WRKSRC}/servers/slapd/slapd.conf
post-build: post-build:
.if defined(BUILD_SLAPD) .for script in slapd.sh slurpd.sh
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
.endif .endfor
.if defined(BUILD_SLURPD) .for text in pkg-install pkg-message
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh @${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endif
do-install:
.if defined(BUILD_CLIENTS) && defined (BUILD_SLAPD) && defined (BUILD_SLURPD)
@cd ${WRKSRC} && ${MAKE} install
@${STRIP_CMD} ${PREFIX}/libexec/slapd
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.else
.if defined(BUILD_CLIENTS)
@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 .endfor
.endif
.if defined(BUILD_SLAPD)
@cd ${WRKSRC}/servers/slapd && ${MAKE} install
@cd ${WRKSRC}/doc/man/man5 && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapadd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapcat.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapindex.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slappasswd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${MKDIR} /var/db
@${STRIP_CMD} ${PREFIX}/libexec/slapd
.endif
.if defined(BUILD_SLURPD)
@cd ${WRKSRC}/servers/slurpd && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slurpd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${INSTALL_TARGET} -c -o root -g wheel -m 700 -d /var/db/openldap-slurp
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.endif
.endif
post-install: post-install:
.if defined(BUILD_SLAPD) .if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@${MKDIR} ${LDAP_RUN_DIR}
.endif .endif
.if defined(BUILD_SLURPD) .if !defined(NOPORTDOCS)
@${INSTALL_SCRIPT} ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d/slurpd.sh.sample @${MKDIR} ${DOCSDIR}
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
| ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
>>${TMPPLIST}; \
${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
done
@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif .endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,2 +1 @@
MD5 (openldap-stable-20030410.tgz) = 53fb6c157a7c54b988cf7555e56f11e6 MD5 (openldap-2.2.0alpha.tgz) = 72fe342067b717a37b9697898dacfa0a
MD5 (openldap-2.1.20.tgz) = fe6d5f8571672e3107b42299a03e92ce

View file

@ -0,0 +1,188 @@
MAN1+= ldapcompare.1 \
ldapdelete.1 \
ldapmodify.1 \
ldapmodrdn.1 \
ldappasswd.1 \
ldapsearch.1 \
ldapwhoami.1
MLINKS+= \
ldapmodify.1 ldapadd.1
MAN3+= lber-decode.3 \
lber-encode.3 \
lber-memory.3 \
lber-types.3 \
ldap.3 \
ldap_abandon.3 \
ldap_add.3 \
ldap_bind.3 \
ldap_compare.3 \
ldap_delete.3 \
ldap_error.3 \
ldap_first_attribute.3 \
ldap_first_entry.3 \
ldap_first_message.3 \
ldap_first_reference.3 \
ldap_get_dn.3 \
ldap_get_values.3 \
ldap_modify.3 \
ldap_modrdn.3 \
ldap_open.3 \
ldap_parse_reference.3 \
ldap_parse_result.3 \
ldap_result.3 \
ldap_schema.3 \
ldap_search.3 \
ldap_sort.3 \
ldap_url.3
MLINKS+= \
lber-decode.3 ber_first_element.3 \
lber-decode.3 ber_get_bitstring.3 \
lber-decode.3 ber_get_boolean.3 \
lber-decode.3 ber_get_enum.3 \
lber-decode.3 ber_get_int.3 \
lber-decode.3 ber_get_next.3 \
lber-decode.3 ber_get_null.3 \
lber-decode.3 ber_get_stringa.3 \
lber-decode.3 ber_get_stringb.3 \
lber-decode.3 ber_next_element.3 \
lber-decode.3 ber_peek_tag.3 \
lber-decode.3 ber_scanf.3 \
lber-decode.3 ber_skip_tag.3 \
lber-encode.3 ber_alloc_t.3 \
lber-encode.3 ber_flush.3 \
lber-encode.3 ber_printf.3 \
lber-encode.3 ber_put_enum.3 \
lber-encode.3 ber_put_int.3 \
lber-encode.3 ber_put_null.3 \
lber-encode.3 ber_put_ostring.3 \
lber-encode.3 ber_put_seq.3 \
lber-encode.3 ber_put_set.3 \
lber-encode.3 ber_put_string.3 \
lber-encode.3 ber_start_set.3 \
lber-types.3 ber_bvarray_add.3 \
lber-types.3 ber_bvarray_free.3 \
lber-types.3 ber_bvdup.3 \
lber-types.3 ber_bvecadd.3 \
lber-types.3 ber_bvecfree.3 \
lber-types.3 ber_bvfree.3 \
lber-types.3 ber_bvstr.3 \
lber-types.3 ber_bvstrdup.3 \
lber-types.3 ber_dupbv.3 \
lber-types.3 ber_free.3 \
lber-types.3 ber_str2bv.3 \
ldap_abandon.3 ldap_abandon_ext.3 \
ldap_add.3 ldap_add_ext.3 \
ldap_add.3 ldap_add_ext_s.3 \
ldap_add.3 ldap_add_s.3 \
ldap_bind.3 ldap_bind_s.3 \
ldap_bind.3 ldap_kerberos_bind1.3 \
ldap_bind.3 ldap_kerberos_bind1_s.3 \
ldap_bind.3 ldap_kerberos_bind2.3 \
ldap_bind.3 ldap_kerberos_bind2_s.3 \
ldap_bind.3 ldap_kerberos_bind_s.3 \
ldap_bind.3 ldap_sasl_bind.3 \
ldap_bind.3 ldap_sasl_bind_s.3 \
ldap_bind.3 ldap_simple_bind.3 \
ldap_bind.3 ldap_simple_bind_s.3 \
ldap_bind.3 ldap_unbind.3 \
ldap_bind.3 ldap_unbind_ext.3 \
ldap_bind.3 ldap_unbind_ext_s.3 \
ldap_bind.3 ldap_unbind_s.3 \
ldap_compare.3 ldap_compare_ext.3 \
ldap_compare.3 ldap_compare_ext_s.3 \
ldap_compare.3 ldap_compare_s.3 \
ldap_delete.3 ldap_delete_ext.3 \
ldap_delete.3 ldap_delete_ext_s.3 \
ldap_delete.3 ldap_delete_s.3 \
ldap_error.3 ld_errno.3 \
ldap_error.3 ldap_err2string.3 \
ldap_error.3 ldap_errlist.3 \
ldap_error.3 ldap_perror.3 \
ldap_error.3 ldap_result2error.3 \
ldap_first_attribute.3 ldap_next_attribute.3 \
ldap_first_entry.3 ldap_count_entries.3 \
ldap_first_entry.3 ldap_next_entry.3 \
ldap_first_message.3 ldap_count_messages.3 \
ldap_first_message.3 ldap_next_message.3 \
ldap_first_reference.3 ldap_count_references.3 \
ldap_first_reference.3 ldap_next_reference.3 \
ldap_get_dn.3 ldap_dcedn2dn.3 \
ldap_get_dn.3 ldap_dn2ad_canonical.3 \
ldap_get_dn.3 ldap_dn2dcedn.3 \
ldap_get_dn.3 ldap_dn2str.3 \
ldap_get_dn.3 ldap_dn2ufn.3 \
ldap_get_dn.3 ldap_explode_dn.3 \
ldap_get_dn.3 ldap_explode_rdn.3 \
ldap_get_dn.3 ldap_str2dn.3 \
ldap_get_values.3 ldap_count_values.3 \
ldap_get_values.3 ldap_count_values_len.3 \
ldap_get_values.3 ldap_get_values_len.3 \
ldap_get_values.3 ldap_value_free.3 \
ldap_get_values.3 ldap_value_free_len.3 \
ldap_modify.3 ldap_modify_ext.3 \
ldap_modify.3 ldap_modify_ext_s.3 \
ldap_modify.3 ldap_modify_s.3 \
ldap_modify.3 ldap_mods_free.3 \
ldap_modrdn.3 ldap_modrdn2.3 \
ldap_modrdn.3 ldap_modrdn2_s.3 \
ldap_modrdn.3 ldap_modrdn_s.3 \
ldap_open.3 ldap_init.3 \
ldap_parse_result.3 ldap_parse_extended_result.3 \
ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
ldap_result.3 ldap_msgfree.3 \
ldap_result.3 ldap_msgid.3 \
ldap_result.3 ldap_msgtype.3 \
ldap_schema.3 ldap_attributetype2name.3 \
ldap_schema.3 ldap_attributetype2str.3 \
ldap_schema.3 ldap_attributetype_free.3 \
ldap_schema.3 ldap_matchingrule2name.3 \
ldap_schema.3 ldap_matchingrule2str.3 \
ldap_schema.3 ldap_matchingrule_free.3 \
ldap_schema.3 ldap_objectclass2name.3 \
ldap_schema.3 ldap_objectclass2str.3 \
ldap_schema.3 ldap_objectclass_free.3 \
ldap_schema.3 ldap_scherr2str.3 \
ldap_schema.3 ldap_str2attributetype.3 \
ldap_schema.3 ldap_str2matchingrule.3 \
ldap_schema.3 ldap_str2objectclass.3 \
ldap_schema.3 ldap_str2syntax.3 \
ldap_schema.3 ldap_syntax2name.3 \
ldap_schema.3 ldap_syntax2str.3 \
ldap_schema.3 ldap_syntax_free.3 \
ldap_search.3 ldap_search_ext.3 \
ldap_search.3 ldap_search_ext_s.3 \
ldap_search.3 ldap_search_s.3 \
ldap_search.3 ldap_search_st.3 \
ldap_sort.3 ldap_sort_entries.3 \
ldap_sort.3 ldap_sort_strcasecmp.3 \
ldap_sort.3 ldap_sort_values.3 \
ldap_url.3 ldap_free_urldesc.3 \
ldap_url.3 ldap_is_ldap_url.3 \
ldap_url.3 ldap_url_parse.3
MAN5+= ldap.conf.5 \
ldif.5 \
slapd-bdb.5 \
slapd-dnssrv.5 \
slapd-ldap.5 \
slapd-ldbm.5 \
slapd-meta.5 \
slapd-monitor.5 \
slapd-null.5 \
slapd-passwd.5 \
slapd-perl.5 \
slapd-shell.5 \
slapd-sql.5 \
slapd-tcl.5 \
slapd.access.5 \
slapd.conf.5 \
slapd.plugin.5 \
slapd.replog.5
MAN8+= slapadd.8 \
slapcat.8 \
slapd.8 \
slapindex.8 \
slappasswd.8 \
slurpd.8

View file

@ -0,0 +1,15 @@
--- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
@@ -4285,12 +4285,6 @@
IFS="$save_ifs"
fi
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
;;

View file

@ -0,0 +1,14 @@
#
# ITS#2562: add missing arg to hash_lanman
#
--- libraries/liblutil/passwd.c.orig Fri May 2 13:29:29 2003
+++ libraries/liblutil/passwd.c Sun Jun 22 03:08:18 2003
@@ -632,7 +632,7 @@
{
struct berval *hash;
- hash = hash_lanman( scheme, cred );
+ hash = hash_lanman( scheme, cred, text );
return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32);
}
#endif /* SLAPD_LMHASH */

View file

@ -0,0 +1,11 @@
--- servers/slapd/daemon.c.orig Sat May 24 21:12:20 2003
+++ servers/slapd/daemon.c Sun Jun 22 19:26:22 2003
@@ -858,7 +858,7 @@
#ifdef LDAP_PF_LOCAL
case AF_LOCAL: {
char *addr = ((struct sockaddr_un *)*sal)->sun_path;
-#if 0 /* don't muck with socket perms */
+#if 1
if ( chmod( addr, l.sl_perms ) < 0 && crit ) {
int err = sock_errno();
#ifdef NEW_LOGGING

View file

@ -2,44 +2,57 @@
# #
# $FreeBSD$ # $FreeBSD$
slapd_program=@@PREFIX@@/libexec/slapd slapd_program=%%PREFIX%%/libexec/slapd
# Uncomment one of the following: slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
#
# IPv4 Only
#slapd_args='-u ldap -g ldap -h ldap://0.0.0.0'
#
# IPv6 and IPv4
#slapd_ags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
#
# IPv6 Only
#slapd_args='-u ldap -g ldap -h ldap://[::]'
#
#
slapd_args="-u ldap -g ldap"
pidfile=/var/run/ldap/slapd.pid slapd_enable="NO"
case "$1" in slapd_args=
start)
if [ -x $slapd ]; then
echo -n ' slapd'
eval ${slapd_program} ${slapd_args}
fi # Add the following lines to /etc/rc.conf to enable slapd:
;; #
stop) #slapd_enable="YES"
if [ -f $pidfile ]; then #slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
kill `cat $pidfile` #
echo -n ' slapd' # See sldap(8) for details
rm $pidfile #
else # Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
echo ' slapd: not running' # if you want to run slapd as a non-privileged user (recommended)
fi #
# 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 "$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 esac

View file

@ -1,34 +1,50 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $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 # Suck in the configuration variables.
pidfile=/var/run/ldap/slurpd.pid 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 case "$slurpd_enable" in
start) [Yy][Ee][Ss])
if [ -x $slurpd ]; then case "$1" in
echo -n ' slurpd' start)
$slurpd & if [ -x ${slurpd_program} ]; then
echo $! > $pidfile echo -n ' slurpd'
fi ${slurpd_program} ${slurpd_args}
;; fi
stop) ;;
pids=`ps xa | awk '/slurpd/{ print $1 }'` stop)
for pid in $pids; do if ! killall `basename ${slurpd_program}`; then
kill $pid echo ' slurpd: not running'
echo -n " slurpd($pid)" fi
done ;;
;; *)
restart) echo "Usage: `basename $0` {start|stop}" >&2
$0 stop exit 64
$0 start ;;
;; esac
;;
*) *)
echo "Usage: `basename $0` {start|stop}" >&2 ;;
exit 64
;;
esac esac
exit 0 exit 0

View file

@ -1,10 +1,15 @@
OpenLDAP is a suite of Lightweight Directory Access Protocol(LDAP) OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
servers, clients, utilities and development tools. clients, utilities and development tools.
OpenLDAP is derived from the University of Michigan LDAP release 3.3 This release includes the following major components:
and is distributed under an open source license.
WWW: http://www.openldap.org/ * 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
Bjoern A. Zeeb WWW: http://www.OpenLDAP.org/
bzeeb+freebsdports@zabbadoz.net
Lachlan O'Dea, Oliver Eikemeier

View file

@ -1,52 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $FreeBSD$
# #
if [ X"$2" != X"POST-INSTALL" ]; then
PKG_PREFIX=${PKG_PREFIX:=/usr/local} exit 0;
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
fi fi
%%SERVER%%mkdir -p "%%LDAP_RUN_DIR%%"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"

View file

@ -1,8 +1,30 @@
The openldap21 port now creates a ldap user an a ldap group. ************************************************************
If you use slapadd as root to populate your ldap Database please The OpenLDAP package has been successfully installed.
remember to chown the database directories and containing files
to user ldap and group ldap.
chown -R ldap:ldap /var/db/openldap-data Edit
%%PREFIX%%/etc/openldap/ldap.conf
to change the system-wide client defaults.
%%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%%
************************************************************

View file

@ -1,97 +1,83 @@
@comment ----------------------------------------- bin/ldapadd
@comment BUILD_CLIENTS bin/ldapcompare
@comment ----------------------------------------- bin/ldapdelete
%%NO_CLIENTS%%bin/ldapadd bin/ldapmodify
%%NO_CLIENTS%%bin/ldapcompare bin/ldapmodrdn
%%NO_CLIENTS%%bin/ldapdelete bin/ldappasswd
%%NO_CLIENTS%%bin/ldapmodify bin/ldapsearch
%%NO_CLIENTS%%bin/ldapmodrdn bin/ldapwhoami
%%NO_CLIENTS%%bin/ldappasswd %%SERVER%%@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%bin/ldapsearch %%SERVER%%@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%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
%%NO_CLIENTS%%@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
%%NO_CLIENTS%%etc/openldap/ldap.conf.default @exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
%%NO_CLIENTS%%@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf %%SERVER%%etc/openldap/schema/README
@comment %%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
%%NO_CLIENTS%%include/lber.h %%SERVER%%etc/openldap/schema/corba.schema.default
%%NO_CLIENTS%%include/lber_types.h %%SERVER%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
%%NO_CLIENTS%%include/ldap.h %%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
%%NO_CLIENTS%%include/ldap_cdefs.h %%SERVER%%etc/openldap/schema/core.schema.default
%%NO_CLIENTS%%include/ldap_features.h %%SERVER%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
%%NO_CLIENTS%%include/ldap_schema.h %%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
%%NO_CLIENTS%%include/ldap_utf8.h %%SERVER%%etc/openldap/schema/cosine.schema.default
@comment %%SERVER%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
%%NO_CLIENTS%%lib/liblber.a %%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
%%NO_CLIENTS%%lib/liblber.so %%SERVER%%etc/openldap/schema/inetorgperson.schema.default
%%NO_CLIENTS%%lib/liblber.so.2 %%SERVER%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
%%NO_CLIENTS%%lib/libldap.a %%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
%%NO_CLIENTS%%lib/libldap.so %%SERVER%%etc/openldap/schema/java.schema.default
%%NO_CLIENTS%%lib/libldap.so.2 %%SERVER%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
%%NO_CLIENTS%%lib/libldap_r.a %%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
%%NO_CLIENTS%%lib/libldap_r.so %%SERVER%%etc/openldap/schema/misc.schema.default
%%NO_CLIENTS%%lib/libldap_r.so.2 %%SERVER%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
@comment using USE_LIBTOOL make openldap to no longer to compile, so intall these 3 :( %%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
%%NO_CLIENTS%%lib/liblber.la %%SERVER%%etc/openldap/schema/nis.schema.default
%%NO_CLIENTS%%lib/libldap.la %%SERVER%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_CLIENTS%%lib/libldap_r.la %%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
@comment %%SERVER%%etc/openldap/schema/openldap.schema.default
%%NO_CLIENTS%%share/openldap/ucdata/case.dat %%SERVER%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_CLIENTS%%share/openldap/ucdata/cmbcl.dat %%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
%%NO_CLIENTS%%share/openldap/ucdata/comp.dat %%SERVER%%etc/openldap/slapd.conf.default
%%NO_CLIENTS%%share/openldap/ucdata/ctype.dat %%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
%%NO_CLIENTS%%share/openldap/ucdata/decomp.dat %%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/num.dat @unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/kdecomp.dat %%SERVER%%etc/rc.d/slapd.sh
%%NO_CLIENTS%%@dirrm share/openldap/ucdata %%SERVER%%etc/rc.d/slurpd.sh
%%NO_CLIENTS%%@dirrm share/openldap include/lber.h
@comment ----------------------------------------- include/lber_types.h
@comment BUILD_SLURPD include/ldap.h
@comment ----------------------------------------- include/ldap_cdefs.h
%%NO_SLUPRD%%etc/rc.d/slurpd.sh.sample include/ldap_features.h
%%NO_SLUPRD%%libexec/slurpd include/ldap_schema.h
%%NO_SLUPRD%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp include/ldap_utf8.h
%%NO_SLUPRD%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true include/slapi-plugin.h
@comment lib/liblber.a
@comment ----------------------------------------- lib/liblber.so
@comment BUILD_SLAPD lib/liblber.so.2
@comment ----------------------------------------- lib/libldap.a
%%NO_SLAPD%%etc/rc.d/slapd.sh.sample lib/libldap.so
%%NO_SLAPD%%libexec/slapd lib/libldap.so.2
%%NO_SLAPD%%sbin/slapadd lib/libldap_r.a
%%NO_SLAPD%%sbin/slapcat lib/libldap_r.so
%%NO_SLAPD%%sbin/slapindex lib/libldap_r.so.2
%%NO_SLAPD%%sbin/slappasswd %%SLAPI%%lib/libslapi.a
%%NO_SLAPD%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi %%SLAPI%%lib/libslapi.so
%%NO_SLAPD%%etc/openldap/slapd.conf.default %%SLAPI%%lib/libslapi.so.2
%%NO_SLAPD%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf %%SERVER%%libexec/slapd
%%NO_SLAPD%%@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%%libexec/slurpd
%%NO_SLAPD%%etc/openldap/schema/README %%SERVER%%sbin/slapadd
%%NO_SLAPD%%etc/openldap/schema/corba.schema.default %%SERVER%%sbin/slapcat
%%NO_SLAPD%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema %%SERVER%%sbin/slapindex
%%NO_SLAPD%%@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%%sbin/slappasswd
%%NO_SLAPD%%etc/openldap/schema/core.schema.default share/openldap/ucdata/case.dat
%%NO_SLAPD%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema share/openldap/ucdata/cmbcl.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/comp.dat
%%NO_SLAPD%%etc/openldap/schema/cosine.schema.default share/openldap/ucdata/ctype.dat
%%NO_SLAPD%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema share/openldap/ucdata/decomp.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/kdecomp.dat
%%NO_SLAPD%%etc/openldap/schema/inetorgperson.schema.default share/openldap/ucdata/num.dat
%%NO_SLAPD%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema @dirrm share/openldap/ucdata
%%NO_SLAPD%%@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 @dirrm share/openldap
%%NO_SLAPD%%etc/openldap/schema/java.schema.default %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
%%NO_SLAPD%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@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%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
%%NO_SLAPD%%etc/openldap/schema/misc.schema.default
%%NO_SLAPD%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/nis.schema.default
%%NO_SLAPD%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/openldap.schema.default
%%NO_SLAPD%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/db/openldap-data ] || /bin/mkdir /var/db/openldap-data
%%NO_SLAPD%%@unexec /bin/rmdir /var/db/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/run/ldap ] || /bin/mkdir /var/run/ldap
%%NO_SLAPD%%@unexec /bin/rmdir /var/run/ldap 2>/dev/null || true

View file

@ -1,26 +1,12 @@
# New ports collection makefile for: OpenLDAP 2.1 # New ports collection makefile for: OpenLDAP 2.2
# Date created: 5 Dec 2002 # Date created: 20 Sep 1998
# Whom: Christian Kratzer <ck@cksoft.de> # Whom: Lachlan O'Dea
#
# 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)
# SLAPD_ONLY builds openldap21-slapd-PORTVERSION (slapd and slapd tools)
# SLURPD_ONLY builds openldap21-slurpd-PORTVERSION (slurpd only)
# SERVERS_ONLY builds openldap21-servers-PORTVERSION (slapd and slurpd)
# WITHOUT_SASL do not build against sasl2
#
# OPENLDAP_STABLE an attempt to track the openldap stable branch
# It remains to be seen if this stays practical.
# #
# $FreeBSD$ # $FreeBSD$
# #
PORTNAME= openldap21 PORTNAME= openldap
PORTVERSION= 2.1.20 PORTVERSION= ${OPENLDAP_VERSION}.a
PORTREVISION= 1
CATEGORIES= net databases CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \ http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@ -34,427 +20,177 @@ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \ ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \ ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \
ftp://sunsite.cnlab-switch.ch/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%/ ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
.if defined(OPENLDAP_STABLE) MASTER_SITE_SUBDIR= openldap-test
MASTER_SITE_SUBDIR= openldap-stable DISTNAME= openldap-${OPENLDAP_VERSION}alpha
DISTNAME= openldap-stable-20030410
PKGNAMESUFFIX= -stable
WRKSRC= ${WRKDIR}/openldap-${PORTVERSION}
.else
MASTER_SITE_SUBDIR= openldap-release
DISTNAME= openldap-${PORTVERSION}
.endif
EXTRACT_SUFX= .tgz EXTRACT_SUFX= .tgz
MAINTAINER= ck@cksoft.de MAINTAINER= eikemeier@fillmore-labs.com
COMMENT= Open source LDAP client and server software COMMENT= Open source LDAP client and server implementation
LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 OPENLDAP_VERSION= 2.2.0
CXXFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ CONFLICTS= openldap*
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ LATEST_LINK= openldap2
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
LDFLAGS+= -L${LOCALBASE}/lib USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
USE_OPENSSL= yes PKGINSTALL= ${WRKDIR}/pkg-install
HAS_CONFIGURE= yes PKGMESSAGE= ${WRKDIR}/pkg-message
CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}" \ LOCALSTATEDIR?= /var/db
CPPFLAGS="${CPPFLAGS}" \ LDAP_RUN_DIR?= /var/run/openldap
LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS+=--prefix=${PREFIX} \ WITH_BDB_VER?= 41
--enable-bdb \
--enable-crypt
.if defined(WITHOUT_SASL) CONFIGURE_ARGS= --with-threads \
CONFIGURE_ARGS+= \ --with-tls=openssl
--without-cyrus-sasl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
.if defined(CLIENT_ONLY)
PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else .else
LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
CONFIGURE_ARGS+= \ --enable-lmpasswd \
--with-cyrus-sasl \ --enable-ldbm \
--enable-spasswd --with-ldbm-api=berkeley \
--enable-ldap \
--enable-meta \
--enable-rewrite \
--enable-null \
--enable-monitor
.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 .endif
# ------------------------------------------------------------------------------ .if defined(WITH_PERL)
# common configure .error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
# USE_PERL5= yes
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= --enable-perl
--with-tls \ .endif
--localstatedir=/var/db
.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
.endif
.if defined(WITH_ODBC)
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
CONFIGURE_ARGS+= --enable-sql
.endif
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
.endif
# Include tcp-wrapper support # Include tcp-wrapper support
.if exists(/usr/include/tcpd.h) .if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+= --enable-wrappers CONFIGURE_ARGS+= --enable-wrappers
.endif .endif
PLIST_SUB+= SERVER=""
SED_SCRIPT+= -e '/^%%SERVER%%/s,,,'
.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
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
INSTALLS_SHLIB= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014 .include "${FILESDIR}/manpages"
CONFIGURE_ARGS+= --enable-ipv6
.endif
.if defined(CLIENT_ONLY) pre-everything::
# ------------------------------------------------------------------------------ @${ECHO} "============================================================="
# libraries and client applications only @${ECHO}
# @${ECHO} "You can build ${PKGNAME} with the following options:"
BUILD_CLIENTS= yes @${ECHO}
INSTALLS_SHLIB= yes @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 4.1)"
PKGNAMESUFFIX= -client @${ECHO} "WITH_SASL with SASL2 authorization"
COMMENT= Open source LDAP client software @${ECHO} "WITH_PERL with Perl backend"
CONFIGURE_ARGS+= \ @${ECHO} "WITH_SHELL with Shell backend"
--disable-slapd \ @${ECHO} "WITH_ODBC with SQL backend"
--disable-slurpd \ @${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API
--enable-shared \ @${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support"
--enable-static @${ECHO}
@${ECHO} "============================================================="
.elif defined(SLAPD_ONLY) @${ECHO}
# ------------------------------------------------------------------------------
# slapd only
#
BUILD_SLAPD= yes
PKGNAMESUFFIX= -slapd
COMMENT= Open source LDAP server software (slapd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--disable-slurpd \
--disable-shared \
--disable-static \
--without-threads \
--enable-ldbm \
--enable-ldap \
--enable-shell
.elif defined(SLURPD_ONLY)
# ------------------------------------------------------------------------------
# slurpd only
# NOTE: to build slurpd only package we have to build slapd
# and some backend we just don't install them later on
#
BUILD_SLURPD= yes
PKGNAMESUFFIX= -slurpd
COMMENT= Open source LDAP server software (slurpd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
RUN_DEPENDS+= ${LOCALBASE}/libexec/slapd:${PORTSDIR}/net/openldap-slapd2.1
CONFIGURE_ARGS+= \
--enable-slurpd \
--enable-slapd \
--disable-shared \
--disable-static \
--enable-ldbm \
--disable-ldap \
--disable-shell \
--with-threads
.elif defined(SERVERS_ONLY)
# ------------------------------------------------------------------------------
# slapd and slurpd
#
BUILD_SLAPD= yes
BUILD_SLURPD= yes
PKGNAMESUFFIX= -server
COMMENT= Open source LDAP server software (slapd and slurpd)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--enable-slurpd \
--disable-shared \
--disable-static \
--with-threads \
--enable-ldbm \
--disable-ldap \
--disable-shell
.else
# ------------------------------------------------------------------------------
#
# full package
#
INSTALLS_SHLIB= yes
BUILD_CLIENTS= yes
BUILD_SLAPD= yes
BUILD_SLURPD= yes
CONFIGURE_ARGS+= \
--with-threads \
--enable-slapd \
--enable-slurpd \
--enable-ldbm \
--enable-ldap \
--enable-shell \
--enable-shared \
--enable-static
.endif
# ------------------------------------------------------------------------------
# PLIST subs and MAN?/MLINKS
#
.if defined(BUILD_CLIENTS)
PLIST_SUB+= NO_CLIENTS=
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
.else
PLIST_SUB+= NO_CLIENTS="@comment "
.endif
.if defined(BUILD_SLAPD)
PLIST_SUB+= NO_SLAPD=
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
.else
PLIST_SUB+= NO_SLAPD="@comment "
.endif
.if defined(BUILD_SLURPD)
PLIST_SUB+= NO_SLUPRD=""
MAN8+= slurpd.8
.else
PLIST_SUB+= NO_SLUPRD="@comment "
.endif
post-patch: post-patch:
@${CP} ${WRKSRC}/servers/slapd/slapd.conf \ @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${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 > \
${WRKSRC}/servers/slapd/slapd.conf ${WRKSRC}/servers/slapd/slapd.conf
post-build: post-build:
.if defined(BUILD_SLAPD) .for script in slapd.sh slurpd.sh
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
.endif .endfor
.if defined(BUILD_SLURPD) .for text in pkg-install pkg-message
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh @${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endif
do-install:
.if defined(BUILD_CLIENTS) && defined (BUILD_SLAPD) && defined (BUILD_SLURPD)
@cd ${WRKSRC} && ${MAKE} install
@${STRIP_CMD} ${PREFIX}/libexec/slapd
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.else
.if defined(BUILD_CLIENTS)
@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 .endfor
.endif
.if defined(BUILD_SLAPD)
@cd ${WRKSRC}/servers/slapd && ${MAKE} install
@cd ${WRKSRC}/doc/man/man5 && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapadd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapcat.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapindex.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slappasswd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${MKDIR} /var/db
@${STRIP_CMD} ${PREFIX}/libexec/slapd
.endif
.if defined(BUILD_SLURPD)
@cd ${WRKSRC}/servers/slurpd && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slurpd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${INSTALL_TARGET} -c -o root -g wheel -m 700 -d /var/db/openldap-slurp
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.endif
.endif
post-install: post-install:
.if defined(BUILD_SLAPD) .if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@${MKDIR} ${LDAP_RUN_DIR}
.endif .endif
.if defined(BUILD_SLURPD) .if !defined(NOPORTDOCS)
@${INSTALL_SCRIPT} ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d/slurpd.sh.sample @${MKDIR} ${DOCSDIR}
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
| ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
>>${TMPPLIST}; \
${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
done
@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif .endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,2 +1 @@
MD5 (openldap-stable-20030410.tgz) = 53fb6c157a7c54b988cf7555e56f11e6 MD5 (openldap-2.2.0alpha.tgz) = 72fe342067b717a37b9697898dacfa0a
MD5 (openldap-2.1.20.tgz) = fe6d5f8571672e3107b42299a03e92ce

View file

@ -0,0 +1,188 @@
MAN1+= ldapcompare.1 \
ldapdelete.1 \
ldapmodify.1 \
ldapmodrdn.1 \
ldappasswd.1 \
ldapsearch.1 \
ldapwhoami.1
MLINKS+= \
ldapmodify.1 ldapadd.1
MAN3+= lber-decode.3 \
lber-encode.3 \
lber-memory.3 \
lber-types.3 \
ldap.3 \
ldap_abandon.3 \
ldap_add.3 \
ldap_bind.3 \
ldap_compare.3 \
ldap_delete.3 \
ldap_error.3 \
ldap_first_attribute.3 \
ldap_first_entry.3 \
ldap_first_message.3 \
ldap_first_reference.3 \
ldap_get_dn.3 \
ldap_get_values.3 \
ldap_modify.3 \
ldap_modrdn.3 \
ldap_open.3 \
ldap_parse_reference.3 \
ldap_parse_result.3 \
ldap_result.3 \
ldap_schema.3 \
ldap_search.3 \
ldap_sort.3 \
ldap_url.3
MLINKS+= \
lber-decode.3 ber_first_element.3 \
lber-decode.3 ber_get_bitstring.3 \
lber-decode.3 ber_get_boolean.3 \
lber-decode.3 ber_get_enum.3 \
lber-decode.3 ber_get_int.3 \
lber-decode.3 ber_get_next.3 \
lber-decode.3 ber_get_null.3 \
lber-decode.3 ber_get_stringa.3 \
lber-decode.3 ber_get_stringb.3 \
lber-decode.3 ber_next_element.3 \
lber-decode.3 ber_peek_tag.3 \
lber-decode.3 ber_scanf.3 \
lber-decode.3 ber_skip_tag.3 \
lber-encode.3 ber_alloc_t.3 \
lber-encode.3 ber_flush.3 \
lber-encode.3 ber_printf.3 \
lber-encode.3 ber_put_enum.3 \
lber-encode.3 ber_put_int.3 \
lber-encode.3 ber_put_null.3 \
lber-encode.3 ber_put_ostring.3 \
lber-encode.3 ber_put_seq.3 \
lber-encode.3 ber_put_set.3 \
lber-encode.3 ber_put_string.3 \
lber-encode.3 ber_start_set.3 \
lber-types.3 ber_bvarray_add.3 \
lber-types.3 ber_bvarray_free.3 \
lber-types.3 ber_bvdup.3 \
lber-types.3 ber_bvecadd.3 \
lber-types.3 ber_bvecfree.3 \
lber-types.3 ber_bvfree.3 \
lber-types.3 ber_bvstr.3 \
lber-types.3 ber_bvstrdup.3 \
lber-types.3 ber_dupbv.3 \
lber-types.3 ber_free.3 \
lber-types.3 ber_str2bv.3 \
ldap_abandon.3 ldap_abandon_ext.3 \
ldap_add.3 ldap_add_ext.3 \
ldap_add.3 ldap_add_ext_s.3 \
ldap_add.3 ldap_add_s.3 \
ldap_bind.3 ldap_bind_s.3 \
ldap_bind.3 ldap_kerberos_bind1.3 \
ldap_bind.3 ldap_kerberos_bind1_s.3 \
ldap_bind.3 ldap_kerberos_bind2.3 \
ldap_bind.3 ldap_kerberos_bind2_s.3 \
ldap_bind.3 ldap_kerberos_bind_s.3 \
ldap_bind.3 ldap_sasl_bind.3 \
ldap_bind.3 ldap_sasl_bind_s.3 \
ldap_bind.3 ldap_simple_bind.3 \
ldap_bind.3 ldap_simple_bind_s.3 \
ldap_bind.3 ldap_unbind.3 \
ldap_bind.3 ldap_unbind_ext.3 \
ldap_bind.3 ldap_unbind_ext_s.3 \
ldap_bind.3 ldap_unbind_s.3 \
ldap_compare.3 ldap_compare_ext.3 \
ldap_compare.3 ldap_compare_ext_s.3 \
ldap_compare.3 ldap_compare_s.3 \
ldap_delete.3 ldap_delete_ext.3 \
ldap_delete.3 ldap_delete_ext_s.3 \
ldap_delete.3 ldap_delete_s.3 \
ldap_error.3 ld_errno.3 \
ldap_error.3 ldap_err2string.3 \
ldap_error.3 ldap_errlist.3 \
ldap_error.3 ldap_perror.3 \
ldap_error.3 ldap_result2error.3 \
ldap_first_attribute.3 ldap_next_attribute.3 \
ldap_first_entry.3 ldap_count_entries.3 \
ldap_first_entry.3 ldap_next_entry.3 \
ldap_first_message.3 ldap_count_messages.3 \
ldap_first_message.3 ldap_next_message.3 \
ldap_first_reference.3 ldap_count_references.3 \
ldap_first_reference.3 ldap_next_reference.3 \
ldap_get_dn.3 ldap_dcedn2dn.3 \
ldap_get_dn.3 ldap_dn2ad_canonical.3 \
ldap_get_dn.3 ldap_dn2dcedn.3 \
ldap_get_dn.3 ldap_dn2str.3 \
ldap_get_dn.3 ldap_dn2ufn.3 \
ldap_get_dn.3 ldap_explode_dn.3 \
ldap_get_dn.3 ldap_explode_rdn.3 \
ldap_get_dn.3 ldap_str2dn.3 \
ldap_get_values.3 ldap_count_values.3 \
ldap_get_values.3 ldap_count_values_len.3 \
ldap_get_values.3 ldap_get_values_len.3 \
ldap_get_values.3 ldap_value_free.3 \
ldap_get_values.3 ldap_value_free_len.3 \
ldap_modify.3 ldap_modify_ext.3 \
ldap_modify.3 ldap_modify_ext_s.3 \
ldap_modify.3 ldap_modify_s.3 \
ldap_modify.3 ldap_mods_free.3 \
ldap_modrdn.3 ldap_modrdn2.3 \
ldap_modrdn.3 ldap_modrdn2_s.3 \
ldap_modrdn.3 ldap_modrdn_s.3 \
ldap_open.3 ldap_init.3 \
ldap_parse_result.3 ldap_parse_extended_result.3 \
ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
ldap_result.3 ldap_msgfree.3 \
ldap_result.3 ldap_msgid.3 \
ldap_result.3 ldap_msgtype.3 \
ldap_schema.3 ldap_attributetype2name.3 \
ldap_schema.3 ldap_attributetype2str.3 \
ldap_schema.3 ldap_attributetype_free.3 \
ldap_schema.3 ldap_matchingrule2name.3 \
ldap_schema.3 ldap_matchingrule2str.3 \
ldap_schema.3 ldap_matchingrule_free.3 \
ldap_schema.3 ldap_objectclass2name.3 \
ldap_schema.3 ldap_objectclass2str.3 \
ldap_schema.3 ldap_objectclass_free.3 \
ldap_schema.3 ldap_scherr2str.3 \
ldap_schema.3 ldap_str2attributetype.3 \
ldap_schema.3 ldap_str2matchingrule.3 \
ldap_schema.3 ldap_str2objectclass.3 \
ldap_schema.3 ldap_str2syntax.3 \
ldap_schema.3 ldap_syntax2name.3 \
ldap_schema.3 ldap_syntax2str.3 \
ldap_schema.3 ldap_syntax_free.3 \
ldap_search.3 ldap_search_ext.3 \
ldap_search.3 ldap_search_ext_s.3 \
ldap_search.3 ldap_search_s.3 \
ldap_search.3 ldap_search_st.3 \
ldap_sort.3 ldap_sort_entries.3 \
ldap_sort.3 ldap_sort_strcasecmp.3 \
ldap_sort.3 ldap_sort_values.3 \
ldap_url.3 ldap_free_urldesc.3 \
ldap_url.3 ldap_is_ldap_url.3 \
ldap_url.3 ldap_url_parse.3
MAN5+= ldap.conf.5 \
ldif.5 \
slapd-bdb.5 \
slapd-dnssrv.5 \
slapd-ldap.5 \
slapd-ldbm.5 \
slapd-meta.5 \
slapd-monitor.5 \
slapd-null.5 \
slapd-passwd.5 \
slapd-perl.5 \
slapd-shell.5 \
slapd-sql.5 \
slapd-tcl.5 \
slapd.access.5 \
slapd.conf.5 \
slapd.plugin.5 \
slapd.replog.5
MAN8+= slapadd.8 \
slapcat.8 \
slapd.8 \
slapindex.8 \
slappasswd.8 \
slurpd.8

View file

@ -0,0 +1,15 @@
--- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
@@ -4285,12 +4285,6 @@
IFS="$save_ifs"
fi
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
;;

View file

@ -0,0 +1,14 @@
#
# ITS#2562: add missing arg to hash_lanman
#
--- libraries/liblutil/passwd.c.orig Fri May 2 13:29:29 2003
+++ libraries/liblutil/passwd.c Sun Jun 22 03:08:18 2003
@@ -632,7 +632,7 @@
{
struct berval *hash;
- hash = hash_lanman( scheme, cred );
+ hash = hash_lanman( scheme, cred, text );
return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32);
}
#endif /* SLAPD_LMHASH */

View file

@ -0,0 +1,11 @@
--- servers/slapd/daemon.c.orig Sat May 24 21:12:20 2003
+++ servers/slapd/daemon.c Sun Jun 22 19:26:22 2003
@@ -858,7 +858,7 @@
#ifdef LDAP_PF_LOCAL
case AF_LOCAL: {
char *addr = ((struct sockaddr_un *)*sal)->sun_path;
-#if 0 /* don't muck with socket perms */
+#if 1
if ( chmod( addr, l.sl_perms ) < 0 && crit ) {
int err = sock_errno();
#ifdef NEW_LOGGING

View file

@ -2,44 +2,57 @@
# #
# $FreeBSD$ # $FreeBSD$
slapd_program=@@PREFIX@@/libexec/slapd slapd_program=%%PREFIX%%/libexec/slapd
# Uncomment one of the following: slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
#
# IPv4 Only
#slapd_args='-u ldap -g ldap -h ldap://0.0.0.0'
#
# IPv6 and IPv4
#slapd_ags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
#
# IPv6 Only
#slapd_args='-u ldap -g ldap -h ldap://[::]'
#
#
slapd_args="-u ldap -g ldap"
pidfile=/var/run/ldap/slapd.pid slapd_enable="NO"
case "$1" in slapd_args=
start)
if [ -x $slapd ]; then
echo -n ' slapd'
eval ${slapd_program} ${slapd_args}
fi # Add the following lines to /etc/rc.conf to enable slapd:
;; #
stop) #slapd_enable="YES"
if [ -f $pidfile ]; then #slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
kill `cat $pidfile` #
echo -n ' slapd' # See sldap(8) for details
rm $pidfile #
else # Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
echo ' slapd: not running' # if you want to run slapd as a non-privileged user (recommended)
fi #
# 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 "$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 esac

View file

@ -1,34 +1,50 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $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 # Suck in the configuration variables.
pidfile=/var/run/ldap/slurpd.pid 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 case "$slurpd_enable" in
start) [Yy][Ee][Ss])
if [ -x $slurpd ]; then case "$1" in
echo -n ' slurpd' start)
$slurpd & if [ -x ${slurpd_program} ]; then
echo $! > $pidfile echo -n ' slurpd'
fi ${slurpd_program} ${slurpd_args}
;; fi
stop) ;;
pids=`ps xa | awk '/slurpd/{ print $1 }'` stop)
for pid in $pids; do if ! killall `basename ${slurpd_program}`; then
kill $pid echo ' slurpd: not running'
echo -n " slurpd($pid)" fi
done ;;
;; *)
restart) echo "Usage: `basename $0` {start|stop}" >&2
$0 stop exit 64
$0 start ;;
;; esac
;;
*) *)
echo "Usage: `basename $0` {start|stop}" >&2 ;;
exit 64
;;
esac esac
exit 0 exit 0

View file

@ -1,10 +1,15 @@
OpenLDAP is a suite of Lightweight Directory Access Protocol(LDAP) OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
servers, clients, utilities and development tools. clients, utilities and development tools.
OpenLDAP is derived from the University of Michigan LDAP release 3.3 This release includes the following major components:
and is distributed under an open source license.
WWW: http://www.openldap.org/ * 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
Bjoern A. Zeeb WWW: http://www.OpenLDAP.org/
bzeeb+freebsdports@zabbadoz.net
Lachlan O'Dea, Oliver Eikemeier

View file

@ -1,52 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $FreeBSD$
# #
if [ X"$2" != X"POST-INSTALL" ]; then
PKG_PREFIX=${PKG_PREFIX:=/usr/local} exit 0;
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
fi fi
%%SERVER%%mkdir -p "%%LDAP_RUN_DIR%%"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"

View file

@ -1,8 +1,30 @@
The openldap21 port now creates a ldap user an a ldap group. ************************************************************
If you use slapadd as root to populate your ldap Database please The OpenLDAP package has been successfully installed.
remember to chown the database directories and containing files
to user ldap and group ldap.
chown -R ldap:ldap /var/db/openldap-data Edit
%%PREFIX%%/etc/openldap/ldap.conf
to change the system-wide client defaults.
%%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%%
************************************************************

View file

@ -1,97 +1,83 @@
@comment ----------------------------------------- bin/ldapadd
@comment BUILD_CLIENTS bin/ldapcompare
@comment ----------------------------------------- bin/ldapdelete
%%NO_CLIENTS%%bin/ldapadd bin/ldapmodify
%%NO_CLIENTS%%bin/ldapcompare bin/ldapmodrdn
%%NO_CLIENTS%%bin/ldapdelete bin/ldappasswd
%%NO_CLIENTS%%bin/ldapmodify bin/ldapsearch
%%NO_CLIENTS%%bin/ldapmodrdn bin/ldapwhoami
%%NO_CLIENTS%%bin/ldappasswd %%SERVER%%@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%bin/ldapsearch %%SERVER%%@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%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
%%NO_CLIENTS%%@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
%%NO_CLIENTS%%etc/openldap/ldap.conf.default @exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
%%NO_CLIENTS%%@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf %%SERVER%%etc/openldap/schema/README
@comment %%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
%%NO_CLIENTS%%include/lber.h %%SERVER%%etc/openldap/schema/corba.schema.default
%%NO_CLIENTS%%include/lber_types.h %%SERVER%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
%%NO_CLIENTS%%include/ldap.h %%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
%%NO_CLIENTS%%include/ldap_cdefs.h %%SERVER%%etc/openldap/schema/core.schema.default
%%NO_CLIENTS%%include/ldap_features.h %%SERVER%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
%%NO_CLIENTS%%include/ldap_schema.h %%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
%%NO_CLIENTS%%include/ldap_utf8.h %%SERVER%%etc/openldap/schema/cosine.schema.default
@comment %%SERVER%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
%%NO_CLIENTS%%lib/liblber.a %%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
%%NO_CLIENTS%%lib/liblber.so %%SERVER%%etc/openldap/schema/inetorgperson.schema.default
%%NO_CLIENTS%%lib/liblber.so.2 %%SERVER%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
%%NO_CLIENTS%%lib/libldap.a %%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
%%NO_CLIENTS%%lib/libldap.so %%SERVER%%etc/openldap/schema/java.schema.default
%%NO_CLIENTS%%lib/libldap.so.2 %%SERVER%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
%%NO_CLIENTS%%lib/libldap_r.a %%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
%%NO_CLIENTS%%lib/libldap_r.so %%SERVER%%etc/openldap/schema/misc.schema.default
%%NO_CLIENTS%%lib/libldap_r.so.2 %%SERVER%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
@comment using USE_LIBTOOL make openldap to no longer to compile, so intall these 3 :( %%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
%%NO_CLIENTS%%lib/liblber.la %%SERVER%%etc/openldap/schema/nis.schema.default
%%NO_CLIENTS%%lib/libldap.la %%SERVER%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_CLIENTS%%lib/libldap_r.la %%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
@comment %%SERVER%%etc/openldap/schema/openldap.schema.default
%%NO_CLIENTS%%share/openldap/ucdata/case.dat %%SERVER%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_CLIENTS%%share/openldap/ucdata/cmbcl.dat %%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
%%NO_CLIENTS%%share/openldap/ucdata/comp.dat %%SERVER%%etc/openldap/slapd.conf.default
%%NO_CLIENTS%%share/openldap/ucdata/ctype.dat %%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
%%NO_CLIENTS%%share/openldap/ucdata/decomp.dat %%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/num.dat @unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/kdecomp.dat %%SERVER%%etc/rc.d/slapd.sh
%%NO_CLIENTS%%@dirrm share/openldap/ucdata %%SERVER%%etc/rc.d/slurpd.sh
%%NO_CLIENTS%%@dirrm share/openldap include/lber.h
@comment ----------------------------------------- include/lber_types.h
@comment BUILD_SLURPD include/ldap.h
@comment ----------------------------------------- include/ldap_cdefs.h
%%NO_SLUPRD%%etc/rc.d/slurpd.sh.sample include/ldap_features.h
%%NO_SLUPRD%%libexec/slurpd include/ldap_schema.h
%%NO_SLUPRD%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp include/ldap_utf8.h
%%NO_SLUPRD%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true include/slapi-plugin.h
@comment lib/liblber.a
@comment ----------------------------------------- lib/liblber.so
@comment BUILD_SLAPD lib/liblber.so.2
@comment ----------------------------------------- lib/libldap.a
%%NO_SLAPD%%etc/rc.d/slapd.sh.sample lib/libldap.so
%%NO_SLAPD%%libexec/slapd lib/libldap.so.2
%%NO_SLAPD%%sbin/slapadd lib/libldap_r.a
%%NO_SLAPD%%sbin/slapcat lib/libldap_r.so
%%NO_SLAPD%%sbin/slapindex lib/libldap_r.so.2
%%NO_SLAPD%%sbin/slappasswd %%SLAPI%%lib/libslapi.a
%%NO_SLAPD%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi %%SLAPI%%lib/libslapi.so
%%NO_SLAPD%%etc/openldap/slapd.conf.default %%SLAPI%%lib/libslapi.so.2
%%NO_SLAPD%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf %%SERVER%%libexec/slapd
%%NO_SLAPD%%@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%%libexec/slurpd
%%NO_SLAPD%%etc/openldap/schema/README %%SERVER%%sbin/slapadd
%%NO_SLAPD%%etc/openldap/schema/corba.schema.default %%SERVER%%sbin/slapcat
%%NO_SLAPD%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema %%SERVER%%sbin/slapindex
%%NO_SLAPD%%@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%%sbin/slappasswd
%%NO_SLAPD%%etc/openldap/schema/core.schema.default share/openldap/ucdata/case.dat
%%NO_SLAPD%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema share/openldap/ucdata/cmbcl.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/comp.dat
%%NO_SLAPD%%etc/openldap/schema/cosine.schema.default share/openldap/ucdata/ctype.dat
%%NO_SLAPD%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema share/openldap/ucdata/decomp.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/kdecomp.dat
%%NO_SLAPD%%etc/openldap/schema/inetorgperson.schema.default share/openldap/ucdata/num.dat
%%NO_SLAPD%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema @dirrm share/openldap/ucdata
%%NO_SLAPD%%@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 @dirrm share/openldap
%%NO_SLAPD%%etc/openldap/schema/java.schema.default %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
%%NO_SLAPD%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@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%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
%%NO_SLAPD%%etc/openldap/schema/misc.schema.default
%%NO_SLAPD%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/nis.schema.default
%%NO_SLAPD%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/openldap.schema.default
%%NO_SLAPD%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/db/openldap-data ] || /bin/mkdir /var/db/openldap-data
%%NO_SLAPD%%@unexec /bin/rmdir /var/db/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/run/ldap ] || /bin/mkdir /var/run/ldap
%%NO_SLAPD%%@unexec /bin/rmdir /var/run/ldap 2>/dev/null || true

View file

@ -1,26 +1,12 @@
# New ports collection makefile for: OpenLDAP 2.1 # New ports collection makefile for: OpenLDAP 2.2
# Date created: 5 Dec 2002 # Date created: 20 Sep 1998
# Whom: Christian Kratzer <ck@cksoft.de> # Whom: Lachlan O'Dea
#
# 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)
# SLAPD_ONLY builds openldap21-slapd-PORTVERSION (slapd and slapd tools)
# SLURPD_ONLY builds openldap21-slurpd-PORTVERSION (slurpd only)
# SERVERS_ONLY builds openldap21-servers-PORTVERSION (slapd and slurpd)
# WITHOUT_SASL do not build against sasl2
#
# OPENLDAP_STABLE an attempt to track the openldap stable branch
# It remains to be seen if this stays practical.
# #
# $FreeBSD$ # $FreeBSD$
# #
PORTNAME= openldap21 PORTNAME= openldap
PORTVERSION= 2.1.20 PORTVERSION= ${OPENLDAP_VERSION}.a
PORTREVISION= 1
CATEGORIES= net databases CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \ http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@ -34,427 +20,177 @@ MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \ ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \ ftp://ftp.si.uniovi.es/mirror/OpenLDAP/%SUBDIR%/ \
ftp://sunsite.cnlab-switch.ch/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%/ ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
.if defined(OPENLDAP_STABLE) MASTER_SITE_SUBDIR= openldap-test
MASTER_SITE_SUBDIR= openldap-stable DISTNAME= openldap-${OPENLDAP_VERSION}alpha
DISTNAME= openldap-stable-20030410
PKGNAMESUFFIX= -stable
WRKSRC= ${WRKDIR}/openldap-${PORTVERSION}
.else
MASTER_SITE_SUBDIR= openldap-release
DISTNAME= openldap-${PORTVERSION}
.endif
EXTRACT_SUFX= .tgz EXTRACT_SUFX= .tgz
MAINTAINER= ck@cksoft.de MAINTAINER= eikemeier@fillmore-labs.com
COMMENT= Open source LDAP client and server software COMMENT= Open source LDAP client and server implementation
LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 OPENLDAP_VERSION= 2.2.0
CXXFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ CONFLICTS= openldap*
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ LATEST_LINK= openldap2
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/db41
LDFLAGS+= -L${LOCALBASE}/lib USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
USE_OPENSSL= yes PKGINSTALL= ${WRKDIR}/pkg-install
HAS_CONFIGURE= yes PKGMESSAGE= ${WRKDIR}/pkg-message
CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}" \ LOCALSTATEDIR?= /var/db
CPPFLAGS="${CPPFLAGS}" \ LDAP_RUN_DIR?= /var/run/openldap
LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS+=--prefix=${PREFIX} \ WITH_BDB_VER?= 41
--enable-bdb \
--enable-crypt
.if defined(WITHOUT_SASL) CONFIGURE_ARGS= --with-threads \
CONFIGURE_ARGS+= \ --with-tls=openssl
--without-cyrus-sasl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
.if defined(CLIENT_ONLY)
PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else .else
LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
CONFIGURE_ARGS+= \ --enable-lmpasswd \
--with-cyrus-sasl \ --enable-ldbm \
--enable-spasswd --with-ldbm-api=berkeley \
--enable-ldap \
--enable-meta \
--enable-rewrite \
--enable-null \
--enable-monitor
.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 .endif
# ------------------------------------------------------------------------------ .if defined(WITH_PERL)
# common configure .error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
# USE_PERL5= yes
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= --enable-perl
--with-tls \ .endif
--localstatedir=/var/db
.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
.endif
.if defined(WITH_ODBC)
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
CONFIGURE_ARGS+= --enable-sql
.endif
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
.endif
# Include tcp-wrapper support # Include tcp-wrapper support
.if exists(/usr/include/tcpd.h) .if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+= --enable-wrappers CONFIGURE_ARGS+= --enable-wrappers
.endif .endif
PLIST_SUB+= SERVER=""
SED_SCRIPT+= -e '/^%%SERVER%%/s,,,'
.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
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
INSTALLS_SHLIB= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014 .include "${FILESDIR}/manpages"
CONFIGURE_ARGS+= --enable-ipv6
.endif
.if defined(CLIENT_ONLY) pre-everything::
# ------------------------------------------------------------------------------ @${ECHO} "============================================================="
# libraries and client applications only @${ECHO}
# @${ECHO} "You can build ${PKGNAME} with the following options:"
BUILD_CLIENTS= yes @${ECHO}
INSTALLS_SHLIB= yes @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 4.1)"
PKGNAMESUFFIX= -client @${ECHO} "WITH_SASL with SASL2 authorization"
COMMENT= Open source LDAP client software @${ECHO} "WITH_PERL with Perl backend"
CONFIGURE_ARGS+= \ @${ECHO} "WITH_SHELL with Shell backend"
--disable-slapd \ @${ECHO} "WITH_ODBC with SQL backend"
--disable-slurpd \ @${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API
--enable-shared \ @${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support"
--enable-static @${ECHO}
@${ECHO} "============================================================="
.elif defined(SLAPD_ONLY) @${ECHO}
# ------------------------------------------------------------------------------
# slapd only
#
BUILD_SLAPD= yes
PKGNAMESUFFIX= -slapd
COMMENT= Open source LDAP server software (slapd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--disable-slurpd \
--disable-shared \
--disable-static \
--without-threads \
--enable-ldbm \
--enable-ldap \
--enable-shell
.elif defined(SLURPD_ONLY)
# ------------------------------------------------------------------------------
# slurpd only
# NOTE: to build slurpd only package we have to build slapd
# and some backend we just don't install them later on
#
BUILD_SLURPD= yes
PKGNAMESUFFIX= -slurpd
COMMENT= Open source LDAP server software (slurpd only)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
RUN_DEPENDS+= ${LOCALBASE}/libexec/slapd:${PORTSDIR}/net/openldap-slapd2.1
CONFIGURE_ARGS+= \
--enable-slurpd \
--enable-slapd \
--disable-shared \
--disable-static \
--enable-ldbm \
--disable-ldap \
--disable-shell \
--with-threads
.elif defined(SERVERS_ONLY)
# ------------------------------------------------------------------------------
# slapd and slurpd
#
BUILD_SLAPD= yes
BUILD_SLURPD= yes
PKGNAMESUFFIX= -server
COMMENT= Open source LDAP server software (slapd and slurpd)
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap-client2.1
CONFIGURE_ARGS+= \
--enable-slapd \
--enable-slurpd \
--disable-shared \
--disable-static \
--with-threads \
--enable-ldbm \
--disable-ldap \
--disable-shell
.else
# ------------------------------------------------------------------------------
#
# full package
#
INSTALLS_SHLIB= yes
BUILD_CLIENTS= yes
BUILD_SLAPD= yes
BUILD_SLURPD= yes
CONFIGURE_ARGS+= \
--with-threads \
--enable-slapd \
--enable-slurpd \
--enable-ldbm \
--enable-ldap \
--enable-shell \
--enable-shared \
--enable-static
.endif
# ------------------------------------------------------------------------------
# PLIST subs and MAN?/MLINKS
#
.if defined(BUILD_CLIENTS)
PLIST_SUB+= NO_CLIENTS=
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
.else
PLIST_SUB+= NO_CLIENTS="@comment "
.endif
.if defined(BUILD_SLAPD)
PLIST_SUB+= NO_SLAPD=
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
.else
PLIST_SUB+= NO_SLAPD="@comment "
.endif
.if defined(BUILD_SLURPD)
PLIST_SUB+= NO_SLUPRD=""
MAN8+= slurpd.8
.else
PLIST_SUB+= NO_SLUPRD="@comment "
.endif
post-patch: post-patch:
@${CP} ${WRKSRC}/servers/slapd/slapd.conf \ @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${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 > \
${WRKSRC}/servers/slapd/slapd.conf ${WRKSRC}/servers/slapd/slapd.conf
post-build: post-build:
.if defined(BUILD_SLAPD) .for script in slapd.sh slurpd.sh
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
.endif .endfor
.if defined(BUILD_SLURPD) .for text in pkg-install pkg-message
@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh @${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endif
do-install:
.if defined(BUILD_CLIENTS) && defined (BUILD_SLAPD) && defined (BUILD_SLURPD)
@cd ${WRKSRC} && ${MAKE} install
@${STRIP_CMD} ${PREFIX}/libexec/slapd
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.else
.if defined(BUILD_CLIENTS)
@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 .endfor
.endif
.if defined(BUILD_SLAPD)
@cd ${WRKSRC}/servers/slapd && ${MAKE} install
@cd ${WRKSRC}/doc/man/man5 && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapadd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapcat.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapd.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slapindex.8 ${MANPREFIX}/man/man8
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slappasswd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${MKDIR} /var/db
@${STRIP_CMD} ${PREFIX}/libexec/slapd
.endif
.if defined(BUILD_SLURPD)
@cd ${WRKSRC}/servers/slurpd && ${MAKE} install
@${INSTALL_MAN} ${WRKSRC}/doc/man/man8/slurpd.8 ${MANPREFIX}/man/man8
@${MKDIR} ${PREFIX}/libexec
@${INSTALL_TARGET} -c -o root -g wheel -m 700 -d /var/db/openldap-slurp
@${STRIP_CMD} ${PREFIX}/libexec/slurpd
.endif
.endif
post-install: post-install:
.if defined(BUILD_SLAPD) .if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@${MKDIR} ${LDAP_RUN_DIR}
.endif .endif
.if defined(BUILD_SLURPD) .if !defined(NOPORTDOCS)
@${INSTALL_SCRIPT} ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d/slurpd.sh.sample @${MKDIR} ${DOCSDIR}
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
| ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
>>${TMPPLIST}; \
${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
done
@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif .endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,2 +1 @@
MD5 (openldap-stable-20030410.tgz) = 53fb6c157a7c54b988cf7555e56f11e6 MD5 (openldap-2.2.0alpha.tgz) = 72fe342067b717a37b9697898dacfa0a
MD5 (openldap-2.1.20.tgz) = fe6d5f8571672e3107b42299a03e92ce

View file

@ -0,0 +1,188 @@
MAN1+= ldapcompare.1 \
ldapdelete.1 \
ldapmodify.1 \
ldapmodrdn.1 \
ldappasswd.1 \
ldapsearch.1 \
ldapwhoami.1
MLINKS+= \
ldapmodify.1 ldapadd.1
MAN3+= lber-decode.3 \
lber-encode.3 \
lber-memory.3 \
lber-types.3 \
ldap.3 \
ldap_abandon.3 \
ldap_add.3 \
ldap_bind.3 \
ldap_compare.3 \
ldap_delete.3 \
ldap_error.3 \
ldap_first_attribute.3 \
ldap_first_entry.3 \
ldap_first_message.3 \
ldap_first_reference.3 \
ldap_get_dn.3 \
ldap_get_values.3 \
ldap_modify.3 \
ldap_modrdn.3 \
ldap_open.3 \
ldap_parse_reference.3 \
ldap_parse_result.3 \
ldap_result.3 \
ldap_schema.3 \
ldap_search.3 \
ldap_sort.3 \
ldap_url.3
MLINKS+= \
lber-decode.3 ber_first_element.3 \
lber-decode.3 ber_get_bitstring.3 \
lber-decode.3 ber_get_boolean.3 \
lber-decode.3 ber_get_enum.3 \
lber-decode.3 ber_get_int.3 \
lber-decode.3 ber_get_next.3 \
lber-decode.3 ber_get_null.3 \
lber-decode.3 ber_get_stringa.3 \
lber-decode.3 ber_get_stringb.3 \
lber-decode.3 ber_next_element.3 \
lber-decode.3 ber_peek_tag.3 \
lber-decode.3 ber_scanf.3 \
lber-decode.3 ber_skip_tag.3 \
lber-encode.3 ber_alloc_t.3 \
lber-encode.3 ber_flush.3 \
lber-encode.3 ber_printf.3 \
lber-encode.3 ber_put_enum.3 \
lber-encode.3 ber_put_int.3 \
lber-encode.3 ber_put_null.3 \
lber-encode.3 ber_put_ostring.3 \
lber-encode.3 ber_put_seq.3 \
lber-encode.3 ber_put_set.3 \
lber-encode.3 ber_put_string.3 \
lber-encode.3 ber_start_set.3 \
lber-types.3 ber_bvarray_add.3 \
lber-types.3 ber_bvarray_free.3 \
lber-types.3 ber_bvdup.3 \
lber-types.3 ber_bvecadd.3 \
lber-types.3 ber_bvecfree.3 \
lber-types.3 ber_bvfree.3 \
lber-types.3 ber_bvstr.3 \
lber-types.3 ber_bvstrdup.3 \
lber-types.3 ber_dupbv.3 \
lber-types.3 ber_free.3 \
lber-types.3 ber_str2bv.3 \
ldap_abandon.3 ldap_abandon_ext.3 \
ldap_add.3 ldap_add_ext.3 \
ldap_add.3 ldap_add_ext_s.3 \
ldap_add.3 ldap_add_s.3 \
ldap_bind.3 ldap_bind_s.3 \
ldap_bind.3 ldap_kerberos_bind1.3 \
ldap_bind.3 ldap_kerberos_bind1_s.3 \
ldap_bind.3 ldap_kerberos_bind2.3 \
ldap_bind.3 ldap_kerberos_bind2_s.3 \
ldap_bind.3 ldap_kerberos_bind_s.3 \
ldap_bind.3 ldap_sasl_bind.3 \
ldap_bind.3 ldap_sasl_bind_s.3 \
ldap_bind.3 ldap_simple_bind.3 \
ldap_bind.3 ldap_simple_bind_s.3 \
ldap_bind.3 ldap_unbind.3 \
ldap_bind.3 ldap_unbind_ext.3 \
ldap_bind.3 ldap_unbind_ext_s.3 \
ldap_bind.3 ldap_unbind_s.3 \
ldap_compare.3 ldap_compare_ext.3 \
ldap_compare.3 ldap_compare_ext_s.3 \
ldap_compare.3 ldap_compare_s.3 \
ldap_delete.3 ldap_delete_ext.3 \
ldap_delete.3 ldap_delete_ext_s.3 \
ldap_delete.3 ldap_delete_s.3 \
ldap_error.3 ld_errno.3 \
ldap_error.3 ldap_err2string.3 \
ldap_error.3 ldap_errlist.3 \
ldap_error.3 ldap_perror.3 \
ldap_error.3 ldap_result2error.3 \
ldap_first_attribute.3 ldap_next_attribute.3 \
ldap_first_entry.3 ldap_count_entries.3 \
ldap_first_entry.3 ldap_next_entry.3 \
ldap_first_message.3 ldap_count_messages.3 \
ldap_first_message.3 ldap_next_message.3 \
ldap_first_reference.3 ldap_count_references.3 \
ldap_first_reference.3 ldap_next_reference.3 \
ldap_get_dn.3 ldap_dcedn2dn.3 \
ldap_get_dn.3 ldap_dn2ad_canonical.3 \
ldap_get_dn.3 ldap_dn2dcedn.3 \
ldap_get_dn.3 ldap_dn2str.3 \
ldap_get_dn.3 ldap_dn2ufn.3 \
ldap_get_dn.3 ldap_explode_dn.3 \
ldap_get_dn.3 ldap_explode_rdn.3 \
ldap_get_dn.3 ldap_str2dn.3 \
ldap_get_values.3 ldap_count_values.3 \
ldap_get_values.3 ldap_count_values_len.3 \
ldap_get_values.3 ldap_get_values_len.3 \
ldap_get_values.3 ldap_value_free.3 \
ldap_get_values.3 ldap_value_free_len.3 \
ldap_modify.3 ldap_modify_ext.3 \
ldap_modify.3 ldap_modify_ext_s.3 \
ldap_modify.3 ldap_modify_s.3 \
ldap_modify.3 ldap_mods_free.3 \
ldap_modrdn.3 ldap_modrdn2.3 \
ldap_modrdn.3 ldap_modrdn2_s.3 \
ldap_modrdn.3 ldap_modrdn_s.3 \
ldap_open.3 ldap_init.3 \
ldap_parse_result.3 ldap_parse_extended_result.3 \
ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
ldap_result.3 ldap_msgfree.3 \
ldap_result.3 ldap_msgid.3 \
ldap_result.3 ldap_msgtype.3 \
ldap_schema.3 ldap_attributetype2name.3 \
ldap_schema.3 ldap_attributetype2str.3 \
ldap_schema.3 ldap_attributetype_free.3 \
ldap_schema.3 ldap_matchingrule2name.3 \
ldap_schema.3 ldap_matchingrule2str.3 \
ldap_schema.3 ldap_matchingrule_free.3 \
ldap_schema.3 ldap_objectclass2name.3 \
ldap_schema.3 ldap_objectclass2str.3 \
ldap_schema.3 ldap_objectclass_free.3 \
ldap_schema.3 ldap_scherr2str.3 \
ldap_schema.3 ldap_str2attributetype.3 \
ldap_schema.3 ldap_str2matchingrule.3 \
ldap_schema.3 ldap_str2objectclass.3 \
ldap_schema.3 ldap_str2syntax.3 \
ldap_schema.3 ldap_syntax2name.3 \
ldap_schema.3 ldap_syntax2str.3 \
ldap_schema.3 ldap_syntax_free.3 \
ldap_search.3 ldap_search_ext.3 \
ldap_search.3 ldap_search_ext_s.3 \
ldap_search.3 ldap_search_s.3 \
ldap_search.3 ldap_search_st.3 \
ldap_sort.3 ldap_sort_entries.3 \
ldap_sort.3 ldap_sort_strcasecmp.3 \
ldap_sort.3 ldap_sort_values.3 \
ldap_url.3 ldap_free_urldesc.3 \
ldap_url.3 ldap_is_ldap_url.3 \
ldap_url.3 ldap_url_parse.3
MAN5+= ldap.conf.5 \
ldif.5 \
slapd-bdb.5 \
slapd-dnssrv.5 \
slapd-ldap.5 \
slapd-ldbm.5 \
slapd-meta.5 \
slapd-monitor.5 \
slapd-null.5 \
slapd-passwd.5 \
slapd-perl.5 \
slapd-shell.5 \
slapd-sql.5 \
slapd-tcl.5 \
slapd.access.5 \
slapd.conf.5 \
slapd.plugin.5 \
slapd.replog.5
MAN8+= slapadd.8 \
slapcat.8 \
slapd.8 \
slapindex.8 \
slappasswd.8 \
slurpd.8

View file

@ -0,0 +1,15 @@
--- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
@@ -4285,12 +4285,6 @@
IFS="$save_ifs"
fi
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
;;

View file

@ -0,0 +1,14 @@
#
# ITS#2562: add missing arg to hash_lanman
#
--- libraries/liblutil/passwd.c.orig Fri May 2 13:29:29 2003
+++ libraries/liblutil/passwd.c Sun Jun 22 03:08:18 2003
@@ -632,7 +632,7 @@
{
struct berval *hash;
- hash = hash_lanman( scheme, cred );
+ hash = hash_lanman( scheme, cred, text );
return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32);
}
#endif /* SLAPD_LMHASH */

View file

@ -0,0 +1,11 @@
--- servers/slapd/daemon.c.orig Sat May 24 21:12:20 2003
+++ servers/slapd/daemon.c Sun Jun 22 19:26:22 2003
@@ -858,7 +858,7 @@
#ifdef LDAP_PF_LOCAL
case AF_LOCAL: {
char *addr = ((struct sockaddr_un *)*sal)->sun_path;
-#if 0 /* don't muck with socket perms */
+#if 1
if ( chmod( addr, l.sl_perms ) < 0 && crit ) {
int err = sock_errno();
#ifdef NEW_LOGGING

View file

@ -2,44 +2,57 @@
# #
# $FreeBSD$ # $FreeBSD$
slapd_program=@@PREFIX@@/libexec/slapd slapd_program=%%PREFIX%%/libexec/slapd
# Uncomment one of the following: slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
#
# IPv4 Only
#slapd_args='-u ldap -g ldap -h ldap://0.0.0.0'
#
# IPv6 and IPv4
#slapd_ags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
#
# IPv6 Only
#slapd_args='-u ldap -g ldap -h ldap://[::]'
#
#
slapd_args="-u ldap -g ldap"
pidfile=/var/run/ldap/slapd.pid slapd_enable="NO"
case "$1" in slapd_args=
start)
if [ -x $slapd ]; then
echo -n ' slapd'
eval ${slapd_program} ${slapd_args}
fi # Add the following lines to /etc/rc.conf to enable slapd:
;; #
stop) #slapd_enable="YES"
if [ -f $pidfile ]; then #slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
kill `cat $pidfile` #
echo -n ' slapd' # See sldap(8) for details
rm $pidfile #
else # Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
echo ' slapd: not running' # if you want to run slapd as a non-privileged user (recommended)
fi #
# 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 "$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 esac

View file

@ -1,34 +1,50 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $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 # Suck in the configuration variables.
pidfile=/var/run/ldap/slurpd.pid 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 case "$slurpd_enable" in
start) [Yy][Ee][Ss])
if [ -x $slurpd ]; then case "$1" in
echo -n ' slurpd' start)
$slurpd & if [ -x ${slurpd_program} ]; then
echo $! > $pidfile echo -n ' slurpd'
fi ${slurpd_program} ${slurpd_args}
;; fi
stop) ;;
pids=`ps xa | awk '/slurpd/{ print $1 }'` stop)
for pid in $pids; do if ! killall `basename ${slurpd_program}`; then
kill $pid echo ' slurpd: not running'
echo -n " slurpd($pid)" fi
done ;;
;; *)
restart) echo "Usage: `basename $0` {start|stop}" >&2
$0 stop exit 64
$0 start ;;
;; esac
;;
*) *)
echo "Usage: `basename $0` {start|stop}" >&2 ;;
exit 64
;;
esac esac
exit 0 exit 0

View file

@ -1,10 +1,15 @@
OpenLDAP is a suite of Lightweight Directory Access Protocol(LDAP) OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
servers, clients, utilities and development tools. clients, utilities and development tools.
OpenLDAP is derived from the University of Michigan LDAP release 3.3 This release includes the following major components:
and is distributed under an open source license.
WWW: http://www.openldap.org/ * 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
Bjoern A. Zeeb WWW: http://www.OpenLDAP.org/
bzeeb+freebsdports@zabbadoz.net
Lachlan O'Dea, Oliver Eikemeier

View file

@ -1,52 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $FreeBSD$ # $FreeBSD$
# #
if [ X"$2" != X"POST-INSTALL" ]; then
PKG_PREFIX=${PKG_PREFIX:=/usr/local} exit 0;
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
fi fi
%%SERVER%%mkdir -p "%%LDAP_RUN_DIR%%"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
%%SERVER%%mkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"

View file

@ -1,8 +1,30 @@
The openldap21 port now creates a ldap user an a ldap group. ************************************************************
If you use slapadd as root to populate your ldap Database please The OpenLDAP package has been successfully installed.
remember to chown the database directories and containing files
to user ldap and group ldap.
chown -R ldap:ldap /var/db/openldap-data Edit
%%PREFIX%%/etc/openldap/ldap.conf
to change the system-wide client defaults.
%%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%%
************************************************************

View file

@ -1,97 +1,83 @@
@comment ----------------------------------------- bin/ldapadd
@comment BUILD_CLIENTS bin/ldapcompare
@comment ----------------------------------------- bin/ldapdelete
%%NO_CLIENTS%%bin/ldapadd bin/ldapmodify
%%NO_CLIENTS%%bin/ldapcompare bin/ldapmodrdn
%%NO_CLIENTS%%bin/ldapdelete bin/ldappasswd
%%NO_CLIENTS%%bin/ldapmodify bin/ldapsearch
%%NO_CLIENTS%%bin/ldapmodrdn bin/ldapwhoami
%%NO_CLIENTS%%bin/ldappasswd %%SERVER%%@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%bin/ldapsearch %%SERVER%%@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
%%NO_CLIENTS%%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
%%NO_CLIENTS%%@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
%%NO_CLIENTS%%etc/openldap/ldap.conf.default @exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
%%NO_CLIENTS%%@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf %%SERVER%%etc/openldap/schema/README
@comment %%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
%%NO_CLIENTS%%include/lber.h %%SERVER%%etc/openldap/schema/corba.schema.default
%%NO_CLIENTS%%include/lber_types.h %%SERVER%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
%%NO_CLIENTS%%include/ldap.h %%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
%%NO_CLIENTS%%include/ldap_cdefs.h %%SERVER%%etc/openldap/schema/core.schema.default
%%NO_CLIENTS%%include/ldap_features.h %%SERVER%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
%%NO_CLIENTS%%include/ldap_schema.h %%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
%%NO_CLIENTS%%include/ldap_utf8.h %%SERVER%%etc/openldap/schema/cosine.schema.default
@comment %%SERVER%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
%%NO_CLIENTS%%lib/liblber.a %%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
%%NO_CLIENTS%%lib/liblber.so %%SERVER%%etc/openldap/schema/inetorgperson.schema.default
%%NO_CLIENTS%%lib/liblber.so.2 %%SERVER%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
%%NO_CLIENTS%%lib/libldap.a %%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
%%NO_CLIENTS%%lib/libldap.so %%SERVER%%etc/openldap/schema/java.schema.default
%%NO_CLIENTS%%lib/libldap.so.2 %%SERVER%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
%%NO_CLIENTS%%lib/libldap_r.a %%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
%%NO_CLIENTS%%lib/libldap_r.so %%SERVER%%etc/openldap/schema/misc.schema.default
%%NO_CLIENTS%%lib/libldap_r.so.2 %%SERVER%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
@comment using USE_LIBTOOL make openldap to no longer to compile, so intall these 3 :( %%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
%%NO_CLIENTS%%lib/liblber.la %%SERVER%%etc/openldap/schema/nis.schema.default
%%NO_CLIENTS%%lib/libldap.la %%SERVER%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_CLIENTS%%lib/libldap_r.la %%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
@comment %%SERVER%%etc/openldap/schema/openldap.schema.default
%%NO_CLIENTS%%share/openldap/ucdata/case.dat %%SERVER%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_CLIENTS%%share/openldap/ucdata/cmbcl.dat %%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
%%NO_CLIENTS%%share/openldap/ucdata/comp.dat %%SERVER%%etc/openldap/slapd.conf.default
%%NO_CLIENTS%%share/openldap/ucdata/ctype.dat %%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
%%NO_CLIENTS%%share/openldap/ucdata/decomp.dat %%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/num.dat @unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_CLIENTS%%share/openldap/ucdata/kdecomp.dat %%SERVER%%etc/rc.d/slapd.sh
%%NO_CLIENTS%%@dirrm share/openldap/ucdata %%SERVER%%etc/rc.d/slurpd.sh
%%NO_CLIENTS%%@dirrm share/openldap include/lber.h
@comment ----------------------------------------- include/lber_types.h
@comment BUILD_SLURPD include/ldap.h
@comment ----------------------------------------- include/ldap_cdefs.h
%%NO_SLUPRD%%etc/rc.d/slurpd.sh.sample include/ldap_features.h
%%NO_SLUPRD%%libexec/slurpd include/ldap_schema.h
%%NO_SLUPRD%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp include/ldap_utf8.h
%%NO_SLUPRD%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true include/slapi-plugin.h
@comment lib/liblber.a
@comment ----------------------------------------- lib/liblber.so
@comment BUILD_SLAPD lib/liblber.so.2
@comment ----------------------------------------- lib/libldap.a
%%NO_SLAPD%%etc/rc.d/slapd.sh.sample lib/libldap.so
%%NO_SLAPD%%libexec/slapd lib/libldap.so.2
%%NO_SLAPD%%sbin/slapadd lib/libldap_r.a
%%NO_SLAPD%%sbin/slapcat lib/libldap_r.so
%%NO_SLAPD%%sbin/slapindex lib/libldap_r.so.2
%%NO_SLAPD%%sbin/slappasswd %%SLAPI%%lib/libslapi.a
%%NO_SLAPD%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi %%SLAPI%%lib/libslapi.so
%%NO_SLAPD%%etc/openldap/slapd.conf.default %%SLAPI%%lib/libslapi.so.2
%%NO_SLAPD%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf %%SERVER%%libexec/slapd
%%NO_SLAPD%%@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%%libexec/slurpd
%%NO_SLAPD%%etc/openldap/schema/README %%SERVER%%sbin/slapadd
%%NO_SLAPD%%etc/openldap/schema/corba.schema.default %%SERVER%%sbin/slapcat
%%NO_SLAPD%%@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema %%SERVER%%sbin/slapindex
%%NO_SLAPD%%@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%%sbin/slappasswd
%%NO_SLAPD%%etc/openldap/schema/core.schema.default share/openldap/ucdata/case.dat
%%NO_SLAPD%%@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema share/openldap/ucdata/cmbcl.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/comp.dat
%%NO_SLAPD%%etc/openldap/schema/cosine.schema.default share/openldap/ucdata/ctype.dat
%%NO_SLAPD%%@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema share/openldap/ucdata/decomp.dat
%%NO_SLAPD%%@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 share/openldap/ucdata/kdecomp.dat
%%NO_SLAPD%%etc/openldap/schema/inetorgperson.schema.default share/openldap/ucdata/num.dat
%%NO_SLAPD%%@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema @dirrm share/openldap/ucdata
%%NO_SLAPD%%@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 @dirrm share/openldap
%%NO_SLAPD%%etc/openldap/schema/java.schema.default %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
%%NO_SLAPD%%@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema %%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@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%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
%%NO_SLAPD%%etc/openldap/schema/misc.schema.default
%%NO_SLAPD%%@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/nis.schema.default
%%NO_SLAPD%%@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
%%NO_SLAPD%%@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_SLAPD%%etc/openldap/schema/openldap.schema.default
%%NO_SLAPD%%@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
%%NO_SLAPD%%@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/db/openldap-data ] || /bin/mkdir /var/db/openldap-data
%%NO_SLAPD%%@unexec /bin/rmdir /var/db/openldap-data 2>/dev/null || true
%%NO_SLAPD%%@exec [ -d /var/run/ldap ] || /bin/mkdir /var/run/ldap
%%NO_SLAPD%%@unexec /bin/rmdir /var/run/ldap 2>/dev/null || true