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

PortSystem 1.0
PortGroup python26 1.0

name			py26-ldap
version			2.3.10
revision        1
categories		python
platforms		darwin
maintainers		gmail.com:mdippery
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     564d741a7c6d5fdcb45322fe9262d1a5 \
                sha1    b15c15a71956c5f51a3642e513c206cf03d6248e \
                rmd160  1784203fdb90b484c4d11edc032883ae75a64c84
patchfiles		patch-setup.cfg.diff patch-constants.c.diff \
                patch-options.c.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}
}

livecheck.type  regex
livecheck.url   http://pypi.python.org/pypi/python-ldap/
livecheck.regex python-ldap (\[0-9\]+\.\[0-9\]+\.\[0-9\]+)
