aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-PyGreSQL/Makefile
blob: 006229ce154c532223d36488840aa1bbfdff8a57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Ports collection Makefile for:    PyGreSQL
# Date created:             2/22/1999
# Whom:                 nectar@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   PyGreSQL
PORTVERSION=    3.5
PORTEPOCH=  1
CATEGORIES= databases python
MASTER_SITES=   ftp://ftp.pygresql.org/pub/distrib/
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
EXTRACT_SUFX=   .tgz

MAINTAINER= girgen@pingpong.net
COMMENT=    A Python interface to PostgreSQL, both classic and DP-API 2.0

BUILD_DEPENDS=  ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
RUN_DEPENDS=    ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
LIB_DEPENDS=    pq:${PORTSDIR}/${POSTGRESQL_PORT}

POSTGRESQL_PORT?=   databases/postgresql7
USE_PYTHON= yes
DATETIME_DEP=   ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
USE_REINPLACE=yes

pre-build:
    @ cd ${WRKSRC} ; ${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' setup.py

do-build:
    @ cd ${WRKSRC} ; ${PYTHON_CMD} setup.py build

do-install:
    @ cd ${WRKSRC} ; ${PYTHON_CMD} setup.py install

post-install:
    @ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -lf \
      ${PYTHONPREFIX_SITELIBDIR}
    @ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -lf \
      ${PYTHONPREFIX_SITELIBDIR}
.if !defined(NOPORTDOCS)
.for docfile in Announce ChangeLog
    @ ${MKDIR} ${DOCSDIR}
      ${INSTALL_DATA} ${WRKSRC}/${docfile} \
      ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>