diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-09-07 22:23:35 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-09-07 22:23:35 +0000 |
commit | e7ed232fe114fd0ea8289c4b0874365210ac0b7a (patch) | |
tree | 59b2a2adf6698ceecd0303bd9cde40168bbf5c99 /www/helma/Makefile | |
parent | 2323deba1c00584554af901c90c66856bfd19276 (diff) | |
download | ports-e7ed232fe114fd0ea8289c4b0874365210ac0b7a.tar.gz ports-e7ed232fe114fd0ea8289c4b0874365210ac0b7a.zip |
Notes
Diffstat (limited to 'www/helma/Makefile')
-rw-r--r-- | www/helma/Makefile | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/www/helma/Makefile b/www/helma/Makefile new file mode 100644 index 000000000000..645c783a9c64 --- /dev/null +++ b/www/helma/Makefile @@ -0,0 +1,122 @@ +# New ports collection makefile for: helma +# Date created: 2008-06-22 +# Whom: Bernhard Fr__hlich <decke@bluelife.at> +# +# $FreeBSD$ +# + +PORTNAME= helma +PORTVERSION= 1.6.2 +CATEGORIES= www java +MASTER_SITES= http://adele.helma.org/download/helma/${PORTVERSION}/ +DISTFILES= helma-1.6.2.tar.gz helma-1.6.2-src.tar.gz + +MAINTAINER= decke@bluelife.at +COMMENT= A Web application framework for fast and efficient scripting + +WRKBASE= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +WRKSRC= ${WRKBASE}/build +DATADIR= ${JAVASHAREDIR}/${PORTNAME} + +USE_RC_SUBR= helma +USE_JAVA= yes +JAVA_VERSION= 1.5+ +USE_ANT= yes +ALL_TARGET= clean jar + +DBDIR?= /var/db/${PORTNAME} +LOGDIR?= /var/log/${PORTNAME} +HELMA_USER= ${WWWOWN} +HELMA_GROUP= ${WWWGRP} +HELMA_CONFIG= ${WRKBASE}/scripts/helma.conf +APPFILES= apps modules +ETCFILES= apps.properties db.properties server.properties scripts/helma.conf +DATAFILES= lib launcher.jar +DOCFILES= docs licenses README.txt + +PLIST_SUB= DBDIR="${DBDIR}" \ + LOGDIR="${LOGDIR}" \ + HELMA_USER="${HELMA_USER}" \ + HELMA_GROUP="${HELMA_GROUP}" + +OPTIONS= MYSQL "Install MySQL Connector for Java" off + +.include <bsd.port.pre.mk> + +.if defined(WITH_MYSQL) +RUN_DEPENDS+= ${JAVALIBDIR}/mysql-connector-java.jar:${PORTSDIR}/databases/mysql-connector-java +PLIST_SUB+= MYSQL="" +.else +PLIST_SUB+= MYSQL="@comment " +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|JAVA_HOME=/usr/lib/j2sdk1.5-sun|JAVA_HOME=${JAVA_HOME}|' \ + ${HELMA_CONFIG} + @${REINPLACE_CMD} -e 's|HELMA_INSTALL=/usr/local/helma/helma-1.6.x|HELMA_INSTALL=${DATADIR}|' \ + ${HELMA_CONFIG} + @${REINPLACE_CMD} -e 's|HELMA_HOME=\$$HELMA_INSTALL|HELMA_HOME=${WWWDIR}|' \ + ${HELMA_CONFIG} + @${REINPLACE_CMD} -e 's|HELMA_USER=helma|HELMA_USER=${HELMA_USER}|' \ + ${HELMA_CONFIG} + @${REINPLACE_CMD} -e 's|HELMA_LOG=\$$HELMA_HOME/log/helma-out.log|HELMA_LOG=${LOGDIR}/helma-out.log|' \ + ${HELMA_CONFIG} + @${ECHO_CMD} "HELMA_CONFIG=${ETCDIR}" >> \ + ${HELMA_CONFIG} + + @${ECHO_CMD} "" >> \ + ${WRKBASE}/server.properties + @${ECHO_CMD} "# custom directories" >> \ + ${WRKBASE}/server.properties + @${ECHO_CMD} "hopHome = ${WWWDIR}" >> \ + ${WRKBASE}/server.properties + @${ECHO_CMD} "appHome = ${WWWDIR}/apps" >> \ + ${WRKBASE}/server.properties + @${ECHO_CMD} "appsPropFile = ${ETCDIR}/apps.properties" >> \ + ${WRKBASE}/server.properties + @${ECHO_CMD} "dbPropFile = ${ETCDIR}/db.properties" >> \ + ${WRKBASE}/server.properties + @${ECHO_CMD} "dbHome = ${DBDIR}" >> \ + ${WRKBASE}/server.properties + @${REINPLACE_CMD} -e 's|# logDir = console|logDir = ${LOGDIR}|' \ + ${WRKBASE}/server.properties + +do-install: + ${INSTALL_SCRIPT} ${FILESDIR}/helma.sh.in ${PREFIX}/bin/helma + + ${MKDIR} ${WWWDIR} && \ + (cd ${WRKBASE} && ${COPYTREE_SHARE} "${APPFILES}" ${WWWDIR} \ + "! -name *.html ! -name helma-*.jar ! -name .jsdoc") && \ + ${CHOWN} -R ${HELMA_USER}:${HELMA_GROUP} ${WWWDIR} + + ${MKDIR} ${DATADIR} && \ + (cd ${WRKBASE} && ${COPYTREE_SHARE} "${DATAFILES}" ${DATADIR} \ + "! -name *.html ! -name helma-*.jar ! -name .jsdoc") + + ${MKDIR} ${LOGDIR} && \ + ${CHOWN} -R ${HELMA_USER}:${HELMA_GROUP} ${LOGDIR} + + ${MKDIR} ${DBDIR} && \ + ${CHOWN} -R ${HELMA_USER}:${HELMA_GROUP} ${DBDIR} + + ${MKDIR} ${ETCDIR}; \ + for f in ${ETCFILES}; do \ + ${INSTALL_DATA} ${WRKBASE}/$$f ${ETCDIR}/$${f##*/}.sample; \ + if [ ! -f ${ETCDIR}/$${f##*/} ]; then \ + ${CP} -p ${ETCDIR}/$${f##*/}.sample ${ETCDIR}/$${f##*/}; \ + fi; \ + done + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} && \ + (cd ${WRKBASE} && ${COPYTREE_SHARE} "${DOCFILES}" ${DOCSDIR}) + + ${MKDIR} ${DOCSDIR}/docs/api/jala && \ + (cd ${WRKBASE}/modules/jala/docs && ${COPYTREE_SHARE} \* ${DOCSDIR}/docs/api/jala) +.endif + +.if defined(WITH_MYSQL) + ${LN} -sf ${JAVALIBDIR}/mysql-connector-java.jar ${DATADIR}/lib/ext/mysql-connector-java.jar +.endif + +.include <bsd.port.post.mk> |