ports/54436: [NEW PORTS] split net/openldap2[012] into -client and -server

Oliver Eikemeier eikemeier at fillmore-labs.com
Sun Jul 13 13:30:17 UTC 2003


>Number:         54436
>Category:       ports
>Synopsis:       [NEW PORTS] split net/openldap2[012] into -client and -server
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 13 06:30:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE

>Description:

This PR splits the net/openldap2[012] ports into a -client and -server
part, database/mysql* style. Benefits are reduced dependencies in ports
that use the client libraries. Additionally a patch for bsd.port.mk is
supplied that enables ports that rely on the OpenLDAP client libraries
to write USE_OPENLDAP=yes.

More and more ports contain switching logic between the various OpenLDAP
ports, with different parameters. Moreover, if one port depends on
OpenLDAP 2.0 and another on OpenLDAP 2.1, these ports are incompatible,
because OpenLDAP 2.0 and OpenLDAP 2.1 are mutually exclusive.

USE_OPENLDAP should remedy this situation.

If a port uses the OpenLDAP libraries, but does not work with a certain
OpenLDAP version, the following usage is suggested:

USE_OPENLDAP=	yes
.if defined(WANT_OPENLDAP_VER) && ${WANT_OPENLDAP_VER} == 12
BROKEN=		"this port requires OpenLDAP >= 2.0"
.endif

An USE_OPENLDAP_VER switch is provided, but its usage is discouraged, and
it is not documented.

Sorry for the mega-pr.

>How-To-Repeat:
>Fix:

- do a repository copy

net/openldap20 => net/openldap20-server
net/openldap21 => net/openldap21-server
net/openldap22 => net/openldap22-server

add the following ports:

net/openldap20-client
net/openldap20-server
net/openldap21-client
net/openldap21-server
net/openldap22-client
net/openldap22-server

patch Mk/bsd.port.mk

tell all port maintainers to use 'USE_OPENLDAP'.

The ports net/openldap2[012] can be deleted after the ports tree has migrated.

--- bsd.port.mk.patch begins here ---
--- Mk/bsd.port.mk.orig	Sat Jul 12 02:05:02 2003
+++ Mk/bsd.port.mk	Sun Jul 13 14:40:28 2003
@@ -342,6 +342,11 @@
 # USE_MOTIF		- Says that the port uses the Motif toolkit.  Implies USE_XPM.
 # USE_XPM		- Says that the port uses the xpm graphics libraries.
 ##
+# USE_OPENLDAP			- Says that the port uses the OpenLDAP libraries
+#				- Implies WANT_OPENLDAP_VER?=21.
+# WANT_OPENLDAP_VER		- legal values are: 12, 20, 21 and 22
+#				- If set to an unknown value, the port is marked BROKEN.
+##
 # USE_OPENSSL	- Says that the port relies on the OpenSSL package.
 #				  Default: not set.
 ##
@@ -1324,6 +1329,29 @@
 LIBTOOLIZE?=	${LIBTOOL_LIBEXECDIR}/libtoolize
 
 # END LIBTOOL
+######################################################################
+
+######################################################################
+# OpenLDAP
+
+.if defined(USE_OPENLDAP_VER)
+USE_OPENLDAP?=		yes
+WANT_OPENLDAP_VER=	${USE_OPENLDAP_VER}
+.endif
+
+.if defined(USE_OPENLDAP)
+WANT_OPENLDAP_VER?=	21
+.if ${WANT_OPENLDAP_VER} == 12
+LIB_DEPENDS+=		ldap.1:${PORTSDIR}/net/openldap12
+.elif ${WANT_OPENLDAP_VER} == 20 || ${WANT_OPENLDAP_VER} == 21 || \
+			${WANT_OPENLDAP_VER} == 22
+LIB_DEPENDS+=		ldap.2:${PORTSDIR}/net/openldap${WANT_OPENLDAP_VER}-client
+.else
+BROKEN=			"unknown OpenLDAP version: ${WANT_OPENLDAP_VER}"
+.endif
+.endif
+
+# END OpenLDAP
 ######################################################################
 
 .if defined(USE_GCC) && ${USE_GCC} == 2.95 && ( ${OSVERSION} < 400012 || ${OSVERSION} > 500034 )
--- bsd.port.mk.patch ends here ---

--- openldap20-client.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/openldap20-client
#	net/openldap20-client/Makefile
#	net/openldap20-client/files
#	net/openldap20-client/files/manpages
#	net/openldap20-client/pkg-descr
#	net/openldap20-client/pkg-install
#	net/openldap20-client/pkg-message
#	net/openldap20-client/pkg-plist
#
echo c - net/openldap20-client
mkdir -p net/openldap20-client > /dev/null 2>&1
echo x - net/openldap20-client/Makefile
sed 's/^X//' >net/openldap20-client/Makefile << 'END-of-net/openldap20-client/Makefile'
X# New ports collection makefile for:	openldap20-client
X# Date created:				10 Jul 2003
X# Whom:					Oliver Eikemeier <eikemeier at fillmore-labs.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		openldap
X
XCOMMENT=		Open source LDAP client implementation
X
XCLIENT_ONLY=		yes
X
XMASTERDIR=		${.CURDIR}/../openldap20-server
X
X.include "${MASTERDIR}/Makefile"
END-of-net/openldap20-client/Makefile
echo c - net/openldap20-client/files
mkdir -p net/openldap20-client/files > /dev/null 2>&1
echo x - net/openldap20-client/files/manpages
sed 's/^X//' >net/openldap20-client/files/manpages << 'END-of-net/openldap20-client/files/manpages'
X#
X# $FreeBSD$
X#
X
XMAN1+=	ldapdelete.1 \
X	ldapmodify.1 \
X	ldapmodrdn.1 \
X	ldappasswd.1 \
X	ldapsearch.1 \
X	ud.1
XMLINKS+= \
X	ldapmodify.1 ldapadd.1
X
XMAN3+=	lber-decode.3 \
X	lber-encode.3 \
X	lber-memory.3 \
X	lber-types.3 \
X	ldap.3 \
X	ldap_abandon.3 \
X	ldap_add.3 \
X	ldap_bind.3 \
X	ldap_cache.3 \
X	ldap_compare.3 \
X	ldap_delete.3 \
X	ldap_disptmpl.3 \
X	ldap_entry2text.3 \
X	ldap_error.3 \
X	ldap_first_attribute.3 \
X	ldap_first_entry.3 \
X	ldap_friendly.3 \
X	ldap_get_dn.3 \
X	ldap_get_values.3 \
X	ldap_getfilter.3 \
X	ldap_modify.3 \
X	ldap_modrdn.3 \
X	ldap_open.3 \
X	ldap_result.3 \
X	ldap_schema.3 \
X	ldap_search.3 \
X	ldap_searchprefs.3 \
X	ldap_sort.3 \
X	ldap_ufn.3 \
X	ldap_url.3
XMLINKS+= \
X	lber-decode.3 ber_first_element.3 \
X	lber-decode.3 ber_get_bitstring.3 \
X	lber-decode.3 ber_get_boolean.3 \
X	lber-decode.3 ber_get_enum.3 \
X	lber-decode.3 ber_get_int.3 \
X	lber-decode.3 ber_get_next.3 \
X	lber-decode.3 ber_get_null.3 \
X	lber-decode.3 ber_get_stringa.3 \
X	lber-decode.3 ber_get_stringb.3 \
X	lber-decode.3 ber_next_element.3 \
X	lber-decode.3 ber_peek_tag.3 \
X	lber-decode.3 ber_scanf.3 \
X	lber-decode.3 ber_skip_tag.3 \
X	lber-encode.3 ber_alloc_t.3 \
X	lber-encode.3 ber_flush.3 \
X	lber-encode.3 ber_printf.3 \
X	lber-encode.3 ber_put_enum.3 \
X	lber-encode.3 ber_put_int.3 \
X	lber-encode.3 ber_put_null.3 \
X	lber-encode.3 ber_put_ostring.3 \
X	lber-encode.3 ber_put_seq.3 \
X	lber-encode.3 ber_put_set.3 \
X	lber-encode.3 ber_put_string.3 \
X	lber-encode.3 ber_start_set.3 \
X	ldap_abandon.3 ldap_abandon_ext.3 \
X	ldap_add.3 ldap_add_ext.3 \
X	ldap_add.3 ldap_add_ext_s.3 \
X	ldap_add.3 ldap_add_s.3 \
X	ldap_bind.3 ldap_bind_s.3 \
X	ldap_bind.3 ldap_kerberos_bind1.3 \
X	ldap_bind.3 ldap_kerberos_bind1_s.3 \
X	ldap_bind.3 ldap_kerberos_bind2.3 \
X	ldap_bind.3 ldap_kerberos_bind2_s.3 \
X	ldap_bind.3 ldap_kerberos_bind_s.3 \
X	ldap_bind.3 ldap_sasl_bind.3 \
X	ldap_bind.3 ldap_sasl_bind_s.3 \
X	ldap_bind.3 ldap_simple_bind.3 \
X	ldap_bind.3 ldap_simple_bind_s.3 \
X	ldap_bind.3 ldap_unbind.3 \
X	ldap_bind.3 ldap_unbind_ext.3 \
X	ldap_bind.3 ldap_unbind_ext_s.3 \
X	ldap_bind.3 ldap_unbind_s.3 \
X	ldap_cache.3 ldap_destroy_cache.3 \
X	ldap_cache.3 ldap_disable_cache.3 \
X	ldap_cache.3 ldap_enable_cache.3 \
X	ldap_cache.3 ldap_flush_cache.3 \
X	ldap_cache.3 ldap_set_cache_options.3 \
X	ldap_cache.3 ldap_uncache_entry.3 \
X	ldap_cache.3 ldap_uncache_request.3 \
X	ldap_compare.3 ldap_compare_ext.3 \
X	ldap_compare.3 ldap_compare_ext_s.3 \
X	ldap_compare.3 ldap_compare_s.3 \
X	ldap_delete.3 ldap_delete_ext.3 \
X	ldap_delete.3 ldap_delete_ext_s.3 \
X	ldap_delete.3 ldap_delete_s.3 \
X	ldap_disptmpl.3 ldap_first_disptmpl.3 \
X	ldap_disptmpl.3 ldap_first_tmplcol.3 \
X	ldap_disptmpl.3 ldap_first_tmplrow.3 \
X	ldap_disptmpl.3 ldap_free_templates.3 \
X	ldap_disptmpl.3 ldap_init_templates.3 \
X	ldap_disptmpl.3 ldap_init_templates_buf.3 \
X	ldap_disptmpl.3 ldap_next_disptmpl.3 \
X	ldap_disptmpl.3 ldap_next_tmplcol.3 \
X	ldap_disptmpl.3 ldap_next_tmplrow.3 \
X	ldap_disptmpl.3 ldap_oc2template.3 \
X	ldap_disptmpl.3 ldap_tmplattrs.3 \
X	ldap_entry2text.3 ldap_entry2html.3 \
X	ldap_entry2text.3 ldap_entry2html_search.3 \
X	ldap_entry2text.3 ldap_entry2text_search.3 \
X	ldap_entry2text.3 ldap_vals2html.3 \
X	ldap_entry2text.3 ldap_vals2text.3 \
X	ldap_error.3 ld_errno.3 \
X	ldap_error.3 ldap_err2string.3 \
X	ldap_error.3 ldap_errlist.3 \
X	ldap_error.3 ldap_perror.3 \
X	ldap_error.3 ldap_result2error.3 \
X	ldap_first_attribute.3 ldap_next_attribute.3 \
X	ldap_first_entry.3 ldap_count_entries.3 \
X	ldap_first_entry.3 ldap_next_entry.3 \
X	ldap_friendly.3 ldap_free_friendlymap.3 \
X	ldap_friendly.3 ldap_friendly_name.3 \
X	ldap_get_dn.3 ldap_dn2ufn.3 \
X	ldap_get_dn.3 ldap_explode_dn.3 \
X	ldap_get_dn.3 ldap_explode_rdn.3 \
X	ldap_get_values.3 ldap_count_values.3 \
X	ldap_get_values.3 ldap_count_values_len.3 \
X	ldap_get_values.3 ldap_get_values_len.3 \
X	ldap_get_values.3 ldap_value_free.3 \
X	ldap_get_values.3 ldap_value_free_len.3 \
X	ldap_getfilter.3 ldap_build_filter.3 \
X	ldap_getfilter.3 ldap_getfilter_free.3 \
X	ldap_getfilter.3 ldap_getfirstfilter.3 \
X	ldap_getfilter.3 ldap_getnextfilter.3 \
X	ldap_getfilter.3 ldap_init_getfilter.3 \
X	ldap_getfilter.3 ldap_init_getfilter_buf.3 \
X	ldap_getfilter.3 ldap_setfilteraffixes.3 \
X	ldap_modify.3 ldap_modify_ext.3 \
X	ldap_modify.3 ldap_modify_ext_s.3 \
X	ldap_modify.3 ldap_modify_s.3 \
X	ldap_modify.3 ldap_mods_free.3 \
X	ldap_modrdn.3 ldap_modrdn2.3 \
X	ldap_modrdn.3 ldap_modrdn2_s.3 \
X	ldap_modrdn.3 ldap_modrdn_s.3 \
X	ldap_open.3 ldap_init.3 \
X	ldap_result.3 ldap_msgfree.3 \
X	ldap_result.3 ldap_msgid.3 \
X	ldap_result.3 ldap_msgtype.3 \
X	ldap_schema.3 ldap_attributetype2name.3 \
X	ldap_schema.3 ldap_attributetype2str.3 \
X	ldap_schema.3 ldap_attributetype_free.3 \
X	ldap_schema.3 ldap_matchingrule2name.3 \
X	ldap_schema.3 ldap_matchingrule2str.3 \
X	ldap_schema.3 ldap_matchingrule_free.3 \
X	ldap_schema.3 ldap_objectclass2name.3 \
X	ldap_schema.3 ldap_objectclass2str.3 \
X	ldap_schema.3 ldap_objectclass_free.3 \
X	ldap_schema.3 ldap_scherr2str.3 \
X	ldap_schema.3 ldap_str2attributetype.3 \
X	ldap_schema.3 ldap_str2matchingrule.3 \
X	ldap_schema.3 ldap_str2objectclass.3 \
X	ldap_schema.3 ldap_str2syntax.3 \
X	ldap_schema.3 ldap_syntax2name.3 \
X	ldap_schema.3 ldap_syntax2str.3 \
X	ldap_schema.3 ldap_syntax_free.3 \
X	ldap_search.3 ldap_search_ext.3 \
X	ldap_search.3 ldap_search_ext_s.3 \
X	ldap_search.3 ldap_search_s.3 \
X	ldap_search.3 ldap_search_st.3 \
X	ldap_searchprefs.3 ldap_first_searchobj.3 \
X	ldap_searchprefs.3 ldap_free_searchprefs.3 \
X	ldap_searchprefs.3 ldap_init_searchprefs.3 \
X	ldap_searchprefs.3 ldap_init_searchprefs_buf.3 \
X	ldap_searchprefs.3 ldap_next_searchobj.3 \
X	ldap_sort.3 ldap_sort_entries.3 \
X	ldap_sort.3 ldap_sort_strcasecmp.3 \
X	ldap_sort.3 ldap_sort_values.3 \
X	ldap_ufn.3 ldap_ufn_search_c.3 \
X	ldap_ufn.3 ldap_ufn_search_ct.3 \
X	ldap_ufn.3 ldap_ufn_search_s.3 \
X	ldap_ufn.3 ldap_ufn_setfilter.3 \
X	ldap_ufn.3 ldap_ufn_setprefix.3 \
X	ldap_ufn.3 ldap_ufn_timeout.3 \
X	ldap_url.3 ldap_free_urldesc.3 \
X	ldap_url.3 ldap_is_ldap_url.3 \
X	ldap_url.3 ldap_url_parse.3 \
X	ldap_url.3 ldap_url_search.3 \
X	ldap_url.3 ldap_url_search_s.3 \
X	ldap_url.3 ldap_url_search_st.3
X
XMAN5+=	ldap.conf.5 \
X	ldapfilter.conf.5 \
X	ldapfriendly.5 \
X	ldapsearchprefs.conf.5 \
X	ldaptemplates.conf.5 \
X	ldif.5 \
X	slapd.conf.5 \
X	slapd.replog.5 \
X	ud.conf.5
X
XMAN8+=	go500.8 \
X	go500gw.8 \
X	in.xfingerd.8 \
X	mail500.8 \
X	rcpt500.8 \
X	slapadd.8 \
X	slapcat.8 \
X	slapd.8 \
X	slapindex.8 \
X	slappasswd.8 \
X	slurpd.8
XMLINKS+= \
X	mail500.8 fax500.8
END-of-net/openldap20-client/files/manpages
echo x - net/openldap20-client/pkg-descr
sed 's/^X//' >net/openldap20-client/pkg-descr << 'END-of-net/openldap20-client/pkg-descr'
XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
Xclients, utilities and development tools.
X
XThis release includes the following major components:
X
X * -lldap - a LDAP client library
X * -llber - a lightweight BER/DER encoding/decoding library
X * LDAP tools - A collection of command line LDAP utilities
X * documentation - man pages for all components
X
XThis release is an old version, you should upgrade.
X
XWWW: http://www.OpenLDAP.org/
X
X- Oliver Eikemeier
Xeikemeier at fillmore-labs.com
END-of-net/openldap20-client/pkg-descr
echo x - net/openldap20-client/pkg-install
sed 's/^X//' >net/openldap20-client/pkg-install << 'END-of-net/openldap20-client/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
Xif [ X"$2" != X"POST-INSTALL" ]; then
X    exit 0;
Xfi
X
END-of-net/openldap20-client/pkg-install
echo x - net/openldap20-client/pkg-message
sed 's/^X//' >net/openldap20-client/pkg-message << 'END-of-net/openldap20-client/pkg-message'
X************************************************************
X
XThe OpenLDAP package has been successfully installed.
X
XEdit
X  %%PREFIX%%/etc/openldap/ldap.conf
Xto change the system-wide client defaults.
X
X************************************************************
END-of-net/openldap20-client/pkg-message
echo x - net/openldap20-client/pkg-plist
sed 's/^X//' >net/openldap20-client/pkg-plist << 'END-of-net/openldap20-client/pkg-plist'
X at comment $FreeBSD$
Xbin/ldapadd
Xbin/ldapdelete
Xbin/ldapmodify
Xbin/ldapmodrdn
Xbin/ldappasswd
Xbin/ldapsearch
Xbin/ud
X at unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi
Xetc/openldap/ldap.conf.default
X at exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
X at unexec if cmp -s %D/etc/openldap/ldapfilter.conf %D/etc/openldap/ldapfilter.conf.default; then rm -f %D/etc/openldap/ldapfilter.conf; fi
Xetc/openldap/ldapfilter.conf.default
X at exec [ -f %B/ldapfilter.conf ] || cp %B/%f %B/ldapfilter.conf
X at unexec if cmp -s %D/etc/openldap/ldapsearchprefs.conf %D/etc/openldap/ldapsearchprefs.conf.default; then rm -f %D/etc/openldap/ldapsearchprefs.conf; fi
Xetc/openldap/ldapsearchprefs.conf.default
X at exec [ -f %B/ldapsearchprefs.conf ] || cp %B/%f %B/ldapsearchprefs.conf
X at unexec if cmp -s %D/etc/openldap/ldaptemplates.conf %D/etc/openldap/ldaptemplates.conf.default; then rm -f %D/etc/openldap/ldaptemplates.conf; fi
Xetc/openldap/ldaptemplates.conf.default
X at exec [ -f %B/ldaptemplates.conf ] || cp %B/%f %B/ldaptemplates.conf
X at unexec rmdir %D/etc/openldap 2>/dev/null || true
Xinclude/disptmpl.h
Xinclude/lber.h
Xinclude/lber_types.h
Xinclude/ldap.h
Xinclude/ldap_cdefs.h
Xinclude/ldap_features.h
Xinclude/ldap_schema.h
Xinclude/srchpref.h
Xlib/liblber.a
Xlib/liblber.so
Xlib/liblber.so.2
Xlib/libldap.a
Xlib/libldap.so
Xlib/libldap.so.2
Xlib/libldap_r.a
Xlib/libldap_r.so
Xlib/libldap_r.so.2
Xlibexec/fax500
Xlibexec/go500
Xlibexec/go500gw
Xlibexec/in.xfingerd
Xlibexec/mail500
Xlibexec/maildap
Xlibexec/rcpt500
Xlibexec/rp500
Xlibexec/xrpcomp
Xshare/openldap/go500gw.help
Xshare/openldap/ldapfriendly
Xshare/openldap/rcpt500.help
X at dirrm share/openldap
END-of-net/openldap20-client/pkg-plist
exit
--- openldap20-client.shar ends here ---

