# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $

PortSystem 1.0
PortGroup python25 1.0

name			py25-pgsql
version			2.5.1
revision		2
categories		python databases
platforms		darwin
maintainers		geeklair.net:dluke
description		python DB-API 2.0 compliant interface to postgresql (8.3)
long_description	pyPgSQL is a package of two modules that provide a \
				Python DB-API 2.0 compliant interface to PostgreSQL \
				databases. The first module, libpq, exports the \
				PostgreSQL C API to Python. This module is written in \
				C and can be compiled into Python or can be \
				dynamically loaded on demand. The second module, \
				PgSQL, provides the DB-API 2.0 compliant interface and \
				support for various PostgreSQL data types, such as \
				INT8, NUMERIC, MONEY, BOOL, ARRAYS, etc.

homepage		http://pypgsql.sourceforge.net/
master_sites	sourceforge:pypgsql
distname		pyPgSQL-${version}
checksums		sha1 ae286d2b0b0e6896223430887dd244e9eeef705b

depends_lib-append	port:postgresql83 port:py25-mx-base

build.env		PATH="${prefix}/lib/postgresql83/bin:$env(PATH)"
destroot.env	${build.env}

post-destroot {
	xinstall -m 644 -W ${worksrcpath} Announce ChangeLog README \
		README.html ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath}/examples basic.py demo1a.py \
		demo1b.py demo2a.py demo2b.py \
		${destroot}${prefix}/share/doc/${name}/examples
}
