blob: 67db56a0411534c9b65ef803a784a484f53e5f80 (
plain)
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
52
53
54
55
56
57
58
|
# $NetBSD: Makefile,v 1.16 2001/06/23 19:26:52 jlam Exp $
.include "../../databases/postgresql/Makefile.common"
.include "../../databases/postgresql/Makefile.ssl"
PKGNAME= py-postgresql-3.2
COMMENT= Python interface to PostgreSQL
MAINTAINER= darcy@netbsd.org
DEPENDS+= python>=2.0:../../lang/python
DEPENDS+= py-mxDateTime-[0-9]*:../../time/py-mxDateTime
USE_BUILDLINK_ONLY= # defined
BUILDLINK_DEPENDS.postgresql-lib= postgresql-lib>=${PG_BASE_VERS}
PYTHON= ${LOCALBASE}/bin/python
.if exists(${PYTHON})
.if !defined(PYTHON_VERSION)
PYTHON_VERSION!= ${PYTHON} -c "import sys; print sys.version[:3]"
MAKEFLAGS+= PYTHON_VERSION="${PYTHON_VERSION}"
.endif
.endif
PYTHON_LIBDIR= lib/python${PYTHON_VERSION}
PLIST_SUBST+= PYTHON_LIBDIR=${PYTHON_LIBDIR}
MAKE_ENV+= INSTALLED_LIBPQ=1
CONFIGURE_ARGS+= --with-python
CONFIGURE_ARGS+= --with-python-compile
CONFIGURE_ENV+= PYTHON="${PYTHON}"
DIRS_TO_BUILD= src/interfaces/python
DOCDIR= ${PREFIX}/share/doc/py-postgresql
do-build:
.for DIR in ${DIRS_TO_BUILD}
cd ${WRKSRC}/${DIR} && ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} ${ALL_TARGET}
.endfor
do-install:
.for DIR in ${DIRS_TO_BUILD}
cd ${WRKSRC}/${DIR} && ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_TARGET}
.endfor
post-install:
${INSTALL_DATA_DIR} ${DOCDIR}/tutorial
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
for file in ${WRKSRC}/src/interfaces/python/tutorial/*.py; do \
${INSTALL_DATA} $${file} ${DOCDIR}/tutorial; \
done
.include "../../databases/postgresql-lib/buildlink.mk"
.include "../../mk/bsd.pkg.mk"
|