--- openldap20-server.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/openldap20-server
#	net/openldap20-server/Makefile
#	net/openldap20-server/distinfo
#	net/openldap20-server/files
#	net/openldap20-server/files/extrapatch-Makefile.in
#	net/openldap20-server/files/patch-build::mod.mk
#	net/openldap20-server/files/patch-clients::ud::Makefile.in
#	net/openldap20-server/files/patch-servers::slapd::daemon.c
#	net/openldap20-server/files/slapd.sh
#	net/openldap20-server/files/slurpd.sh
#	net/openldap20-server/pkg-descr
#	net/openldap20-server/pkg-install
#	net/openldap20-server/pkg-message
#	net/openldap20-server/pkg-plist
#
echo c - net/openldap20-server
mkdir -p net/openldap20-server > /dev/null 2>&1
echo x - net/openldap20-server/Makefile
sed 's/^X//' >net/openldap20-server/Makefile << 'END-of-net/openldap20-server/Makefile'
X# New ports collection makefile for:	openldap20-server
X# Date created:				10 Jul 2003
X# Whom:					Oliver Eikemeier
X#
X# $FreeBSD$
X#
X
XPORTNAME=		openldap
XPORTVERSION=		${OPENLDAP_VERSION}
XPORTREVISION=		${OPENLDAP_PORTVERSION}
XCATEGORIES=		net databases
XMASTER_SITES=		ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
X			http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
X			ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \
X			ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \
X			ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
X			ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \
X			ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \
X			ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \
X			http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
XMASTER_SITE_SUBDIR=	openldap-test
XPKGNAMESUFFIX=		${OPENLDAP_PKGNAMESUFFIX}
XEXTRACT_SUFX=		.tgz
X
XMAINTAINER=		eikemeier at fillmore-labs.com
XCOMMENT?=		Open source LDAP server implementation
X
XOPENLDAP_VERSION=	2.0.27
X
XLATEST_LINK=		${PKGNAMEPREFIX}openldap20${PKGNAMESUFFIX}
XCONFLICTS=		${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-*
X
XWANT_OPENLDAP_VER?=	20
X.if ${WANT_OPENLDAP_VER} != 20
XBROKEN=			"incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
X.endif
X
X.if defined(CLIENT_ONLY)
XOPENLDAP_PORTVERSION=	0
XOPENLDAP_PKGNAMESUFFIX?=-client
X.else
XOPENLDAP_PORTVERSION=	0
XOPENLDAP_PKGNAMESUFFIX?=-server
X
XLIB_DEPENDS+=		ldap.2:${PORTSDIR}/net/openldap20-client
X.endif
X
XUSE_OPENSSL=		yes
XUSE_REINPLACE=		yes
XUSE_LIBTOOL_VER=	13
X
XDESCR=			${.CURDIR}/pkg-descr
XPLIST=			${WRKDIR}/pkg-plist
XPKGINSTALL=		${WRKDIR}/pkg-install
XPKGMESSAGE=		${WRKDIR}/pkg-message
X
XLOCALSTATEDIR?=		${DESTDIR}/var/db
XLDAP_RUN_DIR?=		${DESTDIR}/var/run/openldap
X
XPLIST_SUB+=		LOCALSTATEDIR=${LOCALSTATEDIR} \
X			LDAP_RUN_DIR=${LDAP_RUN_DIR}
X
XSED_SCRIPT=		-e 's,%%PREFIX%%,${PREFIX},g' \
X			-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
X			-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
X
XCONFIGURE_ARGS=		--with-threads \
X			--with-tls=openssl \
X			--enable-dynamic
X
X.if defined(WITH_SASL)
XLIB_DEPENDS+=		sasl.8:${PORTSDIR}/security/cyrus-sasl
XCPPFLAGS+=		-I${LOCALBASE}/include/sasl1
XCONFIGURE_ARGS+=	--with-cyrus-sasl
X.else
XCONFIGURE_ARGS+=	--without-cyrus-sasl
X.endif
X
X.if defined(CLIENT_ONLY)
X# client specific configuration
X
XCONFIGURE_ARGS+=	--disable-slapd
X
XINSTALLS_SHLIB=	yes
X
X.else
X# server specific configuration
X
XEXTRA_PATCHES+=		${FILESDIR}/extrapatch-Makefile.in
X
XCONFIGURE_ARGS+=	--localstatedir=${LOCALSTATEDIR} \
X			--enable-ldbm \
X			--with-ldbm-api=berkeley \
X			--enable-ldap
X
XWITH_BDB_VER?=		3
X
X.if ${WITH_BDB_VER} == 41
XBROKEN=			"OpenLDAP 2.0 doesn't support Berkeley DB 4.1"
X.elif ${WITH_BDB_VER} == 4
XLIB_DEPENDS+=		db4.0:${PORTSDIR}/databases/db4
X.elif ${WITH_BDB_VER} == 3
XLIB_DEPENDS+=		db3.3:${PORTSDIR}/databases/db3
X.else
X.error WITH_BDB_VER must be 3 or 4
X.endif
XLIBS+=			-ldb${WITH_BDB_VER}
XCPPFLAGS+=		-I${LOCALBASE}/include/db${WITH_BDB_VER}
X
X.if defined(WITH_SHELL)
XCONFIGURE_ARGS+=	--enable-shell
X.endif
X
X.if defined(WITH_SASL)
XCONFIGURE_ARGS+=	--enable-spasswd
X.endif
X
X.if defined(WITH_ODBC)
XLIB_DEPENDS+=		iodbc.3:${PORTSDIR}/databases/libiodbc
XCONFIGURE_ARGS+=	--enable-sql
X.endif
X
X# Include tcp-wrapper support
X.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
XCONFIGURE_ARGS+=	--enable-wrappers
X.endif
X
X# end of client/server specific configuration
X.endif
X
X# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
XCPPFLAGS+=		-D_REENTRANT ${PTHREAD_CFLAGS} \
X			-I${LOCALBASE}/include
XLDFLAGS+=		-L${LOCALBASE}/lib
X
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XCONFIGURE_ENV=		CPPFLAGS="${CPPFLAGS}" \
X			LDFLAGS="${LDFLAGS}" \
X			LIBS="${LIBS}"
X
X.include <bsd.port.pre.mk>
X
X.if defined(CLIENT_ONLY)
X.include "${.CURDIR}/files/manpages"
X.endif
X
Xpre-everything::
X	@${ECHO} "============================================================="
X	@${ECHO}
X	@${ECHO} "You can build ${PKGNAME} with the following options:"
X	@${ECHO}
X.if defined(CLIENT_ONLY)
X	@${ECHO} "WITH_SASL             with (Cyrus) SASL1 support"
X.else
X	@${ECHO} "WITH_BDB_VER          select BerkeleyDB version (default 3)"
X	@${ECHO} "WITH_SASL             with (Cyrus) SASL1 password verification"
X	@${ECHO} "WITH_SHELL            with Shell backend"
X	@${ECHO} "WITH_ODBC             with SQL backend"
X	@${ECHO} "WITHOUT_TCP_WRAPPERS  without tcp wrapper support"
X.endif
X	@${ECHO}
X	@${ECHO} "============================================================="
X	@${ECHO}
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
X		${WRKSRC}/servers/slapd/slapd.conf
X
Xpre-configure:
X	@${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \
X		${WRKSRC}/configure
X
Xpost-build:
X.for script in slapd.sh slurpd.sh
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
X.endfor
X.for text in pkg-install pkg-message
X	@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
X.endfor
X
X.if !defined(CLIENT_ONLY)
Xtest: build
X	@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
X		${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test
X.endif
X
Xpre-install:
X	@${CP} ${.CURDIR}/pkg-plist ${PLIST}
X.if defined(CLIENT_ONLY)
X.if !defined(NOPORTDOCS)
X	@for dir in rfc drafts; do \
X		${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
X			| ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
X			>>${PLIST}; \
X		${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
X	done
X	@${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
X.endif
X.endif
X
Xpost-install:
X.if defined(CLIENT_ONLY)
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@for dir in rfc drafts; do \
X		${MKDIR} ${DOCSDIR}/$${dir}; \
X		${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
X			-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
X	done
X.endif
X.else
X.for script in slapd.sh slurpd.sh
X	@${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}.sample
X.endfor
X	@${MKDIR} ${LDAP_RUN_DIR}
X	@${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.post.mk>
END-of-net/openldap20-server/Makefile
echo x - net/openldap20-server/distinfo
sed 's/^X//' >net/openldap20-server/distinfo << 'END-of-net/openldap20-server/distinfo'
XMD5 (openldap-2.0.27.tgz) = a1e6508c471dd47205a3492cf57110a6
END-of-net/openldap20-server/distinfo
echo c - net/openldap20-server/files
mkdir -p net/openldap20-server/files > /dev/null 2>&1
echo x - net/openldap20-server/files/extrapatch-Makefile.in
sed 's/^X//' >net/openldap20-server/files/extrapatch-Makefile.in << 'END-of-net/openldap20-server/files/extrapatch-Makefile.in'
X--- Makefile.in.orig	Fri Jan  4 21:29:47 2002
X+++ Makefile.in	Thu Jul 10 23:45:33 2003
X@@ -10,9 +10,11 @@
X ## in file LICENSE in the top-level directory of the distribution.
X ##
X 
X-SUBDIRS= include libraries clients servers tests doc
X-CLEANDIRS= contrib
X-INSTALLDIRS= 
X+SUBDIRS=
X+ALLDIRS= include libraries clients servers tests doc
X+CLEANDIRS= include libraries clients servers tests doc contrib
X+DEPENDDIRS= include libraries clients servers tests doc
X+INSTALLDIRS=  servers
X 
X makefiles:	FORCE
X 	./config.status
END-of-net/openldap20-server/files/extrapatch-Makefile.in
echo x - net/openldap20-server/files/patch-build::mod.mk
sed 's/^X//' >net/openldap20-server/files/patch-build::mod.mk << 'END-of-net/openldap20-server/files/patch-build::mod.mk'
X--- build/mod.mk.orig	Fri Jan  4 21:38:06 2002
X+++ build/mod.mk	Sat Jul 12 19:30:28 2003
X@@ -10,7 +10,7 @@
X LIBRARY = $(LIBBASE).la
X LIBSTAT = lib$(LIBBASE).a
X 
X-LTFLAGS = --only-$(LINKAGE)
X+LTFLAGS = # --only-$(LINKAGE)
X 
X COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(MODDEFS) -c
X LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -rpath $(moduledir) \
END-of-net/openldap20-server/files/patch-build::mod.mk
echo x - net/openldap20-server/files/patch-clients::ud::Makefile.in
sed 's/^X//' >net/openldap20-server/files/patch-clients::ud::Makefile.in << 'END-of-net/openldap20-server/files/patch-clients::ud::Makefile.in'
X--- clients/ud/Makefile.in.orig	Wed Jan 13 20:02:11 1999
X+++ clients/ud/Makefile.in	Wed Jul 26 14:24:14 2000
X@@ -26,4 +26,4 @@
X install-local: FORCE
X 	-$(MKDIR) $(DESTDIR)$(bindir)
X-	-mv -f $(DESTDIR)$(bindir)/ud $(DESTDIR)$(bindir)/ud-
X+	$(LTINSTALL) $(INSTALLFLAGS) -m 755 ud $(bindir)
X 	@(								\
X 	    for prg in $(PROGRAMS); do					\
X 		$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 $$prg$(EXEEXT)	\
END-of-net/openldap20-server/files/patch-clients::ud::Makefile.in
echo x - net/openldap20-server/files/patch-servers::slapd::daemon.c
sed 's/^X//' >net/openldap20-server/files/patch-servers::slapd::daemon.c << 'END-of-net/openldap20-server/files/patch-servers::slapd::daemon.c'
X--- servers/slapd/daemon.c.orig	Thu Apr 24 07:51:08 2003
X+++ servers/slapd/daemon.c	Thu Apr 24 07:52:05 2003
X@@ -863,6 +863,7 @@
X 
X 			char	*dnsname = NULL;
X 			char	*peeraddr;
X+			char	peeraddr6[INET6_ADDRSTRLEN];
X #ifdef LDAP_PF_LOCAL
X 			char	peername[MAXPATHLEN + sizeof("PATH=")];
X #elif defined(LDAP_PF_INET6)
X@@ -995,12 +996,12 @@
X 					 peeraddr != NULL ? peeraddr : "unknown",
X 					 (unsigned) ntohs( from.sa_in6_addr.sin6_port ) );
X 			} else {
X-				char addr[INET6_ADDRSTRLEN];
X-				sprintf( peername, "IP=%s %d",
X-					 inet_ntop( AF_INET6,
X-						    &from.sa_in6_addr.sin6_addr,
X-						    addr, sizeof addr) ? addr : "unknown",
X+				const char *addr = inet_ntop( AF_INET6,
X+																&from.sa_in6_addr.sin6_addr,
X+																peeraddr6, sizeof peeraddr6);
X+				sprintf( peername, "IP=%s %d", addr ? addr : "unknown",
X 					 (unsigned) ntohs( from.sa_in6_addr.sin6_port ) );
X+				if (addr) peeraddr = addr;
X 			}
X 			break;
X #  endif /* LDAP_PF_INET6 */
END-of-net/openldap20-server/files/patch-servers::slapd::daemon.c
echo x - net/openldap20-server/files/slapd.sh
sed 's/^X//' >net/openldap20-server/files/slapd.sh << 'END-of-net/openldap20-server/files/slapd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X
Xslapd_program=%%PREFIX%%/libexec/slapd
X
Xslapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
X
Xslapd_enable="YES"
X
Xslapd_args=
X
X# Add the following lines to /etc/rc.conf to enable slapd:
X#
X#slapd_enable="YES"
X#slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
X#
X# See sldap(8) for details
X#
X# Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
X# if you want to run slapd as a non-privileged user (recommended)
X#
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X    . /etc/defaults/rc.conf
X    source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X    . /etc/rc.conf
Xfi
X
Xcase "$slapd_enable" in
X[Yy][Ee][Ss])
X    case "$1" in
X    start)
X        if [ -x ${slapd_program} ]; then
X            echo -n ' slapd'
X            eval ${slapd_program} ${slapd_args}
X        fi
X        ;;
X    stop)
X        if [ -f $slapd_pidfile ]; then
X            kill `cat $slapd_pidfile`
X            echo -n ' slapd'
X        else
X            echo ' slapd: not running'
X        fi
X        ;;
X    *)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
X    esac
X    ;;
X*)
X    ;;
Xesac
X
Xexit 0
END-of-net/openldap20-server/files/slapd.sh
echo x - net/openldap20-server/files/slurpd.sh
sed 's/^X//' >net/openldap20-server/files/slurpd.sh << 'END-of-net/openldap20-server/files/slurpd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X
Xslurpd_program=%%PREFIX%%/libexec/slurpd
X
Xslurpd_enable="YES"
X
Xslurpd_args=
X
X# Add the following line to /etc/rc.conf to enable slurpd:
X#
X#slurpd_enable="YES"
X#
X# See slurpd(8) for details
X#
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X    . /etc/defaults/rc.conf
X    source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X    . /etc/rc.conf
Xfi
X
Xcase "$slurpd_enable" in
X[Yy][Ee][Ss])
X    case "$1" in
X    start)
X        if [ -x ${slurpd_program} ]; then
X            echo -n ' slurpd'
X            ${slurpd_program} ${slurpd_args} 
X        fi
X        ;;
X    stop)
X        if ! killall `basename ${slurpd_program}`; then
X            echo ' slurpd: not running'
X        fi
X        ;;
X    *)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
X    esac
X    ;;
X*)
X    ;;
Xesac
X
Xexit 0
END-of-net/openldap20-server/files/slurpd.sh
echo x - net/openldap20-server/pkg-descr
sed 's/^X//' >net/openldap20-server/pkg-descr << 'END-of-net/openldap20-server/pkg-descr'
XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
Xclients, utilities and development tools.
X
XThis release includes the following major components:
X
X * slapd - a stand-alone LDAP directory server
X * slurpd - a stand-alone LDAP replication server
X * LDIF tools - data conversion tools for use with slapd
X
XThis release is an old version, you should upgrade.
X
XWWW: http://www.OpenLDAP.org/
X
X- Oliver Eikemeier
Xeikemeier at fillmore-labs.com
END-of-net/openldap20-server/pkg-descr
echo x - net/openldap20-server/pkg-install
sed 's/^X//' >net/openldap20-server/pkg-install << 'END-of-net/openldap20-server/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
Xif [ X"$2" != X"POST-INSTALL" ]; then
X    exit 0;
Xfi
X
Xmkdir -p "%%LDAP_RUN_DIR%%"
Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-ldbm"
Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"
END-of-net/openldap20-server/pkg-install
echo x - net/openldap20-server/pkg-message
sed 's/^X//' >net/openldap20-server/pkg-message << 'END-of-net/openldap20-server/pkg-message'
X************************************************************
X
XThe OpenLDAP server package has been successfully installed.
X
XIn order to run the LDAP server, you need to edit
X  %%PREFIX%%/etc/openldap/slapd.conf
Xto suit your needs and add the next lines to /etc/rc.conf:
X  slapd_enable="YES"
X  slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
X
XThen add a link to %%PREFIX%%/etc/rc.d/slapd.sh.sample:
X  ln -s %%PREFIX%%/etc/rc.d/slapd.sh.sample %%PREFIX%%/etc/rc.d/slapd.sh
Xand start the server with
X  %%PREFIX%%/etc/rc.d/slapd.sh start
Xor reboot.
X
XNOTE: There is no real reason to run slapd as root. Add
X  '-u ldap -g ldap'
Xto slapd_args, create a user "ldap" with
X  pw add group ldap -g 389
X  pw add user ldap -u 389 -g 389 -d /nonexistent \
X    -c "OpenLDAP Server" -s /sbin/nologin -p "*"
Xand do
X  chown -R ldap:ldap %%LDAP_RUN_DIR%% \
X    %%LOCALSTATEDIR%%/openldap-ldbm %%PREFIX%%/etc/openldap/slapd.conf
Xand your server runs with a non-privileged user id.
X
X************************************************************
END-of-net/openldap20-server/pkg-message
echo x - net/openldap20-server/pkg-plist
sed 's/^X//' >net/openldap20-server/pkg-plist << 'END-of-net/openldap20-server/pkg-plist'
X at comment $FreeBSD$
X at unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
X at unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
X at 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
Xetc/openldap/schema/corba.schema.default
X at exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
X at 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
Xetc/openldap/schema/core.schema.default
X at exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
X at 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
Xetc/openldap/schema/cosine.schema.default
X at exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
X at 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
Xetc/openldap/schema/inetorgperson.schema.default
X at exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
X at 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
Xetc/openldap/schema/java.schema.default
X at exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
X at unexec if cmp -s %D/etc/openldap/schema/krb5-kdc.schema %D/etc/openldap/schema/krb5-kdc.schema.default; then rm -f %D/etc/openldap/schema/krb5-kdc.schema; fi
Xetc/openldap/schema/krb5-kdc.schema.default
X at exec [ -f %B/krb5-kdc.schema ] || cp %B/%f %B/krb5-kdc.schema
X at 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
Xetc/openldap/schema/misc.schema.default
X at exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
X at 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
Xetc/openldap/schema/nis.schema.default
X at exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
X at 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
Xetc/openldap/schema/openldap.schema.default
X at exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
X at unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
Xetc/openldap/slapd.conf.default
X at exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
X at unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
X at unexec rmdir %D/etc/openldap 2>/dev/null || true
Xetc/rc.d/slapd.sh.sample
Xetc/rc.d/slurpd.sh.sample
Xlibexec/slapd
Xlibexec/slurpd
Xsbin/slapadd
Xsbin/slapcat
Xsbin/slapindex
Xsbin/slappasswd
X at unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
X at unexec rmdir %%LOCALSTATEDIR%%/openldap-ldbm 2>/dev/null || true
X at unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
END-of-net/openldap20-server/pkg-plist
exit
--- openldap20-server.shar ends here ---

