# $Id: Portfile 69520 2010-07-08 20:19:52Z jmr@macports.org $

PortSystem 1.0
PortGroup python25 1.0

name			py25-ldap
version			2.3.7
revision        1
categories		python
platforms		darwin
maintainers		nomaintainer
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://www.python-ldap.org/
master_sites		http://pypi.python.org/packages/source/p/python-ldap/
distname		python-ldap-${version}
checksums           	md5     b080feba004e626b6d4972d19914140b \
                    	sha1    7c56b7faac909cad03d4218d32097f08073bfca7 \
                    	rmd160  551af411ef7c465da82b553ee02b3270de7f7909
patchfiles		patch-setup.cfg.diff

depends_lib-append	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}
}

