2012-12-10 14:43:43 +01:00
|
|
|
# Created by: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
|
2003-09-29 14:57:59 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-10-14 08:37:41 +02:00
|
|
|
PORTNAME= resin
|
2013-01-08 06:10:44 +01:00
|
|
|
PORTVERSION= 3.1.13
|
2004-10-14 08:37:41 +02:00
|
|
|
CATEGORIES= www java
|
|
|
|
MASTER_SITES= http://www.caucho.com/download/
|
2003-09-29 14:57:59 +02:00
|
|
|
|
2012-03-13 17:29:23 +01:00
|
|
|
MAINTAINER= 5u623l20@gmail.com
|
2012-10-17 23:34:35 +02:00
|
|
|
COMMENT= Java-based Application Server, 3.x branch
|
2003-09-29 14:57:59 +02:00
|
|
|
|
2012-10-17 23:34:35 +02:00
|
|
|
OPTIONS_DEFINE= APACHE22
|
|
|
|
APACHE22_DESC= Use Apache 2.2
|
2012-03-13 17:29:23 +01:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2005-02-24 23:50:29 +01:00
|
|
|
USE_JAVA= yes
|
2012-12-10 14:43:43 +01:00
|
|
|
JAVA_VERSION= 1.6+
|
2004-10-14 08:37:41 +02:00
|
|
|
HAS_CONFIGURE= yes
|
2005-02-24 23:50:29 +01:00
|
|
|
USE_PYTHON= yes
|
2005-04-26 00:13:54 +02:00
|
|
|
USE_OPENSSL= yes
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= libtool
|
2007-10-23 16:43:18 +02:00
|
|
|
USE_LDCONFIG= yes
|
2003-09-29 14:57:59 +02:00
|
|
|
|
2012-03-13 17:29:23 +01:00
|
|
|
USERS= www
|
|
|
|
GROUPS= www
|
|
|
|
SHAREOWN= www
|
|
|
|
SHAREGRP= www
|
|
|
|
|
2003-09-29 14:57:59 +02:00
|
|
|
# Customizable settings
|
2004-10-14 08:37:41 +02:00
|
|
|
PORT?= 8080
|
2003-11-20 22:44:14 +01:00
|
|
|
# Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION
|
|
|
|
# If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11
|
|
|
|
APP_NAME_SUFFIX= ${PORTVERSION:C/\..*$//}
|
2004-10-14 08:37:41 +02:00
|
|
|
APP_NAME?= ${PORTNAME}${APP_NAME_SUFFIX}
|
|
|
|
LATEST_LINK= ${APP_NAME}
|
|
|
|
APP_HOME?= ${PREFIX}/${APP_NAME}
|
2005-02-24 23:50:29 +01:00
|
|
|
PID_FILE?= ${APP_HOME}/${APP_NAME}.pid
|
|
|
|
LOG_FILE?= ${APP_HOME}/${APP_NAME}.log
|
2003-09-29 14:57:59 +02:00
|
|
|
|
|
|
|
# Other settings
|
2004-10-14 08:37:41 +02:00
|
|
|
APXS?= ${LOCALBASE}/sbin/apxs
|
2012-03-13 17:29:23 +01:00
|
|
|
SUB_FILES= pkg-message resin3ctl
|
2012-04-03 01:51:25 +02:00
|
|
|
USE_RC_SUBR= resin3
|
2003-09-29 14:57:59 +02:00
|
|
|
|
2004-06-24 09:43:27 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2003-09-29 14:57:59 +02:00
|
|
|
# Pass JAVA_HOME as determined by bsd.java.mk
|
2005-04-26 00:13:54 +02:00
|
|
|
CONFIGURE_ARGS+= --with-java-home=${JAVA_HOME} \
|
|
|
|
--with-openssl-lib=${OPENSSLLIB} \
|
|
|
|
--with-openssl-include=${OPENSSLINC}
|
2006-01-07 03:14:18 +01:00
|
|
|
LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl
|
2006-04-03 17:06:06 +02:00
|
|
|
# We need to link with cc instead of ld for the FreeBSD specific options used
|
|
|
|
# by threading libraries
|
2011-09-24 00:26:39 +02:00
|
|
|
CONFIGURE_ENV= LD=${CC} PTHREAD_LIBS="${PTHREAD_LIBS}" LIBTOOL=${LIBTOOL}
|
2003-09-29 14:57:59 +02:00
|
|
|
|
|
|
|
# Install the Apache plugin if needed
|
2012-10-17 23:34:35 +02:00
|
|
|
.if ${PORT_OPTIONS:MAPACHE22}
|
2012-03-13 17:29:23 +01:00
|
|
|
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache22
|
2003-09-29 14:57:59 +02:00
|
|
|
CONFIGURE_ARGS+= --with-apxs=${APXS}
|
2012-03-13 17:29:23 +01:00
|
|
|
PLIST_SUB+= MOD_DIR=libexec/apache22
|
2003-11-20 22:44:14 +01:00
|
|
|
# Allow apxs invocations
|
2004-10-14 08:37:41 +02:00
|
|
|
PLIST_SUB+= APACHE=""
|
2003-09-29 14:57:59 +02:00
|
|
|
.else
|
2004-10-14 08:37:41 +02:00
|
|
|
PLIST_SUB+= MOD_DIR="@comment "
|
2003-11-20 22:44:14 +01:00
|
|
|
# Prevent apxs invocations
|
2004-10-14 08:37:41 +02:00
|
|
|
PLIST_SUB+= APACHE="@comment "
|
2003-09-29 14:57:59 +02:00
|
|
|
.endif
|
|
|
|
|
2012-03-13 17:29:23 +01:00
|
|
|
PLIST_SUB+= APP_NAME=${APP_NAME} \
|
|
|
|
APXS=${APXS} \
|
|
|
|
GROUPS=${GROUPS} \
|
|
|
|
USERS=${USERS}
|
|
|
|
|
|
|
|
SUB_LIST= APP_HOME=${APP_HOME} \
|
|
|
|
APP_NAME=${APP_NAME} \
|
|
|
|
GROUPS=${GROUPS} \
|
|
|
|
LOCALBASE=${LOCALBASE} \
|
|
|
|
LOG_FILE=${LOG_FILE} \
|
|
|
|
PID_FILE=${PID_FILE} \
|
|
|
|
PORT=${PORT} \
|
|
|
|
PREFIX=${PREFIX} \
|
|
|
|
PYTHON_CMD=${PYTHON_CMD} \
|
|
|
|
USERS=${USERS}
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
@${MKDIR} ${WRKSRC}/webapps/resin-doc
|
|
|
|
@${TAR} xf ${WRKSRC}/webapps/resin-doc.war -C ${WRKSRC}/webapps/resin-doc && ${RM} ${WRKSRC}/webapps/resin-doc.war
|
2003-11-20 22:44:14 +01:00
|
|
|
|
|
|
|
post-patch:
|
2012-03-13 17:29:23 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|$${resin.home}/conf/app-default.xml|${PREFIX}/etc/${APP_NAME}/app-default.xml|' \
|
|
|
|
${WRKSRC}/conf/resin.conf
|
2003-09-29 14:57:59 +02:00
|
|
|
|
2005-08-29 16:56:50 +02:00
|
|
|
post-build:
|
2006-04-11 20:04:38 +02:00
|
|
|
cd ${WRKSRC}/modules/c/src/resin_os && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} install
|
2005-08-29 16:56:50 +02:00
|
|
|
|
2006-01-07 03:14:18 +01:00
|
|
|
# Resin does not handle installation, so proceed now
|
2005-08-29 16:56:50 +02:00
|
|
|
do-install:
|
2012-03-13 17:29:23 +01:00
|
|
|
.for i in ${APP_HOME} ${APP_HOME}/lib ${PREFIX}/etc/${APP_NAME}
|
|
|
|
@install -d -g ${WWWOWN} -o ${WWWGRP} ${i}
|
|
|
|
.endfor
|
|
|
|
if [ ! -e ${PREFIX}/etc/${APP_NAME}/resin.xml ]; then \
|
|
|
|
${ECHO_MSG} " Installing local configuration file: ${PREFIX}/etc/${APP_NAME}/resin.xml" ;\
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/resin.conf ${PREFIX}/etc/${APP_NAME}/resin.xml ;\
|
|
|
|
else \
|
|
|
|
${ECHO_MSG} " Preserving local configuration file: ${PREFIX}/etc/${APP_NAME}/resin.xml" ;\
|
|
|
|
fi
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/resin.conf ${PREFIX}/etc/${APP_NAME}/resin.xml-dist
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/app-default.xml ${PREFIX}/etc/${APP_NAME}
|
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/resin3ctl ${PREFIX}/sbin
|
|
|
|
cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} \* ${APP_HOME}/webapps
|
|
|
|
cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${APP_HOME}/lib
|
|
|
|
|
2012-10-17 23:34:35 +02:00
|
|
|
.if ${PORT_OPTIONS:MAPACHE22}
|
2005-09-01 16:26:39 +02:00
|
|
|
${APXS} -i -n caucho -a ${WRKSRC}/modules/c/src/apache2/.libs/mod_caucho.so
|
|
|
|
.endif
|
2005-04-20 16:47:35 +02:00
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "********************************************************************************"
|
2005-02-24 23:50:29 +01:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2005-04-20 16:47:35 +02:00
|
|
|
@${ECHO_MSG} "********************************************************************************"
|
|
|
|
@${ECHO_MSG}
|
2003-09-29 14:57:59 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|