--- openldap21-client.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/openldap21-client
#	net/openldap21-client/Makefile
#	net/openldap21-client/files
#	net/openldap21-client/files/manpages
#	net/openldap21-client/pkg-descr
#	net/openldap21-client/pkg-install
#	net/openldap21-client/pkg-message
#	net/openldap21-client/pkg-plist
#
echo c - net/openldap21-client
mkdir -p net/openldap21-client > /dev/null 2>&1
echo x - net/openldap21-client/Makefile
sed 's/^X//' >net/openldap21-client/Makefile << 'END-of-net/openldap21-client/Makefile'
X# New ports collection makefile for:	openldap21-client
X# Date created:				10 Jul 2003
X# Whom:					Oliver Eikemeier <eikemeier at fillmore-labs.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		openldap
X
XCOMMENT=		Open source LDAP client implementation
X
XCLIENT_ONLY=		yes
X
XMASTERDIR=		${.CURDIR}/../openldap21-server
X
X.include "${MASTERDIR}/Makefile"
END-of-net/openldap21-client/Makefile
echo c - net/openldap21-client/files
mkdir -p net/openldap21-client/files > /dev/null 2>&1
echo x - net/openldap21-client/files/manpages
sed 's/^X//' >net/openldap21-client/files/manpages << 'END-of-net/openldap21-client/files/manpages'
X#
X# $FreeBSD$
X#
X
XMAN1+=	ldapcompare.1 \
X	ldapdelete.1 \
X	ldapmodify.1 \
X	ldapmodrdn.1 \
X	ldappasswd.1 \
X	ldapsearch.1 \
X	ldapwhoami.1
XMLINKS+= \
X	ldapmodify.1 ldapadd.1
X
XMAN3+=	lber-decode.3 \
X	lber-encode.3 \
X	lber-memory.3 \
X	lber-types.3 \
X	ldap.3 \
X	ldap_abandon.3 \
X	ldap_add.3 \
X	ldap_bind.3 \
X	ldap_compare.3 \
X	ldap_delete.3 \
X	ldap_error.3 \
X	ldap_first_attribute.3 \
X	ldap_first_entry.3 \
X	ldap_first_message.3 \
X	ldap_first_reference.3 \
X	ldap_get_dn.3 \
X	ldap_get_values.3 \
X	ldap_modify.3 \
X	ldap_modrdn.3 \
X	ldap_open.3 \
X	ldap_parse_reference.3 \
X	ldap_parse_result.3 \
X	ldap_result.3 \
X	ldap_schema.3 \
X	ldap_search.3 \
X	ldap_sort.3 \
X	ldap_url.3
XMLINKS+= \
X	lber-decode.3 ber_first_element.3 \
X	lber-decode.3 ber_get_bitstring.3 \
X	lber-decode.3 ber_get_boolean.3 \
X	lber-decode.3 ber_get_enum.3 \
X	lber-decode.3 ber_get_int.3 \
X	lber-decode.3 ber_get_next.3 \
X	lber-decode.3 ber_get_null.3 \
X	lber-decode.3 ber_get_stringa.3 \
X	lber-decode.3 ber_get_stringb.3 \
X	lber-decode.3 ber_next_element.3 \
X	lber-decode.3 ber_peek_tag.3 \
X	lber-decode.3 ber_scanf.3 \
X	lber-decode.3 ber_skip_tag.3 \
X	lber-encode.3 ber_alloc_t.3 \
X	lber-encode.3 ber_flush.3 \
X	lber-encode.3 ber_printf.3 \
X	lber-encode.3 ber_put_enum.3 \
X	lber-encode.3 ber_put_int.3 \
X	lber-encode.3 ber_put_null.3 \
X	lber-encode.3 ber_put_ostring.3 \
X	lber-encode.3 ber_put_seq.3 \
X	lber-encode.3 ber_put_set.3 \
X	lber-encode.3 ber_put_string.3 \
X	lber-encode.3 ber_start_set.3 \
X	lber-types.3 ber_bvarray_add.3 \
X	lber-types.3 ber_bvarray_free.3 \
X	lber-types.3 ber_bvdup.3 \
X	lber-types.3 ber_bvecadd.3 \
X	lber-types.3 ber_bvecfree.3 \
X	lber-types.3 ber_bvfree.3 \
X	lber-types.3 ber_bvstr.3 \
X	lber-types.3 ber_bvstrdup.3 \
X	lber-types.3 ber_dupbv.3 \
X	lber-types.3 ber_free.3 \
X	lber-types.3 ber_str2bv.3 \
X	ldap_abandon.3 ldap_abandon_ext.3 \
X	ldap_add.3 ldap_add_ext.3 \
X	ldap_add.3 ldap_add_ext_s.3 \
X	ldap_add.3 ldap_add_s.3 \
X	ldap_bind.3 ldap_bind_s.3 \
X	ldap_bind.3 ldap_kerberos_bind1.3 \
X	ldap_bind.3 ldap_kerberos_bind1_s.3 \
X	ldap_bind.3 ldap_kerberos_bind2.3 \
X	ldap_bind.3 ldap_kerberos_bind2_s.3 \
X	ldap_bind.3 ldap_kerberos_bind_s.3 \
X	ldap_bind.3 ldap_sasl_bind.3 \
X	ldap_bind.3 ldap_sasl_bind_s.3 \
X	ldap_bind.3 ldap_simple_bind.3 \
X	ldap_bind.3 ldap_simple_bind_s.3 \
X	ldap_bind.3 ldap_unbind.3 \
X	ldap_bind.3 ldap_unbind_ext.3 \
X	ldap_bind.3 ldap_unbind_ext_s.3 \
X	ldap_bind.3 ldap_unbind_s.3 \
X	ldap_compare.3 ldap_compare_ext.3 \
X	ldap_compare.3 ldap_compare_ext_s.3 \
X	ldap_compare.3 ldap_compare_s.3 \
X	ldap_delete.3 ldap_delete_ext.3 \
X	ldap_delete.3 ldap_delete_ext_s.3 \
X	ldap_delete.3 ldap_delete_s.3 \
X	ldap_error.3 ld_errno.3 \
X	ldap_error.3 ldap_err2string.3 \
X	ldap_error.3 ldap_errlist.3 \
X	ldap_error.3 ldap_perror.3 \
X	ldap_error.3 ldap_result2error.3 \
X	ldap_first_attribute.3 ldap_next_attribute.3 \
X	ldap_first_entry.3 ldap_count_entries.3 \
X	ldap_first_entry.3 ldap_next_entry.3 \
X	ldap_first_message.3 ldap_count_messages.3 \
X	ldap_first_message.3 ldap_next_message.3 \
X	ldap_first_reference.3 ldap_count_references.3 \
X	ldap_first_reference.3 ldap_next_reference.3 \
X	ldap_get_dn.3 ldap_dcedn2dn.3 \
X	ldap_get_dn.3 ldap_dn2ad_canonical.3 \
X	ldap_get_dn.3 ldap_dn2dcedn.3 \
X	ldap_get_dn.3 ldap_dn2str.3 \
X	ldap_get_dn.3 ldap_dn2ufn.3 \
X	ldap_get_dn.3 ldap_explode_dn.3 \
X	ldap_get_dn.3 ldap_explode_rdn.3 \
X	ldap_get_dn.3 ldap_str2dn.3 \
X	ldap_get_values.3 ldap_count_values.3 \
X	ldap_get_values.3 ldap_count_values_len.3 \
X	ldap_get_values.3 ldap_get_values_len.3 \
X	ldap_get_values.3 ldap_value_free.3 \
X	ldap_get_values.3 ldap_value_free_len.3 \
X	ldap_modify.3 ldap_modify_ext.3 \
X	ldap_modify.3 ldap_modify_ext_s.3 \
X	ldap_modify.3 ldap_modify_s.3 \
X	ldap_modify.3 ldap_mods_free.3 \
X	ldap_modrdn.3 ldap_modrdn2.3 \
X	ldap_modrdn.3 ldap_modrdn2_s.3 \
X	ldap_modrdn.3 ldap_modrdn_s.3 \
X	ldap_open.3 ldap_init.3 \
X	ldap_parse_result.3 ldap_parse_extended_result.3 \
X	ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
X	ldap_result.3 ldap_msgfree.3 \
X	ldap_result.3 ldap_msgid.3 \
X	ldap_result.3 ldap_msgtype.3 \
X	ldap_schema.3 ldap_attributetype2name.3 \
X	ldap_schema.3 ldap_attributetype2str.3 \
X	ldap_schema.3 ldap_attributetype_free.3 \
X	ldap_schema.3 ldap_matchingrule2name.3 \
X	ldap_schema.3 ldap_matchingrule2str.3 \
X	ldap_schema.3 ldap_matchingrule_free.3 \
X	ldap_schema.3 ldap_objectclass2name.3 \
X	ldap_schema.3 ldap_objectclass2str.3 \
X	ldap_schema.3 ldap_objectclass_free.3 \
X	ldap_schema.3 ldap_scherr2str.3 \
X	ldap_schema.3 ldap_str2attributetype.3 \
X	ldap_schema.3 ldap_str2matchingrule.3 \
X	ldap_schema.3 ldap_str2objectclass.3 \
X	ldap_schema.3 ldap_str2syntax.3 \
X	ldap_schema.3 ldap_syntax2name.3 \
X	ldap_schema.3 ldap_syntax2str.3 \
X	ldap_schema.3 ldap_syntax_free.3 \
X	ldap_search.3 ldap_search_ext.3 \
X	ldap_search.3 ldap_search_ext_s.3 \
X	ldap_search.3 ldap_search_s.3 \
X	ldap_search.3 ldap_search_st.3 \
X	ldap_sort.3 ldap_sort_entries.3 \
X	ldap_sort.3 ldap_sort_strcasecmp.3 \
X	ldap_sort.3 ldap_sort_values.3 \
X	ldap_url.3 ldap_free_urldesc.3 \
X	ldap_url.3 ldap_is_ldap_url.3 \
X	ldap_url.3 ldap_url_parse.3
X
XMAN5+=	ldap.conf.5 \
X	ldif.5 \
X	slapd-bdb.5 \
X	slapd-dnssrv.5 \
X	slapd-ldap.5 \
X	slapd-ldbm.5 \
X	slapd-meta.5 \
X	slapd-null.5 \
X	slapd-passwd.5 \
X	slapd-perl.5 \
X	slapd-shell.5 \
X	slapd-sql.5 \
X	slapd-tcl.5 \
X	slapd.access.5 \
X	slapd.conf.5 \
X	slapd.replog.5
X
XMAN8+=	slapadd.8 \
X	slapcat.8 \
X	slapd.8 \
X	slapindex.8 \
X	slappasswd.8 \
X	slurpd.8
END-of-net/openldap21-client/files/manpages
echo x - net/openldap21-client/pkg-descr
sed 's/^X//' >net/openldap21-client/pkg-descr << 'END-of-net/openldap21-client/pkg-descr'
XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
Xclients, utilities and development tools.
X
XThis release includes the following major components:
X
X * -lldap - a LDAP client library
X * -llber - a lightweight BER/DER encoding/decoding library
X * LDAP tools - A collection of command line LDAP utilities
X * documentation - man pages for all components
X
XThis is the latest release of OpenLDAP Software for general use.
X
XWWW: http://www.OpenLDAP.org/
X
X- Oliver Eikemeier
Xeikemeier at fillmore-labs.com
END-of-net/openldap21-client/pkg-descr
echo x - net/openldap21-client/pkg-install
sed 's/^X//' >net/openldap21-client/pkg-install << 'END-of-net/openldap21-client/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
Xif [ X"$2" != X"POST-INSTALL" ]; then
X    exit 0;
Xfi
X
END-of-net/openldap21-client/pkg-install
echo x - net/openldap21-client/pkg-message
sed 's/^X//' >net/openldap21-client/pkg-message << 'END-of-net/openldap21-client/pkg-message'
X************************************************************
X
XThe OpenLDAP package has been successfully installed.
X
XEdit
X  %%PREFIX%%/etc/openldap/ldap.conf
Xto change the system-wide client defaults.
X
X************************************************************
END-of-net/openldap21-client/pkg-message
echo x - net/openldap21-client/pkg-plist
sed 's/^X//' >net/openldap21-client/pkg-plist << 'END-of-net/openldap21-client/pkg-plist'
X at comment $FreeBSD$
Xbin/ldapadd
Xbin/ldapcompare
Xbin/ldapdelete
Xbin/ldapmodify
Xbin/ldapmodrdn
Xbin/ldappasswd
Xbin/ldapsearch
Xbin/ldapwhoami
X at unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi
Xetc/openldap/ldap.conf.default
X at exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
X at unexec rmdir %D/etc/openldap 2>/dev/null || true
Xinclude/lber.h
Xinclude/lber_types.h
Xinclude/ldap.h
Xinclude/ldap_cdefs.h
Xinclude/ldap_features.h
Xinclude/ldap_schema.h
Xinclude/ldap_utf8.h
Xlib/liblber.a
Xlib/liblber.so
Xlib/liblber.so.2
Xlib/libldap.a
Xlib/libldap.so
Xlib/libldap.so.2
Xlib/libldap_r.a
Xlib/libldap_r.so
Xlib/libldap_r.so.2
Xshare/openldap/ucdata/case.dat
Xshare/openldap/ucdata/cmbcl.dat
Xshare/openldap/ucdata/comp.dat
Xshare/openldap/ucdata/ctype.dat
Xshare/openldap/ucdata/decomp.dat
Xshare/openldap/ucdata/kdecomp.dat
Xshare/openldap/ucdata/num.dat
X at dirrm share/openldap/ucdata
X at dirrm share/openldap
END-of-net/openldap21-client/pkg-plist
exit
--- openldap21-client.shar ends here ---

