2011-12-17 13:02:44 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.17 2011/12/17 18:02:44 kili Exp $
|
2007-04-11 08:54:25 -04:00
|
|
|
|
2007-09-15 16:34:00 -04:00
|
|
|
COMMENT-main= JDBC Driver for PostgreSQL
|
|
|
|
COMMENT-docs= API docs for PostgreSQL JDBC Driver
|
2007-04-11 08:54:25 -04:00
|
|
|
|
2011-12-17 13:02:44 -05:00
|
|
|
V= 9.1-901
|
2007-04-11 08:54:25 -04:00
|
|
|
DISTNAME= postgresql-jdbc-$V
|
2010-12-05 13:24:33 -05:00
|
|
|
PKGNAME-main= postgresql-jdbc-${V:S/-/./}
|
2007-04-11 08:54:25 -04:00
|
|
|
PKGNAME-docs= postgresql-jdbc-docs-${V:S/-/./}
|
|
|
|
PKG_ARCH-docs= *
|
2011-08-30 13:16:35 -04:00
|
|
|
CATEGORIES= databases
|
2011-10-07 09:54:30 -04:00
|
|
|
REVISION-main = 1
|
2007-04-11 08:54:25 -04:00
|
|
|
|
|
|
|
MULTI_PACKAGES= -main -docs
|
|
|
|
|
|
|
|
HOMEPAGE= http://jdbc.postgresql.org/
|
|
|
|
|
|
|
|
MAINTAINER= Matthias Kilian <kili@openbsd.org>
|
|
|
|
|
|
|
|
# BSD
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
|
|
|
MASTER_SITES= ${HOMEPAGE}/download/
|
|
|
|
EXTRACT_SUFX= .src.tar.gz
|
|
|
|
|
|
|
|
MODULES= java
|
|
|
|
MODJAVA_VER?= 1.5+
|
|
|
|
MODJAVA_JRERUN= yes
|
2011-09-01 16:34:56 -04:00
|
|
|
MODJAVA_BUILD= ant
|
|
|
|
MODJAVA_BUILD_TARGET= all publicapi
|
2007-04-11 08:54:25 -04:00
|
|
|
|
2010-11-14 19:22:45 -05:00
|
|
|
REGRESS_DEPENDS= databases/postgresql \
|
2011-09-06 15:28:36 -04:00
|
|
|
java/junit
|
2007-04-11 08:54:25 -04:00
|
|
|
RUN_DEPENDS-docs=
|
|
|
|
|
2011-09-06 15:28:36 -04:00
|
|
|
JUNIT_JAR= ${LOCALBASE}/share/java/classes/junit/junit.jar
|
2007-04-11 08:54:25 -04:00
|
|
|
|
|
|
|
WRKDIST= ${WRKDIR}/${DISTNAME}.src
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/postgresql/java
|
|
|
|
${INSTALL_DATA} ${WRKDIST}/jars/postgresql.jar \
|
|
|
|
${PREFIX}/share/postgresql/java
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postgresql-jdbc
|
|
|
|
pax -rw -s@^${WRKDIST}/build/publicapi@@ \
|
|
|
|
${WRKDIST}/build/publicapi \
|
|
|
|
${PREFIX}/share/doc/postgresql-jdbc
|
|
|
|
|
|
|
|
# Setup temporary path for regression tests.
|
|
|
|
PG= PGDATA=${WRKDIR}/pghome
|
|
|
|
|
|
|
|
pre-regress:
|
|
|
|
@if pgrep -f ${LOCALBASE}/bin/postgres > /dev/null; then \
|
|
|
|
echo postgresql already running. Please shut it down; \
|
|
|
|
echo before running the regression tests.; \
|
|
|
|
false; \
|
|
|
|
fi
|
|
|
|
@if [ $$(/sbin/sysctl -n kern.seminfo.semmni) -lt 256 -o \
|
|
|
|
$$(/sbin/sysctl -n kern.seminfo.semmns) -lt 2048 ]; then \
|
|
|
|
echo For the regression tests, you need at least; \
|
|
|
|
echo /sbin/sysctl kern.seminfo.semmni=256; \
|
|
|
|
echo /sbin/sysctl kern.seminfo.semmns=2048; \
|
|
|
|
false; \
|
|
|
|
fi
|
|
|
|
${PG} ${LOCALBASE}/bin/initdb -A trust
|
|
|
|
${PG} ${LOCALBASE}/bin/pg_ctl -w start
|
|
|
|
${PG} ${LOCALBASE}/bin/createuser -SDRli test
|
|
|
|
${PG} ${LOCALBASE}/bin/createdb -O test test
|
|
|
|
|
|
|
|
do-regress:
|
|
|
|
cd ${WRKDIST} && \
|
|
|
|
${PG} JAVA_HOME=${JAVA_HOME} CLASSPATH="${JUNIT_JAR}" ant test
|
|
|
|
|
|
|
|
post-regress:
|
|
|
|
${PG} ${LOCALBASE}/bin/pg_ctl stop -m fast
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|