# $Id: Portfile,v 1.12 2005/09/14 17:07:56 landonf Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-ldap
version			2.0.8
revision		1
categories		python
platforms		darwin
maintainers		mww@opendarwin.org
description		object-oriented api for python to access LDAP directory servers
long_description	python-ldap provides an object-oriented API to access \
				LDAP directory servers from Python programs. Mainly it \
				wraps the OpenLDAP 2.x libs for that purpose. \
				Additionally the package contains modules for other \
				LDAP-related stuff (e.g. processing LDIF, LDAPURLs, \
				LDAPv3 schema, etc.).

homepage		http://python-ldap.sourceforge.net/
master_sites	sourceforge:python-ldap
distname		python-ldap-${version}
checksums		md5 69bf92673fba5c1965fdabcc98ea2941
patchfiles		patch-setup.cfg.diff

depends_lib		port:openldap port:openssl port:cyrus-sasl2

configure {
	reinplace "s|__LIBDIR__|${prefix}/lib|g" ${worksrcpath}/setup.cfg
	reinplace "s|__INCDIR__|${prefix}/include ${prefix}/include/sasl|g" ${worksrcpath}/setup.cfg
	reinplace "s|__LIBS__|ldap_r lber ssl crypto sasl2|g" ${worksrcpath}/setup.cfg
}

post-destroot {
	xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} CHANGES INSTALL LICENCE README TODO \
		${destroot}${prefix}/share/doc/${name}
}
