diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2004-05-23 19:24:22 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2004-05-23 19:24:22 +0000 |
commit | 119e262ec8fbefe4709f61246bdf124f0eb83934 (patch) | |
tree | 6ca7cf0eebe01ea20d368134a57d607b65e61313 /www/apache-forrest/Makefile | |
parent | 8ded2e569fc735e7358e8add8ba18eaae7b7f262 (diff) | |
download | ports-119e262ec8fbefe4709f61246bdf124f0eb83934.tar.gz ports-119e262ec8fbefe4709f61246bdf124f0eb83934.zip |
Notes
Diffstat (limited to 'www/apache-forrest/Makefile')
-rw-r--r-- | www/apache-forrest/Makefile | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/www/apache-forrest/Makefile b/www/apache-forrest/Makefile new file mode 100644 index 000000000000..2200899e5957 --- /dev/null +++ b/www/apache-forrest/Makefile @@ -0,0 +1,85 @@ +# New ports collection makefile for: apache-forrest +# Date created: 14 October 2003 +# Whom: nivit@users.sourceforge.net +# +# $FreeBSD$ + +PORTNAME= apache-forrest +PORTVERSION= 0.5.1 +CATEGORIES= www +MASTER_SITES= http://www.apache.inetcosmos.org/dist/xml/forrest/source/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-src + +MAINTAINER= nivit@users.sourceforge.net +COMMENT= A tool for rapid development of small sites + +USE_JAVA= 1.2+ + +REPLACE_FILES= ${WRKSRC}/src/resources/forrest-shbat/bin/forrest \ + ${WRKSRC}/src/resources/forrestbot/bin/forrestbot + +BUILD_CMD= ${SETENV} JAVA_HOME=${JAVA_HOME} ${WRKSRC}/build.sh + +.if !defined(NOPORTDOCS) +BUILD_DOCS= site +FORREST_DOCS= ${INSTALL_WRKSRC}/${BUILD_DOCS} +.endif + +INSTALL_WRKSRC= ${WRKSRC}/build +FORREST_DIR= ${INSTALL_WRKSRC}/dist/shbat +LINK_OPTS?= -sf + +FIND_ARGS1= -type d \! -empty +FIND_ARGS2= \! -type d -and -perm -a+x -and \! -name "*.orig" +FIND_ARGS3= \! -type d -and \! -perm -a+x -and \! -name "*.bat" -and \! -name "*.orig" + +post-patch: + @for FILE in ${REPLACE_FILES}; do \ + ${SED} \ + -e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \ + $${FILE} > ${WRKSRC}/`basename $${FILE}`; \ + ${MV} -f ${WRKSRC}/`basename $${FILE}` $${FILE}; \ + done; + +do-build: + @cd ${WRKSRC}; \ + ${BUILD_CMD} ${BUILD_DOCS} + +do-install: +# Script and data + @cd ${FORREST_DIR}; \ + DIRS=$$(${FIND} . ${FIND_ARGS1}); \ + for DIR in $${DIRS}; do \ + ${MKDIR} ${DATADIR}/$${DIR}; \ + done; \ + FILES=$$(${FIND} . ${FIND_ARGS2} ); \ + for FILE in $${FILES}; do \ + ${INSTALL_SCRIPT} $${FILE} ${DATADIR}/$${FILE}; \ + done; \ + FILES=$$(${FIND} . ${FIND_ARGS3}); \ + for FILE in $${FILES}; do \ + ${INSTALL_DATA} $${FILE} ${DATADIR}/$${FILE}; \ + done; +# Documentation +.if !defined(NOPORTDOCS) + @cd ${FORREST_DOCS}; \ + DIRS=$$(${FIND} . ${FIND_ARGS1}); \ + for DIR in $${DIRS}; do \ + ${MKDIR} ${DOCSDIR}/$${DIR}; \ + done; \ + FILES=$$(${FIND} . ${FIND_ARGS3}); \ + for FILE in $${FILES}; do \ + ${INSTALL_DATA} $${FILE} ${DOCSDIR}/$${FILE}; \ + done; +.endif +# Links to executables + @cd ${FORREST_DIR}; \ + FILES=$$(${FIND} bin ${FIND_ARGS2} ); \ + for FILE in $${FILES}; do \ + ${LN} ${LINK_OPTS} ${DATADIR}/$${FILE} ${PREFIX}/$${FILE}; \ + done; + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> |