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$
|
|
|
|
#
|
|
|
|
|
2009-11-18 22:11:46 +00:00
|
|
|
PORTNAME= jboss
|
2009-09-02 17:13:03 +00:00
|
|
|
PORTVERSION= 5.1.0.GA
|
2009-11-18 22:11:46 +00:00
|
|
|
PORTREVISION= 1
|
2005-12-29 21:51:44 +00:00
|
|
|
PORTEPOCH= 1
|
2005-05-23 14:39:05 +00:00
|
|
|
CATEGORIES= java devel
|
2009-08-22 00:24:37 +00:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/JBoss/JBoss-${PORTVERSION}
|
2009-01-24 04:55:50 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2009-11-18 22:11:46 +00:00
|
|
|
MAINTAINER= jonc@chen.org.nz
|
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
|
|
|
|
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+
|
2011-03-21 15:02:21 +00:00
|
|
|
JAVA_OS= native
|
|
|
|
ANT_HOME= ${WRKSRC}/tools
|
|
|
|
ANT= ${WRKSRC}/tools/bin/ant
|
2009-11-18 22:11:46 +00:00
|
|
|
DATADIR= ${PREFIX}/share/${UNIQUENAME}
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${UNIQUENAME}
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2009-02-09 20:39:20 +00:00
|
|
|
MANUAL_PACKAGE_BUILD= fetches files in build phase
|
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
MAKE_ARGS= -buildfile build/build.xml
|
|
|
|
|
2012-08-05 23:19:36 +00:00
|
|
|
USE_RC_SUBR= jboss5
|
2009-11-18 22:11:46 +00:00
|
|
|
SUB_FILES= pkg-install pkg-deinstall pkg-message
|
2004-01-07 09:30:15 +00:00
|
|
|
|
2009-11-18 22:11:46 +00:00
|
|
|
PORTDATA= *
|
2004-01-07 09:30:15 +00:00
|
|
|
PORTDOCS= *
|
2002-04-26 21:54:15 +00:00
|
|
|
|
2009-11-18 22:11:46 +00:00
|
|
|
VAR_DIR?= /var
|
|
|
|
LOG_DIR?= ${VAR_DIR}/log/${UNIQUENAME}
|
|
|
|
DEPLOY_DIR?= ${VAR_DIR}/${UNIQUENAME}
|
2002-04-26 21:54:15 +00:00
|
|
|
USER= www
|
|
|
|
GROUP= www
|
2011-03-21 15:02:21 +00:00
|
|
|
STOP_TIMEOUT?= 30
|
2009-11-18 22:11:46 +00:00
|
|
|
PID_FILE= /var/run/${UNIQUENAME}.pid
|
2003-07-14 10:03:13 +00:00
|
|
|
|
2009-01-24 04:55:50 +00:00
|
|
|
JBOSSOUTPUT= ${WRKSRC}/build/output/${PORTNAME}-${PORTVERSION}
|
2009-11-18 22:11:46 +00:00
|
|
|
APP_HOME_FILES= bin/run.jar client lib common
|
2004-11-25 03:48:53 +00:00
|
|
|
|
2007-03-28 05:47:17 +00:00
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
|
|
|
2009-11-18 22:11:46 +00:00
|
|
|
SUB_LIST= APP_HOME=${DATADIR} \
|
|
|
|
APP_SHORTNAME=${UNIQUENAME} \
|
2007-03-28 05:47:17 +00:00
|
|
|
GROUP=${GROUP} \
|
|
|
|
LOG_DIR=${LOG_DIR} \
|
2009-11-18 22:11:46 +00:00
|
|
|
DEPLOY_DIR=${DEPLOY_DIR} \
|
2007-03-28 05:47:17 +00:00
|
|
|
PID_FILE=${PID_FILE} \
|
|
|
|
PKGNAME=${PKGNAME} \
|
|
|
|
PORTNAME=${PORTNAME} \
|
|
|
|
PORTVERSION=${PORTVERSION} \
|
|
|
|
PREFIX=${PREFIX} \
|
|
|
|
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
|
|
|
|
2011-03-21 15:02:21 +00:00
|
|
|
do-build:
|
|
|
|
@(cd ${BUILD_WRKSRC}; \
|
|
|
|
${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET})
|
|
|
|
|
2003-07-14 10:03:13 +00:00
|
|
|
do-install:
|
2009-11-18 22:11:46 +00:00
|
|
|
${MKDIR} ${DATADIR}/bin && ${CHOWN} -R ${USER}:${GROUP} ${DATADIR}
|
|
|
|
${MKDIR} ${DEPLOY_DIR} && ${CHOWN} ${USER}:${GROUP} ${DEPLOY_DIR}
|
2004-11-25 03:48:53 +00:00
|
|
|
(cd ${JBOSSOUTPUT} && ${FIND} ${APP_HOME_FILES} |\
|
2009-11-18 22:11:46 +00:00
|
|
|
${CPIO} -pdmu -R ${USER}:${GROUP} ${DATADIR})
|
|
|
|
(cd ${JBOSSOUTPUT}/server && ${FIND} . |\
|
|
|
|
${CPIO} -pdmu -R ${USER}:${GROUP} ${DEPLOY_DIR})
|
2011-03-21 15:02:21 +00:00
|
|
|
(cd ${WRKSRC}/jbossas/remoting/output/lib && ${FIND} . |\
|
|
|
|
${CPIO} -pdmu -R ${USER}:${GROUP} ${DATADIR}/common/lib)
|
|
|
|
(cd ${JBOSSOUTPUT}/client && ${FIND} jboss-remoting.jar jboss-serialization.jar |\
|
|
|
|
${CPIO} -pdmu -R ${USER}:${GROUP} ${DATADIR}/common/lib)
|
2003-07-14 10:03:13 +00:00
|
|
|
${INSTALL} -o ${USER} -g ${GROUP} -m 0640 /dev/null ${PID_FILE}
|
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:
|
2009-11-18 22:11:46 +00:00
|
|
|
@${ECHO_CMD} "@cwd ${VAR_DIR}" >> ${TMPPLIST}
|
|
|
|
@${FIND} -s ${JBOSSOUTPUT}/server -not -type d | \
|
|
|
|
${SED} -ne 's,^${JBOSSOUTPUT}/server/,${DEPLOY_DIR:S,^${VAR_DIR}/,,}/,p' >> ${TMPPLIST}
|
|
|
|
@${FIND} -s -d ${JBOSSOUTPUT}/server -type d | \
|
|
|
|
${SED} -ne 's,^${JBOSSOUTPUT}/server/,@dirrm ${DEPLOY_DIR:S,^${VAR_DIR}/,,}/,p' >> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@dirrm ${DEPLOY_DIR:S,^${VAR_DIR}/,,}" >> ${TMPPLIST}
|
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>
|