2010-08-30 16:59:41 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.37 2010/08/30 20:59:41 fgsch Exp $
|
2004-10-24 16:44:35 -04:00
|
|
|
|
2008-01-11 04:09:22 -05:00
|
|
|
SHARED_ONLY= Yes
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2008-01-11 04:09:22 -05:00
|
|
|
COMMENT-main= PostgreSQL database adapter for Python
|
|
|
|
COMMENT-examples= examples for PostgreSQL database adapter for Python
|
|
|
|
COMMENT-zope= database adapter for Zope
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2008-01-11 04:09:22 -05:00
|
|
|
VERSION= 1.1.21
|
|
|
|
DISTNAME= psycopg-${VERSION}
|
2009-07-20 15:44:48 -04:00
|
|
|
PKGNAME= py-${DISTNAME}
|
2010-08-30 16:59:41 -04:00
|
|
|
REVISION-main = 9
|
|
|
|
FULLPKGNAME-examples= py-psycopg-examples-${VERSION}
|
|
|
|
REVISION-examples = 2
|
2009-07-20 15:44:48 -04:00
|
|
|
FULLPKGPATH-examples= databases/py-psycopg,-examples
|
2010-08-30 16:59:41 -04:00
|
|
|
FULLPKGNAME-zope= py-psycopg-zope-${VERSION}
|
|
|
|
REVISION-zope = 4
|
2010-02-26 14:10:38 -05:00
|
|
|
FULLPKGPATH-zope= databases/py-psycopg,-zope,python2.4
|
2008-01-11 04:09:22 -05:00
|
|
|
CATEGORIES= databases
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2008-01-11 04:09:22 -05:00
|
|
|
HOMEPAGE= http://initd.org/projects/psycopg1
|
2004-10-24 16:44:35 -04:00
|
|
|
|
2008-01-11 04:09:22 -05:00
|
|
|
MAINTAINER= Aleksander Piotrowski <alek@openbsd.org>
|
2001-08-21 19:00:38 -04:00
|
|
|
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
2008-01-11 04:09:22 -05:00
|
|
|
WANTLIB-main= crypto util pq
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2006-01-28 06:18:52 -05:00
|
|
|
MASTER_SITES= http://initd.org/pub/software/psycopg/
|
2001-09-18 21:05:17 -04:00
|
|
|
|
2006-01-28 06:18:52 -05:00
|
|
|
MODULES= lang/python
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2009-07-20 15:44:48 -04:00
|
|
|
BUILD_DEPENDS= ::databases/postgresql,-server
|
|
|
|
RUN_DEPENDS= ::databases/postgresql
|
2001-09-18 21:05:17 -04:00
|
|
|
|
2010-08-30 16:59:41 -04:00
|
|
|
FLAVORS= python2.4 python2.5 python2.6
|
|
|
|
FLAVOR?= python2.6
|
2004-10-24 16:44:35 -04:00
|
|
|
|
2008-01-11 04:09:22 -05:00
|
|
|
.if ${FLAVOR:L:Mpython2.4} && !${FLAVOR:L:Npython2.4}
|
2009-07-20 15:44:48 -04:00
|
|
|
MULTI_PACKAGES= -main -examples -zope
|
2010-08-30 16:59:41 -04:00
|
|
|
.elif ${FLAVOR:L:Mpython2.[56]} && !${FLAVOR:L:Npython2.[56]}
|
2008-01-11 04:09:22 -05:00
|
|
|
MULTI_PACKAGES= -main -examples
|
|
|
|
.else
|
|
|
|
ERRORS+= "Fatal: You must select one version: ${FLAVORS}"
|
|
|
|
.endif
|
|
|
|
|
2009-07-20 15:44:48 -04:00
|
|
|
MODPY_VERSION= ${FLAVOR:L:S/python//}
|
|
|
|
BUILD_DEPENDS+= :py-mxDateTime->=2.0.0-${FLAVOR:L}:devel/py-mxDateTime,${FLAVOR:L}
|
|
|
|
RUN_DEPENDS+= :py-mxDateTime->=2.0.0-${FLAVOR:L}:devel/py-mxDateTime,${FLAVOR:L}
|
2008-01-11 04:09:22 -05:00
|
|
|
|
2009-07-20 15:44:48 -04:00
|
|
|
RUN_DEPENDS-examples= :py-psycopg-${VERSION}:${PKGPATH}
|
|
|
|
PKG_ARCH-examples= *
|
|
|
|
|
|
|
|
RUN_DEPENDS-zope= :py-psycopg-${VERSION}-python2.4:${BUILD_PKGPATH} \
|
2006-11-26 05:24:36 -05:00
|
|
|
${MODPY_RUN_DEPENDS}
|
|
|
|
PKG_ARCH-zope= *
|
2001-08-21 19:00:38 -04:00
|
|
|
|
|
|
|
CONFIGURE_STYLE=gnu
|
2006-01-28 06:18:52 -05:00
|
|
|
CONFIGURE_ARGS= --with-mxdatetime-includes=${MODPY_SITEPKG}/mx/DateTime/mxDateTime
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2006-01-28 06:18:52 -05:00
|
|
|
NO_REGRESS= Yes
|
2001-08-21 19:00:38 -04:00
|
|
|
|
2004-10-24 16:44:35 -04:00
|
|
|
post-install:
|
2008-01-11 04:09:22 -05:00
|
|
|
.if ${MULTI_PACKAGES:L:M-zope}
|
2004-10-24 16:44:35 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/lib/zope/lib/python/Products/
|
|
|
|
cd ${WRKSRC}; tar cf - ZPsycopgDA | tar xf - -C ${PREFIX}/lib/zope/lib/python/Products
|
|
|
|
${CHOWN} -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/zope/lib/python/Products/ZPsycopgDA
|
2008-01-11 04:09:22 -05:00
|
|
|
.endif
|
2006-01-28 06:18:52 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-psycopg/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/examples/* \
|
|
|
|
${PREFIX}/share/examples/py-psycopg/
|
2006-11-16 17:39:02 -05:00
|
|
|
${CHOWN} ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/python${MODPY_VERSION}/lib-dynload/psycopgmodule.so
|
2001-09-18 21:05:17 -04:00
|
|
|
|
2001-08-21 19:00:38 -04:00
|
|
|
.include <bsd.port.mk>
|