--- openldap21-server.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/openldap21-server
#	net/openldap21-server/Makefile
#	net/openldap21-server/distinfo
#	net/openldap21-server/files
#	net/openldap21-server/files/extrapatch-Makefile.in
#	net/openldap21-server/files/slapd.sh
#	net/openldap21-server/files/slurpd.sh
#	net/openldap21-server/pkg-descr
#	net/openldap21-server/pkg-install
#	net/openldap21-server/pkg-message
#	net/openldap21-server/pkg-plist
#
echo c - net/openldap21-server
mkdir -p net/openldap21-server > /dev/null 2>&1
echo x - net/openldap21-server/Makefile
sed 's/^X//' >net/openldap21-server/Makefile << 'END-of-net/openldap21-server/Makefile'
X# New ports collection makefile for:	openldap21-server
X# Date created:				10 Jul 2003
X# Whom:					Oliver Eikemeier
X#
X# $FreeBSD$
X#
X
XPORTNAME=		openldap
XPORTVERSION=		${OPENLDAP_VERSION}
XPORTREVISION=		${OPENLDAP_PORTVERSION}
XCATEGORIES=		net databases
XMASTER_SITES=		ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
X			http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
X			ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \
X			ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \
X			ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
X			ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \
X			ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \
X			ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \
X			http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
XMASTER_SITE_SUBDIR=	openldap-test
XPKGNAMESUFFIX=		${OPENLDAP_PKGNAMESUFFIX}
XEXTRACT_SUFX=		.tgz
X
XMAINTAINER=		eikemeier at fillmore-labs.com
XCOMMENT?=		Open source LDAP server implementation
X
XOPENLDAP_VERSION=	2.1.22
X
XLATEST_LINK=		${PKGNAMEPREFIX}openldap21${PKGNAMESUFFIX}
XCONFLICTS=		${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-*
X
XWANT_OPENLDAP_VER?=	21
X.if ${WANT_OPENLDAP_VER} != 21
XBROKEN=			"incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
X.endif
X
X.if defined(CLIENT_ONLY)
XOPENLDAP_PORTVERSION=	0
XOPENLDAP_PKGNAMESUFFIX?=-client
X.else
XOPENLDAP_PORTVERSION=	0
XOPENLDAP_PKGNAMESUFFIX?=-server
X
XLIB_DEPENDS+=		ldap.2:${PORTSDIR}/net/openldap21-client
X.endif
X
XUSE_OPENSSL=		yes
XUSE_REINPLACE=		yes
XUSE_LIBTOOL_VER=	14
X
XDESCR=			${.CURDIR}/pkg-descr
XPLIST=			${WRKDIR}/pkg-plist
XPKGINSTALL=		${WRKDIR}/pkg-install
XPKGMESSAGE=		${WRKDIR}/pkg-message
X
XLOCALSTATEDIR?=		${DESTDIR}/var/db
XLDAP_RUN_DIR?=		${DESTDIR}/var/run/openldap
X
XPLIST_SUB+=		LOCALSTATEDIR=${LOCALSTATEDIR} \
X			LDAP_RUN_DIR=${LDAP_RUN_DIR}
X
XSED_SCRIPT=		-e 's,%%PREFIX%%,${PREFIX},g' \
X			-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
X			-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
X
XCONFIGURE_ARGS=		--with-threads \
X			--with-tls=openssl \
X			--enable-dynamic
X
X.if defined(WITH_SASL)
XLIB_DEPENDS+=		sasl2.2:${PORTSDIR}/security/cyrus-sasl2
XCONFIGURE_ARGS+=	--with-cyrus-sasl
X.else
XCONFIGURE_ARGS+=	--without-cyrus-sasl
X.endif
X
X.if defined(CLIENT_ONLY)
X# client specific configuration
X
XCONFIGURE_ARGS+=	--disable-slapd
X
XINSTALLS_SHLIB=	yes
X
X.else
X# server specific configuration
X
XEXTRA_PATCHES+=		${FILESDIR}/extrapatch-Makefile.in
X
XCONFIGURE_ARGS+=	--localstatedir=${LOCALSTATEDIR} \
X			--enable-ldbm \
X			--with-ldbm-api=berkeley \
X			--enable-lmpasswd \
X			--enable-ldap \
X			--enable-meta \
X			--enable-rewrite \
X			--enable-null \
X			--enable-monitor
X
XWITH_BDB_VER?=		41
X
X.if ${WITH_BDB_VER} == 41
XLIB_DEPENDS+=		db41.1:${PORTSDIR}/databases/db41
XCONFIGURE_ARGS+=	--enable-bdb
X.elif ${WITH_BDB_VER} == 4
XLIB_DEPENDS+=		db4.0:${PORTSDIR}/databases/db4
XCONFIGURE_ARGS+=	--disable-bdb
X.elif ${WITH_BDB_VER} == 3
XLIB_DEPENDS+=		db3.3:${PORTSDIR}/databases/db3
XCONFIGURE_ARGS+=	--disable-bdb
X.else
X.error WITH_BDB_VER must be 3, 4 or 41
X.endif
XLIBS+=			-ldb${WITH_BDB_VER}
XCPPFLAGS+=		-I${LOCALBASE}/include/db${WITH_BDB_VER}
X
X.if defined(WITH_SHELL)
XCONFIGURE_ARGS+=	--enable-shell
X.endif
X
X.if defined(WITH_PERL)
XUSE_PERL5=	yes
XCONFIGURE_ARGS+=	--enable-perl
X.endif
X
X.if defined(WITH_SASL)
XCONFIGURE_ARGS+=	--enable-spasswd
X.endif
X
X.if defined(WITH_ODBC)
XLIB_DEPENDS+=		iodbc.3:${PORTSDIR}/databases/libiodbc
XCONFIGURE_ARGS+=	--enable-sql
X.endif
X
X# Include tcp-wrapper support
X.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
XCONFIGURE_ARGS+=	--enable-wrappers
X.endif
X
X# end of client/server specific configuration
X.endif
X
X# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
XCPPFLAGS+=		-D_REENTRANT ${PTHREAD_CFLAGS} \
X			-I${LOCALBASE}/include
XLDFLAGS+=		-L${LOCALBASE}/lib
X
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XCONFIGURE_ENV=		CPPFLAGS="${CPPFLAGS}" \
X			LDFLAGS="${LDFLAGS}" \
X			LIBS="${LIBS}"
X
X.include <bsd.port.pre.mk>
X
X.if defined(CLIENT_ONLY)
X.include "${.CURDIR}/files/manpages"
X.endif
X
Xpre-everything::
X	@${ECHO} "============================================================="
X	@${ECHO}
X	@${ECHO} "You can build ${PKGNAME} with the following options:"
X	@${ECHO}
X.if defined(CLIENT_ONLY)
X	@${ECHO} "WITH_SASL             with (Cyrus) SASL2 support"
X.else
X	@${ECHO} "WITH_BDB_VER          select BerkeleyDB version (default 4.1)"
X	@${ECHO} "WITH_SASL             with (Cyrus) SASL2 password verification"
X	@${ECHO} "WITH_PERL             with Perl backend"
X	@${ECHO} "WITH_SHELL            with Shell backend"
X	@${ECHO} "WITH_ODBC             with SQL backend"
X	@${ECHO} "WITHOUT_TCP_WRAPPERS  without tcp wrapper support"
X.endif
X	@${ECHO}
X	@${ECHO} "============================================================="
X	@${ECHO}
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
X		${WRKSRC}/servers/slapd/slapd.conf
X
Xpre-configure:
X	@${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \
X		${WRKSRC}/configure
X
Xpost-build:
X.for script in slapd.sh slurpd.sh
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
X.endfor
X.for text in pkg-install pkg-message
X	@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
X.endfor
X
X.if !defined(CLIENT_ONLY)
Xtest: build
X	@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
X		${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test
X.endif
X
Xpre-install:
X	@${CP} ${.CURDIR}/pkg-plist ${PLIST}
X.if defined(CLIENT_ONLY)
X.if !defined(NOPORTDOCS)
X	@for dir in rfc drafts; do \
X		${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
X			| ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
X			>>${PLIST}; \
X		${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
X	done
X	@${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
X.endif
X.endif
X
Xpost-install:
X.if defined(CLIENT_ONLY)
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@for dir in rfc drafts; do \
X		${MKDIR} ${DOCSDIR}/$${dir}; \
X		${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
X			-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
X	done
X.endif
X.else
X.for script in slapd.sh slurpd.sh
X	@${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}
X.endfor
X	@${MKDIR} ${LDAP_RUN_DIR}
X	@${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.post.mk>
END-of-net/openldap21-server/Makefile
echo x - net/openldap21-server/distinfo
sed 's/^X//' >net/openldap21-server/distinfo << 'END-of-net/openldap21-server/distinfo'
XMD5 (openldap-2.1.22.tgz) = 391512053eded93e73ffa0d377ce272a
X
END-of-net/openldap21-server/distinfo
echo c - net/openldap21-server/files
mkdir -p net/openldap21-server/files > /dev/null 2>&1
echo x - net/openldap21-server/files/extrapatch-Makefile.in
sed 's/^X//' >net/openldap21-server/files/extrapatch-Makefile.in << 'END-of-net/openldap21-server/files/extrapatch-Makefile.in'
X--- Makefile.in.orig	Mon Apr  7 22:23:24 2003
X+++ Makefile.in	Thu Jul 10 17:43:35 2003
X@@ -10,9 +10,11 @@
X ## in file LICENSE in the top-level directory of the distribution.
X ##
X 
X-SUBDIRS= include libraries clients servers tests doc
X-CLEANDIRS=
X-INSTALLDIRS= 
X+SUBDIRS=
X+ALLDIRS= include libraries clients servers tests doc
X+CLEANDIRS= include libraries clients servers tests doc
X+DEPENDDIRS= include libraries clients servers tests doc
X+INSTALLDIRS=  servers
X 
X makefiles:	FORCE
X 	./config.status
END-of-net/openldap21-server/files/extrapatch-Makefile.in
echo x - net/openldap21-server/files/slapd.sh
sed 's/^X//' >net/openldap21-server/files/slapd.sh << 'END-of-net/openldap21-server/files/slapd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X
Xslapd_program=%%PREFIX%%/libexec/slapd
X
Xslapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
X
Xslapd_enable="NO"
X
Xslapd_args=
X
X# Add the following lines to /etc/rc.conf to enable slapd:
X#
X#slapd_enable="YES"
X#slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
X#
X# See sldap(8) for details
X#
X# Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
X# if you want to run slapd as a non-privileged user (recommended)
X#
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X    . /etc/defaults/rc.conf
X    source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X    . /etc/rc.conf
Xfi
X
Xcase "$slapd_enable" in
X[Yy][Ee][Ss])
X    case "$1" in
X    start)
X        if [ -x ${slapd_program} ]; then
X            echo -n ' slapd'
X            eval ${slapd_program} ${slapd_args}
X        fi
X        ;;
X    stop)
X        if [ -f $slapd_pidfile ]; then
X            kill `cat $slapd_pidfile`
X            echo -n ' slapd'
X        else
X            echo ' slapd: not running'
X        fi
X        ;;
X    *)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
X    esac
X    ;;
X*)
X    ;;
Xesac
X
Xexit 0
END-of-net/openldap21-server/files/slapd.sh
echo x - net/openldap21-server/files/slurpd.sh
sed 's/^X//' >net/openldap21-server/files/slurpd.sh << 'END-of-net/openldap21-server/files/slurpd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X
Xslurpd_program=%%PREFIX%%/libexec/slurpd
X
Xslurpd_enable="NO"
X
Xslurpd_args=
X
X# Add the following line to /etc/rc.conf to enable slurpd:
X#
X#slurpd_enable="YES"
X#
X# See slurpd(8) for details
X#
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X    . /etc/defaults/rc.conf
X    source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X    . /etc/rc.conf
Xfi
X
Xcase "$slurpd_enable" in
X[Yy][Ee][Ss])
X    case "$1" in
X    start)
X        if [ -x ${slurpd_program} ]; then
X            echo -n ' slurpd'
X            ${slurpd_program} ${slurpd_args} 
X        fi
X        ;;
X    stop)
X        if ! killall `basename ${slurpd_program}`; then
X            echo ' slurpd: not running'
X        fi
X        ;;
X    *)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
X    esac
X    ;;
X*)
X    ;;
Xesac
X
Xexit 0
END-of-net/openldap21-server/files/slurpd.sh
echo x - net/openldap21-server/pkg-descr
sed 's/^X//' >net/openldap21-server/pkg-descr << 'END-of-net/openldap21-server/pkg-descr'
XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
Xclients, utilities and development tools.
X
XThis release includes the following major components:
X
X * slapd - a stand-alone LDAP directory server
X * slurpd - a stand-alone LDAP replication server
X * LDIF tools - data conversion tools for use with slapd
X
XThis is the latest release of OpenLDAP Software for general use.
X
XWWW: http://www.OpenLDAP.org/
X
X- Oliver Eikemeier
Xeikemeier at fillmore-labs.com
END-of-net/openldap21-server/pkg-descr
echo x - net/openldap21-server/pkg-install
sed 's/^X//' >net/openldap21-server/pkg-install << 'END-of-net/openldap21-server/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
Xif [ X"$2" != X"POST-INSTALL" ]; then
X    exit 0;
Xfi
X
Xmkdir -p "%%LDAP_RUN_DIR%%"
Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"
END-of-net/openldap21-server/pkg-install
echo x - net/openldap21-server/pkg-message
sed 's/^X//' >net/openldap21-server/pkg-message << 'END-of-net/openldap21-server/pkg-message'
X************************************************************
X
XThe OpenLDAP server package has been successfully installed.
X
XIn order to run the LDAP server, you need to edit
X  %%PREFIX%%/etc/openldap/slapd.conf
Xto suit your needs and add the next lines to /etc/rc.conf:
X  slapd_enable="YES"
X  slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
X
XThen start the server with
X  %%PREFIX%%/etc/rc.d/slapd.sh start
Xor reboot.
X
XNOTE: There is no real reason to run slapd as root. Add
X  '-u ldap -g ldap'
Xto slapd_args, create a user "ldap" with
X  pw add group ldap -g 389
X  pw add user ldap -u 389 -g 389 -d /nonexistent \
X    -c "OpenLDAP Server" -s /sbin/nologin -p "*"
Xand do
X  chown -R ldap:ldap %%LDAP_RUN_DIR%% \
X    %%LOCALSTATEDIR%%/openldap-data %%PREFIX%%/etc/openldap/slapd.conf
Xand your server runs with a non-privileged user id.
X
X************************************************************
END-of-net/openldap21-server/pkg-message
echo x - net/openldap21-server/pkg-plist
sed 's/^X//' >net/openldap21-server/pkg-plist << 'END-of-net/openldap21-server/pkg-plist'
X at comment $FreeBSD$
X at unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
X at unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
Xetc/openldap/schema/README
X at 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
Xetc/openldap/schema/corba.schema.default
X at exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
X at 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
Xetc/openldap/schema/core.schema.default
X at exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
X at 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
Xetc/openldap/schema/cosine.schema.default
X at exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
X at 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
Xetc/openldap/schema/inetorgperson.schema.default
X at exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
X at 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
Xetc/openldap/schema/java.schema.default
X at exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
X at 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
Xetc/openldap/schema/misc.schema.default
X at exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
X at 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
Xetc/openldap/schema/nis.schema.default
X at exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
X at 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
Xetc/openldap/schema/openldap.schema.default
X at exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
X at unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
Xetc/openldap/slapd.conf.default
X at exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
X at unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
X at unexec rmdir %D/etc/openldap 2>/dev/null || true
Xetc/rc.d/slapd.sh
Xetc/rc.d/slurpd.sh
Xlibexec/slapd
Xlibexec/slurpd
Xsbin/slapadd
Xsbin/slapcat
Xsbin/slapindex
Xsbin/slappasswd
X at unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
X at unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
X at unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
END-of-net/openldap21-server/pkg-plist
exit
--- openldap21-server.shar ends here ---

