pkgsrc/databases/py-postgresql/Makefile

43 lines
1.2 KiB
Makefile

# $NetBSD: Makefile,v 1.12 2000/12/22 18:42:54 jlam Exp $
DISTNAME= PyGreSQL-3.1
PKGNAME= py-postgresql-3.1
CATEGORIES= databases
MASTER_SITES= ftp://ftp.druid.net/pub/distrib/
EXTRACT_SUFX= .tgz
MAINTAINER= darcy@NetBSD.org
HOMEPAGE= http://www.druid.net/pygresql/
DEPENDS+= python-2.*:../../lang/python
DEPENDS+= postgresql-7.*:../../databases/postgresql
DEPENDS+= py-mxDateTime-*:../../time/py-mxDateTime
ALL_TARGET= default
PYTHON= ${LOCALBASE}/bin/python
PYTHON_LIBDIR= ${LOCALBASE}/lib/python2.0
PLIST_SUBST+= PYTHON_LIBDIR=lib/python2.0
DOCDIR= ${PREFIX}/share/doc/py-postgresql
do-configure:
${SED} -e "s,@LOCALBASE@,${LOCALBASE},g" \
${FILESDIR}/Setup.in > ${WRKSRC}/Setup.in
${CP} ${PYTHON_LIBDIR}/config/Makefile.pre.in ${WRKSRC}
cd ${WRKSRC}; ${MAKE} -f Makefile.pre.in boot
post-build:
cd ${WRKSRC}; ${PYTHON} ${PYTHON_LIBDIR}/compileall.py .
cd ${WRKSRC}; ${PYTHON} -O ${PYTHON_LIBDIR}/compileall.py .
post-install:
cd ${WRKSRC}; ${INSTALL_SCRIPT} pg*.py pg*.py[co] \
${PYTHON_LIBDIR}/site-packages
${INSTALL_DATA_DIR} ${DOCDIR}/tutorial
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
for file in ${WRKSRC}/tutorial/*.py; do \
${INSTALL_DATA} $${file} ${DOCDIR}/tutorial; \
done
.include "../../mk/bsd.pkg.mk"