2007-03-28 05:47:17 +00:00
|
|
|
# ports collection makefile for: jboss5
|
|
|
|
# Date created: 7 May 2007
|
2007-04-30 06:27:41 +00:00
|
|
|
# Whom: nemoliu@FreeBSD.org <nemoliu@gmail.com>
|
2002-04-26 21:54:15 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= ${APP_TITLE:L}
|
2008-09-04 19:33:59 +00:00
|
|
|
PORTVERSION= 5.0.0.cr1
|
2005-12-29 21:51:44 +00:00
|
|
|
PORTEPOCH= 1
|
2005-05-23 14:39:05 +00:00
|
|
|
CATEGORIES= java devel
|
2004-01-07 09:30:15 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
2002-04-26 21:54:15 +00:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2008-09-04 19:33:59 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION:U}-src
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2008-12-08 06:43:50 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2007-03-28 05:47:17 +00:00
|
|
|
COMMENT= Open-source J2EE application server (5.x family)
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2004-11-25 03:48:53 +00:00
|
|
|
BUILD_DEPENDS= ant:${PORTSDIR}/devel/apache-ant
|
2004-05-31 00:15:48 +00:00
|
|
|
|
2008-11-29 22:47:06 +00:00
|
|
|
BROKEN= does not build
|
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
LATEST_LINK= jboss5
|
2004-11-17 05:21:13 +00:00
|
|
|
USE_JAVA= yes
|
2007-03-28 05:47:17 +00:00
|
|
|
JAVA_VERSION= 1.5+
|
|
|
|
USE_ANT= yes
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
MAKE_ARGS= -buildfile build/build.xml
|
|
|
|
|
|
|
|
USE_RC_SUBR= jboss5.sh
|
|
|
|
SUB_FILES= pkg-install pkg-deinstall pkg-message daemonctl.1 daemonctl.c
|
2004-01-07 09:30:15 +00:00
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
PORTDOCS= *
|
|
|
|
.endif
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2004-12-18 02:11:35 +00:00
|
|
|
APP_HOME?= ${PREFIX}/${APP_SHORTNAME}
|
2003-07-14 10:03:13 +00:00
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}${PORTVERSION:R}
|
2002-04-26 21:54:15 +00:00
|
|
|
LOG_DIR= ${APP_HOME}/log
|
|
|
|
APP_TITLE= JBoss
|
2004-12-18 02:11:35 +00:00
|
|
|
APP_SHORTNAME= ${UNIQUENAME}
|
2002-04-26 21:54:15 +00:00
|
|
|
CONTROL_SCRIPT_NAME= ${APP_SHORTNAME}ctl
|
|
|
|
CONTROL_SCRIPT= ${PREFIX}/bin/${CONTROL_SCRIPT_NAME}
|
|
|
|
CONTROL_SCRIPT_MANPAGE_TITLE= ${CONTROL_SCRIPT_NAME:U}
|
2002-06-11 07:38:25 +00:00
|
|
|
STARTUP_SCRIPT_NAME= ${APP_SHORTNAME}.sh
|
2006-06-13 17:43:14 +00:00
|
|
|
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/${STARTUP_SCRIPT_NAME}
|
2002-04-26 21:54:15 +00:00
|
|
|
USER= www
|
|
|
|
GROUP= www
|
|
|
|
STDOUT_LOG= ${LOG_DIR}/stdout.log
|
|
|
|
STDERR_LOG= ${LOG_DIR}/stderr.log
|
|
|
|
AUTO_START?= NO
|
|
|
|
STOP_TIMEOUT?= 5
|
|
|
|
PID_FILE= /var/run/${APP_SHORTNAME}.pid
|
2005-01-24 12:51:38 +00:00
|
|
|
JAVA_OPTS=
|
2004-06-21 16:42:59 +00:00
|
|
|
JAVA_CP= bin/run.jar:${JAVA_HOME}/lib/tools.jar
|
|
|
|
JAVA_MAIN= org.jboss.Main
|
2003-07-14 10:03:13 +00:00
|
|
|
MAN1= ${CONTROL_SCRIPT_NAME}.1
|
|
|
|
|
2008-09-04 19:33:59 +00:00
|
|
|
JBOSSOUTPUT= ${WRKSRC}/build/output/${PORTNAME}-${PORTVERSION:R}.CR1
|
2004-11-25 03:48:53 +00:00
|
|
|
APP_HOME_FILES= bin client lib server
|
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
|
|
|
2004-11-25 03:48:53 +00:00
|
|
|
PLIST_FILES= ${CONTROL_SCRIPT:S,^${PREFIX}/,,} \
|
|
|
|
${STDOUT_LOG:S,^${PREFIX}/,,} \
|
|
|
|
${STDERR_LOG:S,^${PREFIX}/,,}
|
2004-01-07 09:30:15 +00:00
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
SUB_LIST= APP_HOME=${APP_HOME} \
|
|
|
|
APP_SHORTNAME=${APP_SHORTNAME} \
|
|
|
|
APP_TITLE=${APP_TITLE} \
|
|
|
|
CONTROL_SCRIPT=${CONTROL_SCRIPT} \
|
|
|
|
CONTROL_SCRIPT_MANPAGE_TITLE=${CONTROL_SCRIPT_MANPAGE_TITLE} \
|
|
|
|
CONTROL_SCRIPT_NAME=${CONTROL_SCRIPT_NAME} \
|
|
|
|
GROUP=${GROUP} \
|
|
|
|
JAVA=${JAVA} \
|
|
|
|
JAVA_CP=${JAVA_CP} \
|
|
|
|
JAVA_HOME=${JAVA_HOME} \
|
|
|
|
JAVA_MAIN=${JAVA_MAIN} \
|
|
|
|
JAVA_OPTS=${JAVA_OPTS} \
|
|
|
|
JAVA_PORT_VERSION=${JAVA_PORT_VERSION} \
|
|
|
|
JAVA_PORT_OS_DESCRIPTION=${JAVA_PORT_OS_DESCRIPTION} \
|
|
|
|
JAR_FILE=${JAR_FILE} \
|
|
|
|
LOG_DIR=${LOG_DIR} \
|
|
|
|
PID_FILE=${PID_FILE} \
|
|
|
|
PKGNAME=${PKGNAME} \
|
|
|
|
PORTNAME=${PORTNAME} \
|
|
|
|
PORTVERSION=${PORTVERSION} \
|
|
|
|
PREFIX=${PREFIX} \
|
|
|
|
STARTUP_SCRIPT=${STARTUP_SCRIPT} \
|
|
|
|
STDERR_LOG=${STDERR_LOG} \
|
|
|
|
STDOUT_LOG=${STDOUT_LOG} \
|
|
|
|
STOP_TIMEOUT=${STOP_TIMEOUT} \
|
|
|
|
USER=${USER}
|
2004-12-22 20:44:23 +00:00
|
|
|
|
2004-01-07 09:30:15 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
2003-07-14 10:03:13 +00:00
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
pre-patch:
|
2004-11-25 03:48:53 +00:00
|
|
|
@${ECHO_MSG} "Installation settings:"
|
|
|
|
@${ECHO_MSG} " Destination directory: ${APP_HOME}"
|
|
|
|
@${ECHO_MSG} " Control program location: ${CONTROL_SCRIPT}"
|
|
|
|
@${ECHO_MSG} " Startup script location: ${STARTUP_SCRIPT}"
|
|
|
|
@${ECHO_MSG} " Location of JDK: ${JAVA_HOME}"
|
|
|
|
@${ECHO_MSG} " Location of Java port: ${JAVA_PORT}"
|
|
|
|
@${ECHO_MSG} " Startup Java Options: ${JAVA_OPTS}"
|
|
|
|
@${ECHO_MSG} " Running as (user/group): ${USER}/${GROUP}"
|
|
|
|
@${ECHO_MSG} " Logfile stdout: ${STDOUT_LOG}"
|
|
|
|
@${ECHO_MSG} " Logfile stderr: ${STDERR_LOG}"
|
|
|
|
@${ECHO_MSG} " Starting after install: ${AUTO_START}"
|
|
|
|
@${ECHO_MSG} " Stop time-out: ${STOP_TIMEOUT} sec."
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2003-07-14 10:03:13 +00:00
|
|
|
pre-install:
|
2004-11-25 03:48:53 +00:00
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2003-07-14 10:03:13 +00:00
|
|
|
do-install:
|
2007-03-28 05:47:17 +00:00
|
|
|
cd ${WRKDIR} && ${CC} ${CFLAGS} -o ${CONTROL_SCRIPT_NAME} daemonctl.c
|
2004-01-07 09:30:15 +00:00
|
|
|
${MKDIR} ${APP_HOME} && ${CHOWN} ${USER}:${GROUP} ${APP_HOME}
|
|
|
|
${MKDIR} ${LOG_DIR} && ${CHOWN} ${USER}:${GROUP} ${LOG_DIR}
|
2004-11-25 03:48:53 +00:00
|
|
|
(cd ${JBOSSOUTPUT} && ${FIND} ${APP_HOME_FILES} |\
|
2003-07-14 10:03:13 +00:00
|
|
|
${CPIO} -pdmu -R ${USER}:${GROUP} ${APP_HOME})
|
|
|
|
${INSTALL} -o ${USER} -g ${GROUP} -m 06754\
|
|
|
|
${WRKDIR}/${CONTROL_SCRIPT_NAME} ${CONTROL_SCRIPT}
|
|
|
|
${INSTALL} -o ${USER} -g ${GROUP} -m 0640 /dev/null ${STDOUT_LOG}
|
|
|
|
${INSTALL} -o ${USER} -g ${GROUP} -m 0640 /dev/null ${STDERR_LOG}
|
|
|
|
${INSTALL} -o ${USER} -g ${GROUP} -m 0640 /dev/null ${PID_FILE}
|
|
|
|
${INSTALL_MAN} ${WRKDIR}/daemonctl.1 ${MANPREFIX}/man/man1/${CONTROL_SCRIPT_NAME}.1
|
2002-04-26 21:54:15 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2004-11-25 03:48:53 +00:00
|
|
|
cd ${JBOSSOUTPUT}/docs \
|
|
|
|
&& ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
|
|
|
|
&& ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
|
2002-04-26 21:54:15 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
2004-11-25 03:48:53 +00:00
|
|
|
@${FIND} -s ${APP_HOME_FILES:S,^,${JBOSSOUTPUT}/,} -not -type d | \
|
|
|
|
${SED} -ne 's,^${JBOSSOUTPUT},${APP_HOME:S,${PREFIX}/,,},p' >> ${TMPPLIST}
|
|
|
|
@${FIND} -s -d ${APP_HOME_FILES:S,^,${JBOSSOUTPUT}/,} -type d | \
|
|
|
|
${SED} -ne 's,^${JBOSSOUTPUT},@dirrm ${APP_HOME:S,${PREFIX}/,,},p' >> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@dirrm ${APP_HOME:S,^${PREFIX}/,,}/log" >> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@dirrm ${APP_HOME:S,^${PREFIX}/,,}" >> ${TMPPLIST}
|
2002-04-26 21:54:15 +00:00
|
|
|
.if ${AUTO_START} == "YES"
|
|
|
|
@${CONTROL_SCRIPT} start || true
|
|
|
|
.endif
|
2004-12-22 20:44:23 +00:00
|
|
|
.if !defined(BATCH)
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.endif
|
2002-04-26 21:54:15 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|