--- openldap22-client.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/openldap22-client
#	net/openldap22-client/Makefile
#	net/openldap22-client/files
#	net/openldap22-client/files/manpages
#	net/openldap22-client/pkg-descr
#	net/openldap22-client/pkg-install
#	net/openldap22-client/pkg-message
#	net/openldap22-client/pkg-plist
#
echo c - net/openldap22-client
mkdir -p net/openldap22-client > /dev/null 2>&1
echo x - net/openldap22-client/Makefile
sed 's/^X//' >net/openldap22-client/Makefile << 'END-of-net/openldap22-client/Makefile'
X# New ports collection makefile for:	openldap22-client
X# Date created:				10 Jul 2003
X# Whom:					Oliver Eikemeier <eikemeier at fillmore-labs.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		openldap
X
XCOMMENT=		Open source LDAP client implementation
X
XCLIENT_ONLY=		yes
X
XMASTERDIR=		${.CURDIR}/../openldap22-server
X
X.include "${MASTERDIR}/Makefile"
END-of-net/openldap22-client/Makefile
echo c - net/openldap22-client/files
mkdir -p net/openldap22-client/files > /dev/null 2>&1
echo x - net/openldap22-client/files/manpages
sed 's/^X//' >net/openldap22-client/files/manpages << 'END-of-net/openldap22-client/files/manpages'
X#
X# $FreeBSD$
X#
X
XMAN1+=	ldapcompare.1 \
X	ldapdelete.1 \
X	ldapmodify.1 \
X	ldapmodrdn.1 \
X	ldappasswd.1 \
X	ldapsearch.1 \
X	ldapwhoami.1
XMLINKS+= \
X	ldapmodify.1 ldapadd.1
X
XMAN3+=	lber-decode.3 \
X	lber-encode.3 \
X	lber-memory.3 \
X	lber-types.3 \
X	ldap.3 \
X	ldap_abandon.3 \
X	ldap_add.3 \
X	ldap_bind.3 \
X	ldap_compare.3 \
X	ldap_delete.3 \
X	ldap_error.3 \
X	ldap_first_attribute.3 \
X	ldap_first_entry.3 \
X	ldap_first_message.3 \
X	ldap_first_reference.3 \
X	ldap_get_dn.3 \
X	ldap_get_values.3 \
X	ldap_modify.3 \
X	ldap_modrdn.3 \
X	ldap_open.3 \
X	ldap_parse_reference.3 \
X	ldap_parse_result.3 \
X	ldap_result.3 \
X	ldap_schema.3 \
X	ldap_search.3 \
X	ldap_sort.3 \
X	ldap_url.3
XMLINKS+= \
X	lber-decode.3 ber_first_element.3 \
X	lber-decode.3 ber_get_bitstring.3 \
X	lber-decode.3 ber_get_boolean.3 \
X	lber-decode.3 ber_get_enum.3 \
X	lber-decode.3 ber_get_int.3 \
X	lber-decode.3 ber_get_next.3 \
X	lber-decode.3 ber_get_null.3 \
X	lber-decode.3 ber_get_stringa.3 \
X	lber-decode.3 ber_get_stringb.3 \
X	lber-decode.3 ber_next_element.3 \
X	lber-decode.3 ber_peek_tag.3 \
X	lber-decode.3 ber_scanf.3 \
X	lber-decode.3 ber_skip_tag.3 \
X	lber-encode.3 ber_alloc_t.3 \
X	lber-encode.3 ber_flush.3 \
X	lber-encode.3 ber_printf.3 \
X	lber-encode.3 ber_put_enum.3 \
X	lber-encode.3 ber_put_int.3 \
X	lber-encode.3 ber_put_null.3 \
X	lber-encode.3 ber_put_ostring.3 \
X	lber-encode.3 ber_put_seq.3 \
X	lber-encode.3 ber_put_set.3 \
X	lber-encode.3 ber_put_string.3 \
X	lber-encode.3 ber_start_set.3 \
X	lber-types.3 ber_bvarray_add.3 \
X	lber-types.3 ber_bvarray_free.3 \
X	lber-types.3 ber_bvdup.3 \
X	lber-types.3 ber_bvecadd.3 \
X	lber-types.3 ber_bvecfree.3 \
X	lber-types.3 ber_bvfree.3 \
X	lber-types.3 ber_bvstr.3 \
X	lber-types.3 ber_bvstrdup.3 \
X	lber-types.3 ber_dupbv.3 \
X	lber-types.3 ber_free.3 \
X	lber-types.3 ber_str2bv.3 \
X	ldap_abandon.3 ldap_abandon_ext.3 \
X	ldap_add.3 ldap_add_ext.3 \
X	ldap_add.3 ldap_add_ext_s.3 \
X	ldap_add.3 ldap_add_s.3 \
X	ldap_bind.3 ldap_bind_s.3 \
X	ldap_bind.3 ldap_kerberos_bind1.3 \
X	ldap_bind.3 ldap_kerberos_bind1_s.3 \
X	ldap_bind.3 ldap_kerberos_bind2.3 \
X	ldap_bind.3 ldap_kerberos_bind2_s.3 \
X	ldap_bind.3 ldap_kerberos_bind_s.3 \
X	ldap_bind.3 ldap_sasl_bind.3 \
X	ldap_bind.3 ldap_sasl_bind_s.3 \
X	ldap_bind.3 ldap_simple_bind.3 \
X	ldap_bind.3 ldap_simple_bind_s.3 \
X	ldap_bind.3 ldap_unbind.3 \
X	ldap_bind.3 ldap_unbind_ext.3 \
X	ldap_bind.3 ldap_unbind_ext_s.3 \
X	ldap_bind.3 ldap_unbind_s.3 \
X	ldap_compare.3 ldap_compare_ext.3 \
X	ldap_compare.3 ldap_compare_ext_s.3 \
X	ldap_compare.3 ldap_compare_s.3 \
X	ldap_delete.3 ldap_delete_ext.3 \
X	ldap_delete.3 ldap_delete_ext_s.3 \
X	ldap_delete.3 ldap_delete_s.3 \
X	ldap_error.3 ld_errno.3 \
X	ldap_error.3 ldap_err2string.3 \
X	ldap_error.3 ldap_errlist.3 \
X	ldap_error.3 ldap_perror.3 \
X	ldap_error.3 ldap_result2error.3 \
X	ldap_first_attribute.3 ldap_next_attribute.3 \
X	ldap_first_entry.3 ldap_count_entries.3 \
X	ldap_first_entry.3 ldap_next_entry.3 \
X	ldap_first_message.3 ldap_count_messages.3 \
X	ldap_first_message.3 ldap_next_message.3 \
X	ldap_first_reference.3 ldap_count_references.3 \
X	ldap_first_reference.3 ldap_next_reference.3 \
X	ldap_get_dn.3 ldap_dcedn2dn.3 \
X	ldap_get_dn.3 ldap_dn2ad_canonical.3 \
X	ldap_get_dn.3 ldap_dn2dcedn.3 \
X	ldap_get_dn.3 ldap_dn2str.3 \
X	ldap_get_dn.3 ldap_dn2ufn.3 \
X	ldap_get_dn.3 ldap_explode_dn.3 \
X	ldap_get_dn.3 ldap_explode_rdn.3 \
X	ldap_get_dn.3 ldap_str2dn.3 \
X	ldap_get_values.3 ldap_count_values.3 \
X	ldap_get_values.3 ldap_count_values_len.3 \
X	ldap_get_values.3 ldap_get_values_len.3 \
X	ldap_get_values.3 ldap_value_free.3 \
X	ldap_get_values.3 ldap_value_free_len.3 \
X	ldap_modify.3 ldap_modify_ext.3 \
X	ldap_modify.3 ldap_modify_ext_s.3 \
X	ldap_modify.3 ldap_modify_s.3 \
X	ldap_modify.3 ldap_mods_free.3 \
X	ldap_modrdn.3 ldap_modrdn2.3 \
X	ldap_modrdn.3 ldap_modrdn2_s.3 \
X	ldap_modrdn.3 ldap_modrdn_s.3 \
X	ldap_open.3 ldap_init.3 \
X	ldap_parse_result.3 ldap_parse_extended_result.3 \
X	ldap_parse_result.3 ldap_parse_sasl_bind_result.3 \
X	ldap_result.3 ldap_msgfree.3 \
X	ldap_result.3 ldap_msgid.3 \
X	ldap_result.3 ldap_msgtype.3 \
X	ldap_schema.3 ldap_attributetype2name.3 \
X	ldap_schema.3 ldap_attributetype2str.3 \
X	ldap_schema.3 ldap_attributetype_free.3 \
X	ldap_schema.3 ldap_matchingrule2name.3 \
X	ldap_schema.3 ldap_matchingrule2str.3 \
X	ldap_schema.3 ldap_matchingrule_free.3 \
X	ldap_schema.3 ldap_objectclass2name.3 \
X	ldap_schema.3 ldap_objectclass2str.3 \
X	ldap_schema.3 ldap_objectclass_free.3 \
X	ldap_schema.3 ldap_scherr2str.3 \
X	ldap_schema.3 ldap_str2attributetype.3 \
X	ldap_schema.3 ldap_str2matchingrule.3 \
X	ldap_schema.3 ldap_str2objectclass.3 \
X	ldap_schema.3 ldap_str2syntax.3 \
X	ldap_schema.3 ldap_syntax2name.3 \
X	ldap_schema.3 ldap_syntax2str.3 \
X	ldap_schema.3 ldap_syntax_free.3 \
X	ldap_search.3 ldap_search_ext.3 \
X	ldap_search.3 ldap_search_ext_s.3 \
X	ldap_search.3 ldap_search_s.3 \
X	ldap_search.3 ldap_search_st.3 \
X	ldap_sort.3 ldap_sort_entries.3 \
X	ldap_sort.3 ldap_sort_strcasecmp.3 \
X	ldap_sort.3 ldap_sort_values.3 \
X	ldap_url.3 ldap_free_urldesc.3 \
X	ldap_url.3 ldap_is_ldap_url.3 \
X	ldap_url.3 ldap_url_parse.3
X
XMAN5+=	ldap.conf.5 \
X	ldif.5 \
X	slapd-bdb.5 \
X	slapd-dnssrv.5 \
X	slapd-ldap.5 \
X	slapd-ldbm.5 \
X	slapd-meta.5 \
X	slapd-monitor.5 \
X	slapd-null.5 \
X	slapd-passwd.5 \
X	slapd-perl.5 \
X	slapd-shell.5 \
X	slapd-sql.5 \
X	slapd-tcl.5 \
X	slapd.access.5 \
X	slapd.conf.5 \
X	slapd.plugin.5 \
X	slapd.replog.5
X
XMAN8+=	slapadd.8 \
X	slapcat.8 \
X	slapd.8 \
X	slapindex.8 \
X	slappasswd.8 \
X	slurpd.8
END-of-net/openldap22-client/files/manpages
echo x - net/openldap22-client/pkg-descr
sed 's/^X//' >net/openldap22-client/pkg-descr << 'END-of-net/openldap22-client/pkg-descr'
XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
Xclients, utilities and development tools.
X
XThis release includes the following major components:
X
X * -lldap - a LDAP client library
X * -llber - a lightweight BER/DER encoding/decoding library
X * LDAP tools - A collection of command line LDAP utilities
X * documentation - man pages for all components
X
XThis release is meant for testing purposes only, it is not for general use.
X
XWWW: http://www.OpenLDAP.org/
X
X- Oliver Eikemeier
Xeikemeier at fillmore-labs.com
END-of-net/openldap22-client/pkg-descr
echo x - net/openldap22-client/pkg-install
sed 's/^X//' >net/openldap22-client/pkg-install << 'END-of-net/openldap22-client/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
Xif [ X"$2" != X"POST-INSTALL" ]; then
X    exit 0;
Xfi
X
END-of-net/openldap22-client/pkg-install
echo x - net/openldap22-client/pkg-message
sed 's/^X//' >net/openldap22-client/pkg-message << 'END-of-net/openldap22-client/pkg-message'
X************************************************************
X
XThe OpenLDAP package has been successfully installed.
X
XEdit
X  %%PREFIX%%/etc/openldap/ldap.conf
Xto change the system-wide client defaults.
X
X************************************************************
END-of-net/openldap22-client/pkg-message
echo x - net/openldap22-client/pkg-plist
sed 's/^X//' >net/openldap22-client/pkg-plist << 'END-of-net/openldap22-client/pkg-plist'
X at comment $FreeBSD$
Xbin/ldapadd
Xbin/ldapcompare
Xbin/ldapdelete
Xbin/ldapmodify
Xbin/ldapmodrdn
Xbin/ldappasswd
Xbin/ldapsearch
Xbin/ldapwhoami
X at unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi
Xetc/openldap/ldap.conf.default
X at exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf
X at unexec rmdir %D/etc/openldap 2>/dev/null || true
Xinclude/lber.h
Xinclude/lber_types.h
Xinclude/ldap.h
Xinclude/ldap_cdefs.h
Xinclude/ldap_features.h
Xinclude/ldap_schema.h
Xinclude/ldap_utf8.h
Xinclude/slapi-plugin.h
Xlib/liblber.a
Xlib/liblber.so
Xlib/liblber.so.2
Xlib/libldap.a
Xlib/libldap.so
Xlib/libldap.so.2
Xlib/libldap_r.a
Xlib/libldap_r.so
Xlib/libldap_r.so.2
Xshare/openldap/ucdata/case.dat
Xshare/openldap/ucdata/cmbcl.dat
Xshare/openldap/ucdata/comp.dat
Xshare/openldap/ucdata/ctype.dat
Xshare/openldap/ucdata/decomp.dat
Xshare/openldap/ucdata/kdecomp.dat
Xshare/openldap/ucdata/num.dat
X at dirrm share/openldap/ucdata
X at dirrm share/openldap
END-of-net/openldap22-client/pkg-plist
exit
--- openldap22-client.shar ends here ---

