1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00
freebsd-ports/www/cocoon/Makefile
Mark Linimon 06e6677793 Now that the Java 1.3 and Java 1.4 ports are deprecated and will expire soon,
remove support for them from bsd.java.mk.  As Jikes is not available in Java 1.5
or higher, remove it from bsd.java.mk too (suggested by hq@) and from the ports
which used it (only occurences were USE_JIKES=no).  Support for the Blackdown VM
is also removed, as it is not available in Java 1.5 and higher.

Also remove the mapping from Java 1.1-1.4 to Java 1.5+ in bsd.java.mk to detect
old, broken ports; therefore bump the minimal value of JAVA_VERSION to 1.5.
While here, replace static values of JAVA_VERSION in files/*.in by
%%JAVA_VERSION%% .

PR:		ports/158969
Submitted by:	rene
Tested on:	pointyhat-west -exp
2011-07-21 05:03:02 +00:00

152 lines
4.1 KiB
Makefile

# New ports collection makefile for: Cocoon
# Date created: 27 June 1999
# Whom: Jun Kuriyama <kuriyama@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= cocoon
PORTVERSION= 2.1.11
PORTREVISION= 1
CATEGORIES= www java
MASTER_SITES= ${MASTER_SITE_APACHE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PDISTNAME}-src
MAINTAINER= ports@FreeBSD.org
COMMENT= XML Web Development Framework
USE_RC_SUBR= ${PORTNAME}.sh
USE_JAVA= yes
JAVA_VERSION= 1.5+
USE_PYTHON= 1.6+
MAKE_ENV= JAVA_HOME=${JAVA_HOME}
WRKSRC= ${WRKDIR}/${PDISTNAME}
APP_NAME?= ${PORTNAME}
APP_HOME?= ${PREFIX}/${APP_NAME}
LATEST_LINK= ${APP_NAME}
PLIST= ${WRKDIR}/pkg-plist
PDISTNAME= ${PORTNAME}-${PORTVERSION}
PKGMESSAGE= ${WRKDIR}/pkg-message
COCOON_LIB= ${JAVASHAREDIR}/${APP_NAME}
PLIST_SUB+= "COCOON_LIB=${COCOON_LIB}"
COPYDIRS= *.txt tools/jetty tools/loader legal webapp
PORT?= 8888
PID_FILE?= ${APP_HOME}/${APP_NAME}.pid
RUNASUSER?= www
RUNASUID?= 80
GROUP?= www
GID?= 80
LOG_FILE?= ${APP_HOME}/${APP_NAME}.log
SUB_LIST= \
APP_HOME=${APP_HOME} \
APP_NAME=${APP_NAME} \
PORT=${PORT} \
COCOON_LIB=${COCOON_LIB} \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA} \
PID_FILE=${PID_FILE} \
RUNASUSER=${RUNASUSER} \
RUNASUID=${RUNASUID} \
GROUP=${GROUP} \
GID=${GID} \
LOG_FILE=${LOG_FILE} \
PYTHON_CMD=${PYTHON_CMD}
SUB_FILES= \
pkg-install \
pkg-deinstall \
${APP_NAME}ctl \
${APP_NAME}.sh \
upstreams-cocoon.sh \
message \
message-advanced
# Load options (before including bsd.port.pre.mk)
.include "${.CURDIR}/Makefile.options"
.include <bsd.port.pre.mk>
# Test for options
.include "${MASTERDIR}/Makefile.test-options"
.for BLOCK in ${BLOCKS}
BLOCKSEXP+= -e 's/^include.block.${BLOCK}=.*$$/include.block.${BLOCK}=true/'
.endfor
post-configure:
@${ECHO_MSG} "===> Configuring blocks: ${BLOCKS}"
${SED} -e 's/.*include.block\(.*\)=.*$$/include.block\1=false/' < ${WRKSRC}/blocks.properties | \
${SED} ${BLOCKSEXP} > ${WRKSRC}/local.blocks.properties
${CP} ${WRKSRC}/build.properties ${WRKSRC}/local.build.properties
.if (! defined(WITH_DOCS))
${REINPLACE_CMD} \
-e 's/^#\(exclude.webapp.documentation=\)/\1/' \
-e 's/^#\(exclude.webapp.javadocs=\)/\1/' \
-e 's/^#\(exclude.documentation=\)/\1/' \
-e 's/^#\(exclude.javadocs=\)/\1/' \
${WRKSRC}/local.build.properties
.endif
.if (! defined(WITH_SAMPLES))
${REINPLACE_CMD} \
-e 's/^#\(exclude.webapp.samples=\)/\1/' \
-e 's/^#\(exclude.webapp.test-suite=\)/\1/' \
${WRKSRC}/local.build.properties
.endif
# Include Java source code into the binary jar files
.if (defined(WITH_SOURCES))
${REINPLACE_CMD} \
-e 's/^#\(include.sources-in-jars=\)/\1/' \
${WRKSRC}/local.build.properties
.endif
pre-build:
${CHMOD} a+rx ${WRKSRC}/build.sh
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build.sh
post-build:
${TEST} -h ${WRKSRC}/webapp || ${LN} -s ${WRKSRC}/build/webapp ${WRKSRC}/webapp
@${ECHO_MSG} "===> Building packing list"
@> ${PLIST}
@cd ${WRKSRC} && ${FIND} -H ${COPYDIRS} -not -type d \
| ${SED} -e "s|^|${APP_NAME}/|" >> ${PLIST}
@cd ${WRKSRC} && ${FIND} -H -d ${COPYDIRS} -type d -empty \
| ${SED} -e "s|^|@exec mkdir -p %D/${APP_NAME}/|" >> ${PLIST}
@cd ${WRKSRC} && ${FIND} -H -d ${COPYDIRS} -type d \
| ${SED} -e "s|^|@dirrm ${APP_NAME}/|" >> ${PLIST}
@${CAT} ${MASTERDIR}/pkg-plist >> ${PLIST}
pre-install:
@${FMT} -w80 ${WRKDIR}/message > ${PKGMESSAGE}
@${CAT} ${WRKDIR}/message-advanced >> ${PKGMESSAGE}
do-install:
@${ECHO_MSG} "===> Installing ${COPYDIRS}"
@${MKDIR} ${APP_HOME}
@cd ${WRKSRC} && ${FIND} -H ${COPYDIRS} | ${CPIO} -pdmuL -R ${LIBOWN}:${LIBGRP} ${APP_HOME}
@${INSTALL} ${WRKDIR}/upstreams-cocoon.sh ${APP_HOME}/cocoon.sh
@${ECHO_MSG} "===> Installing into ${PREFIX}/sbin"
@${INSTALL_SCRIPT} ${WRKDIR}/${APP_NAME}ctl ${PREFIX}/sbin
post-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_CMD}
@${ECHO_CMD} "********************************************************************************"
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD} "********************************************************************************"
@${ECHO_CMD}
.include <bsd.port.post.mk>