aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-PyGreSQL/Makefile
blob: 40e1a6185c9f7a7a2e1bf831ee8c2f37ce1a79eb (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
51
# Ports collection Makefile for:    PyGreSQL
# Date created:             2/22/1999
# Whom:                 nectar@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   PyGreSQL
PORTREVISION=   0
CATEGORIES= databases python
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= girgen@pingpong.net
COMMENT=    A Python interface to PostgreSQL, including a DP-API 2.0 wrapper

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

POSTGRESQL_PORT?=   databases/postgresql7
POSTGRESQL_SUBPORT=YES

WRKSRC=     ${WRKDIR}/postgresql-${PORTVERSION}

# The PyGreSQL distfile is nowhere to be found, but exists in
# postgresql-7.3 distribution so do not be alarmed if you use
# a newer version of postgresql
.include <${.CURDIR}/../postgresql73/Makefile>

USE_PYTHON= yes
CONFIGURE_ARGS= --with-python --prefix=${PREFIX}
MAKE_ARGS+= -C src/interfaces/python
CFLAGS+=    -L${LOCALBASE}/lib
MAKEFILE=   GNUmakefile

DATETIME_DEP=   ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py

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 README
    @ ${MKDIR} ${DOCSDIR}
      ${INSTALL_DATA} ${WRKSRC}/src/interfaces/python/${docfile} \
      ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>