--- openldap22-server.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/openldap22-server
#	net/openldap22-server/Makefile
#	net/openldap22-server/distinfo
#	net/openldap22-server/files
#	net/openldap22-server/files/extrapatch-Makefile.in
#	net/openldap22-server/files/patch-build::top.mk
#	net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c
#	net/openldap22-server/files/patch-libraries::liblutil::passwd.c
#	net/openldap22-server/files/patch-servers::slapd::back-perl
#	net/openldap22-server/files/patch-servers::slapd::daemon.c
#	net/openldap22-server/files/slapd.sh
#	net/openldap22-server/files/slurpd.sh
#	net/openldap22-server/pkg-descr
#	net/openldap22-server/pkg-install
#	net/openldap22-server/pkg-message
#	net/openldap22-server/pkg-plist
#
echo c - net/openldap22-server
mkdir -p net/openldap22-server > /dev/null 2>&1
echo x - net/openldap22-server/Makefile
sed 's/^X//' >net/openldap22-server/Makefile << 'END-of-net/openldap22-server/Makefile'
X# New ports collection makefile for:	openldap22-server
X# Date created:				10 Jul 2003
X# Whom:					Oliver Eikemeier
X#
X# $FreeBSD$
X#
X
XPORTNAME=		openldap
XPORTVERSION=		${OPENLDAP_VERSION}.a
XPORTREVISION=		${OPENLDAP_PORTVERSION}
XCATEGORIES=		net databases
XMASTER_SITES=		ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
X			http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
X			ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \
X			ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \
X			ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
X			ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \
X			ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \
X			ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \
X			http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \
X			ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
XMASTER_SITE_SUBDIR=	openldap-test
XPKGNAMESUFFIX=		${OPENLDAP_PKGNAMESUFFIX}
XDISTNAME=		openldap-${OPENLDAP_VERSION}alpha
XEXTRACT_SUFX=		.tgz
X
XMAINTAINER=		eikemeier at fillmore-labs.com
XCOMMENT?=		Open source LDAP server implementation
X
XOPENLDAP_VERSION=	2.2.0
X
XLATEST_LINK=		${PKGNAMEPREFIX}openldap22${PKGNAMESUFFIX}
XCONFLICTS=		${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-*
X
XWANT_OPENLDAP_VER?=	22
X.if ${WANT_OPENLDAP_VER} != 22
XBROKEN=			"incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
X.endif
X
X.if defined(CLIENT_ONLY)
XOPENLDAP_PORTVERSION=	0
XOPENLDAP_PKGNAMESUFFIX?=-client
X.else
XOPENLDAP_PORTVERSION=	0
XOPENLDAP_PKGNAMESUFFIX?=-server
X
XLIB_DEPENDS+=		ldap.2:${PORTSDIR}/net/openldap22-client
X.endif
X
XUSE_OPENSSL=		yes
XUSE_REINPLACE=		yes
XUSE_LIBTOOL_VER=	14
X
XDESCR=			${.CURDIR}/pkg-descr
XPLIST=			${WRKDIR}/pkg-plist
XPKGINSTALL=		${WRKDIR}/pkg-install
XPKGMESSAGE=		${WRKDIR}/pkg-message
X
XLOCALSTATEDIR?=		${DESTDIR}/var/db
XLDAP_RUN_DIR?=		${DESTDIR}/var/run/openldap
X
XPLIST_SUB+=		LOCALSTATEDIR=${LOCALSTATEDIR} \
X			LDAP_RUN_DIR=${LDAP_RUN_DIR}
X
XSED_SCRIPT=		-e 's,%%PREFIX%%,${PREFIX},g' \
X			-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
X			-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
X
XCONFIGURE_ARGS=		--with-threads \
X			--with-tls=openssl \
X			--enable-dynamic
X
X.if defined(WITH_SASL)
XLIB_DEPENDS+=		sasl2.2:${PORTSDIR}/security/cyrus-sasl2
XCONFIGURE_ARGS+=	--with-cyrus-sasl
X.else
XCONFIGURE_ARGS+=	--without-cyrus-sasl
X.endif
X
X.if defined(CLIENT_ONLY)
X# client specific configuration
X
XCONFIGURE_ARGS+=	--disable-slapd
X
XINSTALLS_SHLIB=	yes
X
X.else
X# server specific configuration
X
XEXTRA_PATCHES+=		${FILESDIR}/extrapatch-Makefile.in
X
XCONFIGURE_ARGS+=	--localstatedir=${LOCALSTATEDIR} \
X			--enable-ldbm \
X			--with-ldbm-api=berkeley \
X			--enable-lmpasswd \
X			--enable-ldap \
X			--enable-meta \
X			--enable-rewrite \
X			--enable-null \
X			--enable-monitor
X
XWITH_BDB_VER?=		41
X
X.if ${WITH_BDB_VER} == 41
XLIB_DEPENDS+=		db41.1:${PORTSDIR}/databases/db41
XCONFIGURE_ARGS+=	--enable-bdb
X.elif ${WITH_BDB_VER} == 4
XLIB_DEPENDS+=		db4.0:${PORTSDIR}/databases/db4
XCONFIGURE_ARGS+=	--disable-bdb
X.elif ${WITH_BDB_VER} == 3
XLIB_DEPENDS+=		db3.3:${PORTSDIR}/databases/db3
XCONFIGURE_ARGS+=	--disable-bdb
X.else
X.error WITH_BDB_VER must be 3, 4 or 41
X.endif
XLIBS+=			-ldb${WITH_BDB_VER}
XCPPFLAGS+=		-I${LOCALBASE}/include/db${WITH_BDB_VER}
X
X.if defined(WITH_SHELL)
XCONFIGURE_ARGS+=	--enable-shell
X.endif
X
X.if defined(WITH_PERL)
XUSE_PERL5=	yes
XCONFIGURE_ARGS+=	--enable-perl
X.endif
X
X.if defined(WITH_SASL)
XCONFIGURE_ARGS+=	--enable-spasswd
X.endif
X
X.if defined(WITH_ODBC)
XLIB_DEPENDS+=		iodbc.3:${PORTSDIR}/databases/libiodbc
XCONFIGURE_ARGS+=	--enable-sql
X.endif
X
X.if defined(WITH_SLAPI)
XLIB_DEPENDS+=		ltdl.4:${PORTSDIR}/devel/libltdl
XCONFIGURE_ARGS+=	--enable-slapi
XPLIST_SUB+=		SLAPI=""
X.else
XPLIST_SUB+=		SLAPI="@comment "
X.endif
X
X# Include tcp-wrapper support
X.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
XCONFIGURE_ARGS+=	--enable-wrappers
X.endif
X
X# end of client/server specific configuration
X.endif
X
X# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
XCPPFLAGS+=		-D_REENTRANT ${PTHREAD_CFLAGS} \
X			-I${LOCALBASE}/include
XLDFLAGS+=		-L${LOCALBASE}/lib
X
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XCONFIGURE_ENV=		CPPFLAGS="${CPPFLAGS}" \
X			LDFLAGS="${LDFLAGS}" \
X			LIBS="${LIBS}"
X
X.include <bsd.port.pre.mk>
X
X.if defined(CLIENT_ONLY)
X.include "${.CURDIR}/files/manpages"
X.endif
X
Xpre-everything::
X	@${ECHO} "============================================================="
X	@${ECHO}
X	@${ECHO} "You can build ${PKGNAME} with the following options:"
X	@${ECHO}
X.if defined(CLIENT_ONLY)
X	@${ECHO} "WITH_SASL             with (Cyrus) SASL2 support"
X.else
X	@${ECHO} "WITH_BDB_VER          select BerkeleyDB version (default 4.1)"
X	@${ECHO} "WITH_SASL             with (Cyrus) SASL2 password verification"
X	@${ECHO} "WITH_PERL             with Perl backend"
X	@${ECHO} "WITH_SHELL            with Shell backend"
X	@${ECHO} "WITH_ODBC             with SQL backend"
X	@${ECHO} "WITH_SLAPI            with Netscape SLAPI plugin API
X	@${ECHO} "WITHOUT_TCP_WRAPPERS  without tcp wrapper support"
X.endif
X	@${ECHO}
X	@${ECHO} "============================================================="
X	@${ECHO}
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
X		${WRKSRC}/servers/slapd/slapd.conf
X
Xpre-configure:
X	@${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \
X		${WRKSRC}/configure
X
Xpost-build:
X.for script in slapd.sh slurpd.sh
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
X.endfor
X.for text in pkg-install pkg-message
X	@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
X.endfor
X
X.if !defined(CLIENT_ONLY)
Xtest: build
X	@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
X		${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test
X.endif
X
Xpre-install:
X	@${CP} ${.CURDIR}/pkg-plist ${PLIST}
X.if defined(CLIENT_ONLY)
X.if !defined(NOPORTDOCS)
X	@for dir in rfc drafts; do \
X		${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
X			| ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
X			>>${PLIST}; \
X		${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
X	done
X	@${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
X.endif
X.endif
X
Xpost-install:
X.if defined(CLIENT_ONLY)
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@for dir in rfc drafts; do \
X		${MKDIR} ${DOCSDIR}/$${dir}; \
X		${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
X			-exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
X	done
X.endif
X.else
X.for script in slapd.sh slurpd.sh
X	@${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}
X.endfor
X	@${MKDIR} ${LDAP_RUN_DIR}
X	@${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.post.mk>
END-of-net/openldap22-server/Makefile
echo x - net/openldap22-server/distinfo
sed 's/^X//' >net/openldap22-server/distinfo << 'END-of-net/openldap22-server/distinfo'
XMD5 (openldap-2.2.0alpha.tgz) = 72fe342067b717a37b9697898dacfa0a
END-of-net/openldap22-server/distinfo
echo c - net/openldap22-server/files
mkdir -p net/openldap22-server/files > /dev/null 2>&1
echo x - net/openldap22-server/files/extrapatch-Makefile.in
sed 's/^X//' >net/openldap22-server/files/extrapatch-Makefile.in << 'END-of-net/openldap22-server/files/extrapatch-Makefile.in'
X--- Makefile.in.orig	Mon Apr  7 22:23:24 2003
X+++ Makefile.in	Thu Jul 10 17:43:35 2003
X@@ -10,9 +10,11 @@
X ## in file LICENSE in the top-level directory of the distribution.
X ##
X 
X-SUBDIRS= include libraries clients servers tests doc
X-CLEANDIRS=
X-INSTALLDIRS= 
X+SUBDIRS=
X+ALLDIRS= include libraries clients servers tests doc
X+CLEANDIRS= include libraries clients servers tests doc
X+DEPENDDIRS= include libraries clients servers tests doc
X+INSTALLDIRS=  servers
X 
X makefiles:	FORCE
X 	./config.status
END-of-net/openldap22-server/files/extrapatch-Makefile.in
echo x - net/openldap22-server/files/patch-build::top.mk
sed 's/^X//' >net/openldap22-server/files/patch-build::top.mk << 'END-of-net/openldap22-server/files/patch-build::top.mk'
X--- build/top.mk.orig	Mon Apr  7 22:23:26 2003
X+++ build/top.mk	Mon Jul  7 05:35:52 2003
X@@ -192,6 +192,8 @@
X SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@
X SLURPD_LIBS = @SLURPD_LIBS@
X 
X+SLAPI_LIBS = @SLAPI_LIBS@
X+
X # Our Defaults
X CC = $(AC_CC)
X DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
END-of-net/openldap22-server/files/patch-build::top.mk
echo x - net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c
sed 's/^X//' >net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c << 'END-of-net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c'
X--- libraries/liblunicode/ucstr.c.orig	Fri Apr 11 03:57:10 2003
X+++ libraries/liblunicode/ucstr.c	Sun Jul  6 02:50:32 2003
X@@ -10,7 +10,7 @@
X #include <ac/string.h>
X #include <ac/stdlib.h>
X 
X-#include <lber.h>
X+#include <lber_pvt.h>
X 
X #include <ldap_utf8.h>
X #include <ldap_pvt_uc.h>
END-of-net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c
echo x - net/openldap22-server/files/patch-libraries::liblutil::passwd.c
sed 's/^X//' >net/openldap22-server/files/patch-libraries::liblutil::passwd.c << 'END-of-net/openldap22-server/files/patch-libraries::liblutil::passwd.c'
X#
X# ITS#2562: add missing arg to hash_lanman
X#
X--- libraries/liblutil/passwd.c.orig	Fri May  2 13:29:29 2003
X+++ libraries/liblutil/passwd.c	Sun Jun 22 03:08:18 2003
X@@ -632,7 +632,7 @@
X {
X 	struct berval *hash;
X 
X-	hash = hash_lanman( scheme, cred );
X+	hash = hash_lanman( scheme, cred, text );
X 	return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32);
X }
X #endif /* SLAPD_LMHASH */
END-of-net/openldap22-server/files/patch-libraries::liblutil::passwd.c
echo x - net/openldap22-server/files/patch-servers::slapd::back-perl
sed 's/^X//' >net/openldap22-server/files/patch-servers::slapd::back-perl << 'END-of-net/openldap22-server/files/patch-servers::slapd::back-perl'
Xdiff -Nur servers/slapd/back-perl/add.c.orig servers/slapd/back-perl/add.c
X--- servers/slapd/back-perl/add.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/add.c	Thu Jun  5 11:44:06 2003
X@@ -13,17 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/bind.c.orig servers/slapd/back-perl/bind.c
X--- servers/slapd/back-perl/bind.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/bind.c	Thu Jun  5 11:44:06 2003
X@@ -13,18 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-/* init.c - initialize Perl backend */
X-	
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+	
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/close.c.orig servers/slapd/back-perl/close.c
X--- servers/slapd/back-perl/close.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/close.c	Thu Jun  5 11:44:06 2003
X@@ -13,18 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-/* init.c - initialize shell backend */
X-	
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+	
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/compare.c.orig servers/slapd/back-perl/compare.c
X--- servers/slapd/back-perl/compare.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/compare.c	Thu Jun  5 11:44:06 2003
X@@ -13,17 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "lutil.h"
X #include "perl_back.h"
Xdiff -Nur servers/slapd/back-perl/config.c.orig servers/slapd/back-perl/config.c
X--- servers/slapd/back-perl/config.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/config.c	Thu Jun  5 11:44:06 2003
X@@ -13,17 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-	
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+	
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/delete.c.orig servers/slapd/back-perl/delete.c
X--- servers/slapd/back-perl/delete.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/delete.c	Thu Jun  5 11:44:06 2003
X@@ -13,17 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/init.c.orig servers/slapd/back-perl/init.c
X--- servers/slapd/back-perl/init.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/init.c	Thu Jun 12 22:25:21 2003
X@@ -13,18 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X- /* init.c - initialize shell backend */
X-	
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+	
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
X@@ -37,7 +38,7 @@
X 
X #ifdef SLAPD_PERL_DYNAMIC
X 
X-int back_perl_LTX_init_module(int argc, char *argv[])
X+int init_module(int argc, char *argv[])
X {
X 	BackendInfo bi;
X 
Xdiff -Nur servers/slapd/back-perl/modify.c.orig servers/slapd/back-perl/modify.c
X--- servers/slapd/back-perl/modify.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/modify.c	Thu Jun  5 11:44:06 2003
X@@ -13,17 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/modrdn.c.orig servers/slapd/back-perl/modrdn.c
X--- servers/slapd/back-perl/modrdn.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/modrdn.c	Thu Jun  5 11:44:06 2003
X@@ -26,17 +26,19 @@
X  *
X  */
X 
X-#include "portable.h"
X-
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
Xdiff -Nur servers/slapd/back-perl/search.c.orig servers/slapd/back-perl/search.c
X--- servers/slapd/back-perl/search.c.orig	Sun May 25 03:56:59 2003
X+++ servers/slapd/back-perl/search.c	Thu Jun  5 11:44:06 2003
X@@ -13,17 +13,19 @@
X  *	 in file LICENSE in the top-level directory of the distribution.
X  */
X 
X-#include "portable.h"
X-
X-#include <stdio.h>
X+#include <EXTERN.h>
X+#include <perl.h>
X+#undef _ /* #defined used by both Perl and ac/localize.h */
X 
X-#include "slap.h"
X #ifdef HAVE_WIN32_ASPERL
X #include "asperl_undefs.h"
X #endif
X 
X-#include <EXTERN.h>
X-#include <perl.h>
X+#include "portable.h"
X+
X+#include <stdio.h>
X+
X+#include "slap.h"
X 
X #include "perl_back.h"
X 
END-of-net/openldap22-server/files/patch-servers::slapd::back-perl
echo x - net/openldap22-server/files/patch-servers::slapd::daemon.c
sed 's/^X//' >net/openldap22-server/files/patch-servers::slapd::daemon.c << 'END-of-net/openldap22-server/files/patch-servers::slapd::daemon.c'
X--- servers/slapd/daemon.c.orig	Sat May 24 21:12:20 2003
X+++ servers/slapd/daemon.c	Sun Jun 22 19:26:22 2003
X@@ -858,7 +858,7 @@
X #ifdef LDAP_PF_LOCAL
X 	case AF_LOCAL: {
X 		char *addr = ((struct sockaddr_un *)*sal)->sun_path;
X-#if 0 /* don't muck with socket perms */
X+#if 1
X 		if ( chmod( addr, l.sl_perms ) < 0 && crit ) {
X 			int err = sock_errno();
X #ifdef NEW_LOGGING
END-of-net/openldap22-server/files/patch-servers::slapd::daemon.c
echo x - net/openldap22-server/files/slapd.sh
sed 's/^X//' >net/openldap22-server/files/slapd.sh << 'END-of-net/openldap22-server/files/slapd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X
Xslapd_program=%%PREFIX%%/libexec/slapd
X
Xslapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
X
Xslapd_enable="NO"
X
Xslapd_args=
X
X# Add the following lines to /etc/rc.conf to enable slapd:
X#
X#slapd_enable="YES"
X#slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
X#
X# See sldap(8) for details
X#
X# Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args
X# if you want to run slapd as a non-privileged user (recommended)
X#
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X    . /etc/defaults/rc.conf
X    source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X    . /etc/rc.conf
Xfi
X
Xcase "$slapd_enable" in
X[Yy][Ee][Ss])
X    case "$1" in
X    start)
X        if [ -x ${slapd_program} ]; then
X            echo -n ' slapd'
X            eval ${slapd_program} ${slapd_args}
X        fi
X        ;;
X    stop)
X        if [ -f $slapd_pidfile ]; then
X            kill `cat $slapd_pidfile`
X            echo -n ' slapd'
X        else
X            echo ' slapd: not running'
X        fi
X        ;;
X    *)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
X    esac
X    ;;
X*)
X    ;;
Xesac
X
Xexit 0
END-of-net/openldap22-server/files/slapd.sh
echo x - net/openldap22-server/files/slurpd.sh
sed 's/^X//' >net/openldap22-server/files/slurpd.sh << 'END-of-net/openldap22-server/files/slurpd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X
Xslurpd_program=%%PREFIX%%/libexec/slurpd
X
Xslurpd_enable="NO"
X
Xslurpd_args=
X
X# Add the following line to /etc/rc.conf to enable slurpd:
X#
X#slurpd_enable="YES"
X#
X# See slurpd(8) for details
X#
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X    . /etc/defaults/rc.conf
X    source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X    . /etc/rc.conf
Xfi
X
Xcase "$slurpd_enable" in
X[Yy][Ee][Ss])
X    case "$1" in
X    start)
X        if [ -x ${slurpd_program} ]; then
X            echo -n ' slurpd'
X            ${slurpd_program} ${slurpd_args} 
X        fi
X        ;;
X    stop)
X        if ! killall `basename ${slurpd_program}`; then
X            echo ' slurpd: not running'
X        fi
X        ;;
X    *)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
X    esac
X    ;;
X*)
X    ;;
Xesac
X
Xexit 0
END-of-net/openldap22-server/files/slurpd.sh
echo x - net/openldap22-server/pkg-descr
sed 's/^X//' >net/openldap22-server/pkg-descr << 'END-of-net/openldap22-server/pkg-descr'
XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
Xclients, utilities and development tools.
X
XThis release includes the following major components:
X
X * slapd - a stand-alone LDAP directory server
X * slurpd - a stand-alone LDAP replication server
X * LDIF tools - data conversion tools for use with slapd
X
XThis release is meant for testing purposes only, it is not for general use.
X
XWWW: http://www.OpenLDAP.org/
X
X- Oliver Eikemeier
Xeikemeier at fillmore-labs.com
END-of-net/openldap22-server/pkg-descr
echo x - net/openldap22-server/pkg-install
sed 's/^X//' >net/openldap22-server/pkg-install << 'END-of-net/openldap22-server/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
Xif [ X"$2" != X"POST-INSTALL" ]; then
X    exit 0;
Xfi
X
Xmkdir -p "%%LDAP_RUN_DIR%%"
Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data"
Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp"
END-of-net/openldap22-server/pkg-install
echo x - net/openldap22-server/pkg-message
sed 's/^X//' >net/openldap22-server/pkg-message << 'END-of-net/openldap22-server/pkg-message'
X************************************************************
X
XThe OpenLDAP server package has been successfully installed.
X
XIn order to run the LDAP server, you need to edit
X  %%PREFIX%%/etc/openldap/slapd.conf
Xto suit your needs and add the next lines to /etc/rc.conf:
X  slapd_enable="YES"
X  slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"'
X
XThen start the server with
X  %%PREFIX%%/etc/rc.d/slapd.sh start
Xor reboot.
X
XNOTE: There is no real reason to run slapd as root. Add
X  '-u ldap -g ldap'
Xto slapd_args, create a user "ldap" with
X  pw add group ldap -g 389
X  pw add user ldap -u 389 -g 389 -d /nonexistent \
X    -c "OpenLDAP Server" -s /sbin/nologin -p "*"
Xand do
X  chown -R ldap:ldap %%LDAP_RUN_DIR%% \
X    %%LOCALSTATEDIR%%/openldap-data %%PREFIX%%/etc/openldap/slapd.conf
Xand your server runs with a non-privileged user id.
X
X************************************************************
END-of-net/openldap22-server/pkg-message
echo x - net/openldap22-server/pkg-plist
sed 's/^X//' >net/openldap22-server/pkg-plist << 'END-of-net/openldap22-server/pkg-plist'
X at comment $FreeBSD$
X at unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true
X at unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true
Xetc/openldap/schema/README
X at 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
Xetc/openldap/schema/corba.schema.default
X at exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema
X at 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
Xetc/openldap/schema/core.schema.default
X at exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema
X at 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
Xetc/openldap/schema/cosine.schema.default
X at exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema
X at 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
Xetc/openldap/schema/inetorgperson.schema.default
X at exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema
X at 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
Xetc/openldap/schema/java.schema.default
X at exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema
X at 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
Xetc/openldap/schema/misc.schema.default
X at exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema
X at 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
Xetc/openldap/schema/nis.schema.default
X at exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema
X at 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
Xetc/openldap/schema/openldap.schema.default
X at exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema
X at unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
Xetc/openldap/slapd.conf.default
X at exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
X at unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
X at unexec rmdir %D/etc/openldap 2>/dev/null || true
Xetc/rc.d/slapd.sh
Xetc/rc.d/slurpd.sh
X%%SLAPI%%lib/libslapi.a
X%%SLAPI%%lib/libslapi.so
X%%SLAPI%%lib/libslapi.so.2
Xlibexec/slapd
Xlibexec/slurpd
Xsbin/slapadd
Xsbin/slapcat
Xsbin/slapindex
Xsbin/slappasswd
X at unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
X at unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
X at unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
END-of-net/openldap22-server/pkg-plist
exit
--- openldap22-server.shar ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list