openbsd-ports/databases/postgresql-jdbc/Makefile

82 lines
2.2 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.13 2011/09/05 18:41:29 kili Exp $
COMMENT-main= JDBC Driver for PostgreSQL
COMMENT-docs= API docs for PostgreSQL JDBC Driver
V= 8.2-505
DISTNAME= postgresql-jdbc-$V
PKGNAME-main= postgresql-jdbc-${V:S/-/./}
REVISION-main= 3
PKGNAME-docs= postgresql-jdbc-docs-${V:S/-/./}
REVISION-docs= 0
PKG_ARCH-docs= *
CATEGORIES= databases
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
REGRESS_DEPENDS= databases/postgresql \
2010-11-26 02:18:59 -05:00
java/junit=3.8.2
RUN_DEPENDS-docs=
JUNIT_JAR= ${LOCALBASE}/share/java/classes/junit-3.8.2/junit.jar
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>