diff --git a/databases/Makefile b/databases/Makefile index 4e8fdf89877b..41ec30034bda 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -86,6 +86,7 @@ SUBDIR += py-SQLDict SUBDIR += py-bsddb3 SUBDIR += py-gdbm + SUBDIR += py-pyPgSQL SUBDIR += py-sqlrelay SUBDIR += rdb SUBDIR += ruby-bdb diff --git a/databases/py-pyPgSQL/Makefile b/databases/py-pyPgSQL/Makefile new file mode 100644 index 000000000000..680859814d44 --- /dev/null +++ b/databases/py-pyPgSQL/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: py-pypgsql +# Date created: 01 Nov 2001 +# Whom: Gerhard Haering +# +# $FreeBSD$ +# + +PORTNAME= pyPgSQL +PORTVERSION= 1.6 +CATEGORIES= databases python +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= pypgsql +PKGNAMEPREFIX= py- +DISTNAME= pypgsql-${PORTVERSION} + +MAINTAINER= gerhard@bigfoot.de + +BUILD_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base +RUN_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base +LIB_DEPENDS= pq.2:${PORTSDIR}/databases/postgresql7 + +WRKSRC= ${WRKDIR}/pypgsql +USE_PYTHON= yes +SETUP_CMD= cd ${WRKSRC} && ${PYTHON_CMD} setup.py + +DOCS= README + +PLIST_SUB+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g} + +DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py + +post-patch: + perl -i -p \ + -e 's#^include_dirs = \[ "/usr/local/pgsql/include" \]#include_dirs = [ "${LOCALBASE}/include/pgsql" ]# ;' \ + -e 's#^library_dirs = \[ "/usr/local/pgsql/lib" \]#library_dirs = [ "${LOCALBASE}/lib" ]#' \ + ${WRKSRC}/setup.py + +do-build: + ${SETUP_CMD} build_ext --inplace + +do-install: + ${SETUP_CMD} install +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for file in ${DOCS} + @${INSTALL_MAN} ${WRKSRC}/${file} ${DOCSDIR} +.endfor +.endif + +.include diff --git a/databases/py-pyPgSQL/distinfo b/databases/py-pyPgSQL/distinfo new file mode 100644 index 000000000000..d40100d58b7e --- /dev/null +++ b/databases/py-pyPgSQL/distinfo @@ -0,0 +1 @@ +MD5 (pypgsql-1.6.tar.gz) = 3804f543cbe6cb2805eecc4c44913aea diff --git a/databases/py-pyPgSQL/pkg-comment b/databases/py-pyPgSQL/pkg-comment new file mode 100644 index 000000000000..bd8c0b14b657 --- /dev/null +++ b/databases/py-pyPgSQL/pkg-comment @@ -0,0 +1 @@ +A Python DB-API 2 compliant library for using PostgreSQL databases diff --git a/databases/py-pyPgSQL/pkg-descr b/databases/py-pyPgSQL/pkg-descr new file mode 100644 index 000000000000..fca21ad66902 --- /dev/null +++ b/databases/py-pyPgSQL/pkg-descr @@ -0,0 +1,12 @@ +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. This module is +written in Python. + +WWW: http://pypgsql.sourceforge.net/ +developed by Bill Allie et al + +- Gerhard Haering diff --git a/databases/py-pyPgSQL/pkg-plist b/databases/py-pyPgSQL/pkg-plist new file mode 100644 index 000000000000..94fd9c4e06a6 --- /dev/null +++ b/databases/py-pyPgSQL/pkg-plist @@ -0,0 +1,6 @@ +%%PYTHON_SITELIBDIR%%/libpqmodule.so +%%PYTHON_SITELIBDIR%%/PgSQL.py +%%PYTHON_SITELIBDIR%%/PgSQL.pyc +%%PORTDOCS%%share/doc/py-pyPgSQL/README +@dirrm %%PORTDOCS%%share/doc/py-pyPgSQL +