Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # $OpenBSD: Makefile,v 1.14 2015/04/21 18:40:20 sthen Exp $
  2. COMMENT = Python DB-API 2.0 compliant interface to PostgreSQL
  3. MODPY_EGG_VERSION = 2.5.1
  4. DISTNAME = pyPgSQL-${MODPY_EGG_VERSION}
  5. PKGNAME = py-pgsql-${MODPY_EGG_VERSION}
  6. REVISION = 7
  7. CATEGORIES = databases
  8. HOMEPAGE = http://pypgsql.sourceforge.net/
  9. MAINTAINER = Pierre-Emmanuel Andre <pea@openbsd.org>
  10. # Python
  11. PERMIT_PACKAGE_CDROM = Yes
  12. WANTLIB += ${MODPY_WANTLIB}
  13. WANTLIB += pq>=5 pthread
  14. MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=pypgsql/}
  15. MODULES = lang/python
  16. BUILD_DEPENDS = databases/postgresql
  17. RUN_DEPENDS = devel/py-mxDateTime
  18. LIB_DEPENDS = databases/postgresql
  19. TEST_DEPENDS = ${RUN_DEPENDS}
  20. # To run the tests, create and start a test database as follows:
  21. # createdb -E UNICODE pypgsql
  22. # createlang plpgsql pypgsql
  23. # The test target will use the PGUSER, PGPASSWORD and PGHOST
  24. # environment variables to connect to the database; see below for
  25. # defaults.
  26. TEST_IS_INTERACTIVE = Yes
  27. PGUSER ?= regressuser
  28. PGPASSWORD ?= regresspass
  29. PGHOST ?= localhost
  30. TEST_ENV = "PGUSER=${PGUSER}" \
  31. "PGPASSWORD=${PGPASSWORD}" \
  32. "PGHOST=${PGHOST}"
  33. do-test: fake
  34. cd ${WRKSRC} && ${SETENV} PYTHONPATH=${WRKINST}${MODPY_SITEPKG} \
  35. ${TEST_ENV} ${MODPY_BIN} ./test/PgSQLTestCases.py
  36. post-install:
  37. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-pgsql
  38. ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/py-pgsql/
  39. ${INSTALL_DATA} ${WRKSRC}/Announce ${PREFIX}/share/doc/py-pgsql/
  40. ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${PREFIX}/share/doc/py-pgsql/
  41. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-pgsql
  42. ${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/py-pgsql/
  43. .include <bsd.port.mk>