diff options
author | gahr <gahr@FreeBSD.org> | 2012-07-09 21:36:34 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2012-07-09 21:36:34 +0800 |
commit | 1597040fbff3bd7dd562328054758ea2d5ccd010 (patch) | |
tree | e0914ff7900b0f44eb515f5ad1ccbd239d9e2426 /www/geronimo | |
parent | f1b7ed7ff3c3c8a2d6792fccaa3f8f20fe611f9a (diff) | |
download | freebsd-ports-gnome-1597040fbff3bd7dd562328054758ea2d5ccd010.tar.gz freebsd-ports-gnome-1597040fbff3bd7dd562328054758ea2d5ccd010.tar.zst freebsd-ports-gnome-1597040fbff3bd7dd562328054758ea2d5ccd010.zip |
- Update to 3.0-beta-1
Diffstat (limited to 'www/geronimo')
-rw-r--r-- | www/geronimo/Makefile | 20 | ||||
-rw-r--r-- | www/geronimo/distinfo | 4 | ||||
-rw-r--r-- | www/geronimo/files/geronimo2.sh.in | 178 | ||||
-rw-r--r-- | www/geronimo/files/geronimo3.sh.in | 40 |
4 files changed, 53 insertions, 189 deletions
diff --git a/www/geronimo/Makefile b/www/geronimo/Makefile index 028fa6b48d87..c5e07c1fbf9c 100644 --- a/www/geronimo/Makefile +++ b/www/geronimo/Makefile @@ -6,11 +6,11 @@ # PORTNAME= geronimo -PORTVERSION= 2.2.1 +DISTVERSION= 3.0-beta-1 CATEGORIES= www devel java MASTER_SITES= ${MASTER_SITE_APACHE} -MASTER_SITE_SUBDIR= geronimo/${PORTVERSION} -DISTNAME= ${PORTNAME}-${WEBSERVER}-javaee5-${PORTVERSION}-bin +MASTER_SITE_SUBDIR= geronimo/${DISTVERSION} +DISTNAME= ${PORTNAME}-${WEBSERVER}-javaee6-${DISTVERSION}-bin MAINTAINER= ports@FreeBSD.org COMMENT= Open-source Java EE 5 application server @@ -19,17 +19,17 @@ USE_JAVA= yes JAVA_VERSION= 1.5+ NO_BUILD= YES -USE_RC_SUBR= geronimo2.sh +USE_RC_SUBR= geronimo3.sh SUB_FILES= pkg-deinstall -OPTIONS= TOMCAT6 "Use Tomcat instead of default Jetty" off +OPTIONS= TOMCAT7 "Use Tomcat instead of default Jetty" off .include <bsd.port.pre.mk> -.if defined(WITH_TOMCAT6) -WEBSERVER= tomcat6 +.if defined(WITH_TOMCAT7) +WEBSERVER= tomcat7 .else -WEBSERVER= jetty7 +WEBSERVER= jetty8 .endif MAJOR_VER= ${PORTVERSION:C/\..*//} @@ -61,7 +61,8 @@ SUB_LIST= GERONIMO_HOME=${APP_HOME} \ USER=${GERONIMO_USER} \ GERONIMO_VERSION=${MAJOR_VER} \ GERONIMO_OUT=${GERONIMO_OUT} \ - JAVA_HOME=${JAVA_HOME} + JAVA_HOME=${JAVA_HOME} \ + JAVA_VERSION=${JAVA_VERSION} pre-patch: @${ECHO_MSG} "Installation settings:" @@ -75,6 +76,7 @@ post-patch: @${ECHO_MSG} -n ">> Removing unneeded files..." @${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'` @${ECHO_MSG} " [ DONE ]" + @${REINPLACE_CMD} -e '/^activemq.data/s|= |= ${APP_HOME}/|' ${WRKSRC}/var/config/config-substitutions.properties do-install: ${MKDIR} ${APP_HOME} && ${CHOWN} ${GERONIMO_USER}:${GERONIMO_GROUP} ${APP_HOME} diff --git a/www/geronimo/distinfo b/www/geronimo/distinfo index 2466b241f55e..0486c9737a0c 100644 --- a/www/geronimo/distinfo +++ b/www/geronimo/distinfo @@ -1,2 +1,2 @@ -SHA256 (geronimo-jetty7-javaee5-2.2.1-bin.tar.gz) = 0d868528e6292938aa136e10f7e77f1eedea52a16e526717aa90cd11503364b1 -SIZE (geronimo-jetty7-javaee5-2.2.1-bin.tar.gz) = 112389760 +SHA256 (geronimo-jetty8-javaee6-3.0-beta-1-bin.tar.gz) = 759e9404f3d8c0462e27b3348a7847d4dd9715d7ef7abd9736a4e98f41b307ca +SIZE (geronimo-jetty8-javaee6-3.0-beta-1-bin.tar.gz) = 88349321 diff --git a/www/geronimo/files/geronimo2.sh.in b/www/geronimo/files/geronimo2.sh.in deleted file mode 100644 index 32f32f7c9011..000000000000 --- a/www/geronimo/files/geronimo2.sh.in +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: %%APP_SHORTNAME%% -# REQUIRE: NETWORKING SERVERS -# KEYWORD: shutdown - -# -# Configuration settings for geronimo%%GERONIMO_VERSION%% in /etc/rc.conf: -# -# geronimo%%GERONIMO_VERSION%%_enable (bool): -# Set to "NO" by default. -# Set it to "YES" to enable geronimo%%GERONIMO_VERSION%% -# -# geronimo%%GERONIMO_VERSION%%_flags (str): -# Set to "" by default. -# Extra flags passed to start command -# -# geronimo%%GERONIMO_VERSION%%_home (str) -# Set to "%%GERONIMO_HOME%%" by default. -# Set the CATALINA_HOME variable for the Tomcat process -# -# geronimo%%GERONIMO_VERSION%%_base (str) -# Set to "%%GERONIMO_HOME%%" by default. -# Set the CATALINA_BASE variable for the Tomcat process -# -# geronimo%%GERONIMO_VERSION%%_tmpdir (str) -# Set to "%%GERONIMO_HOME%%/temp" by default. -# -# geronimo%%GERONIMO_VERSION%%_out (str) -# Set to "%%GERONIMO_OUT%%" by default. -# Set the location for the Geronimo process log (standard output & error output) -# -# geronimo%%GERONIMO_VERSION%%_stop_timeout (num) -# Set to "10" by default. -# Sets the timeout in seconds to allow geronimo to shutdown. -# After the timeout has elapsed, geronimo will be killed. -# -# geronimo%%GERONIMO_VERSION%%_java_home (str): -# geronimo%%GERONIMO_VERSION%%_java_vendor (str): -# geronimo%%GERONIMO_VERSION%%_java_version (str): -# geronimo%%GERONIMO_VERSION%%_java_os (str): -# Specify the requirements of the Java VM to use. See javavm(1). -# -# geronimo%%GERONIMO_VERSION%%_classpath (str): -# Set to "" by default. -# Addtional classes to add to the CLASSPATH -# -# geronimo%%GERONIMO_VERSION%%_java_opts (str): -# Set to "" by default. -# Java VM args to use. -# - -geronimo%%GERONIMO_VERSION%%_enable="${geronimo%%GERONIMO_VERSION%%_enable:-"NO"}" -geronimo%%GERONIMO_VERSION%%_java_version="${geronimo%%GERONIMO_VERSION%%_java_version:-"%%JAVA_VERSION%%"}" -geronimo%%GERONIMO_VERSION%%_user="${geronimo%%GERONIMO_VERSION%%_user:-"%%USER%%"}" -geronimo%%GERONIMO_VERSION%%_home="${geronimo%%GERONIMO_VERSION%%_home:-"%%GERONIMO_HOME%%"}" -geronimo%%GERONIMO_VERSION%%_base="${geronimo%%GERONIMO_VERSION%%_base:-"%%GERONIMO_HOME%%"}" -geronimo%%GERONIMO_VERSION%%_tmpdir="${geronimo%%GERONIMO_VERSION%%_tmpdir:-"/tmp"}" -geronimo%%GERONIMO_VERSION%%_out="${geronimo%%GERONIMO_VERSION%%_out:-"%%GERONIMO_OUT%%"}" -geronimo%%GERONIMO_VERSION%%_stop_timeout="${geronimo%%GERONIMO_VERSION%%_stop_timeout:-"10"}" - -. /etc/rc.subr - -name="geronimo%%GERONIMO_VERSION%%" -rcvar=geronimo%%GERONIMO_VERSION%%_enable -pidfile="%%PID_FILE%%" - -JAVA_HOME=%%JAVA_HOME%% -JRE_HOME=$JAVA_HOME/jre -EXT_DIRS="$JRE_HOME/lib/ext:${geronimo%%GERONIMO_VERSION%%_home}/lib/ext" -ENDORSED_DIRS="$JRE_HOME/lib/endorsed:${geronimo%%GERONIMO_VERSION%%_home}/lib/endorsed" - -LONG_OPT= -if [ "$1" = "start" ] ; then - LONG_OPT=--long -fi - -load_rc_config "${name}" - -if [ -n "${geronimo%%GERONIMO_VERSION%%_java_home}" ] ; then - export JAVA_HOME="${geronimo%%GERONIMO_VERSION%%_java_home}" -fi - -if [ -n "${geronimo%%GERONIMO_VERSION%%_java_version}" ] ; then - export JAVA_VERSION="${geronimo%%GERONIMO_VERSION%%_java_version}" -fi - -if [ -n "${geronimo%%GERONIMO_VERSION%%_java_vendor}" ] ; then - export JAVA_VENDOR="${geronimo%%GERONIMO_VERSION%%_java_vendor}" -fi - -if [ -n "${geronimo%%GERONIMO_VERSION%%_java_os}" ] ; then - export JAVA_OS="${geronimo%%GERONIMO_VERSION%%_java_os}" -fi - -java_cmd= -if [ -z "${JAVA_HOME}" ] ; then - java_cmd=%%LOCALBASE%%/bin/java -else - java_cmd=${JAVA_HOME}/bin/java -fi - -java_command="$java_cmd \ - ${geronimo%%GERONIMO_VERSION%%_java_opts} \ - -Dorg.apache.geronimo.base.dir=${geronimo%%GERONIMO_VERSION%%_base} \ - -Djava.endorsed.dirs=$ENDORSED_DIRS \ - -Djava.ext.dirs=$EXT_DIRS \ - -Djava.io.tmpdir=${geronimo%%GERONIMO_VERSION%%_tmpdir}" - -java_start_command="${java_command} \ - -jar ${geronimo%%GERONIMO_VERSION%%_home}/bin/server.jar $LONG_OPT" - -java_stop_command="${java_command} \ - -jar ${geronimo%%GERONIMO_VERSION%%_home}/bin/shutdown.jar" - -log_args=">> ${geronimo%%GERONIMO_VERSION%%_out} 2>&1" - -# Subvert the check_pid_file procname check. -if [ -f $pidfile ]; then - read rc_pid junk < $pidfile - if [ ! -z "$rc_pid" ]; then - procname=`ps -o ucomm= $rc_pid` - fi -fi - -command="/usr/sbin/daemon" -flags="-p ${pidfile} ${java_start_command} ${geronimo%%GERONIMO_VERSION%%_flags} ${log_args}" - -start_precmd=pid_touch -stop_cmd="geronimo%%GERONIMO_VERSION%%_stop" - -pid_touch () -{ - touch $pidfile - chown $geronimo%%GERONIMO_VERSION%%_user $pidfile -} - -geronimo%%GERONIMO_VERSION%%_stop() { - rc_pid=$(check_pidfile $pidfile *$procname*) - - if [ -z "$rc_pid" ]; then - [ -n "$rc_fast" ] && return 0 - if [ -n "$pidfile" ]; then - echo "${name} not running? (check $pidfile)." - else - echo "${name} not running?" - fi - return 1 - fi - - echo "Stopping ${name}." - kill ${rc_pid} 2> /dev/null - geronimo_wait_max_for_pid ${geronimo%%GERONIMO_VERSION%%_stop_timeout} ${rc_pid} - kill -KILL ${rc_pid} 2> /dev/null && echo "Killed." - echo -n > ${pidfile} -} - -geronimo_wait_max_for_pid() { - _timeout=$1 - shift - _pid=$1 - _prefix= - while [ $_timeout -gt 0 ] ; do - echo -n ${_prefix:-"Waiting (max $_timeout secs) for PIDS: "}$_pid - _prefix=", " - sleep 2 - kill -0 $_pid 2> /dev/null || break - _timeout=$(($_timeout-2)) - done - if [ -n "$_prefix" ]; then - echo "." - fi -} - -run_rc_command "$1" diff --git a/www/geronimo/files/geronimo3.sh.in b/www/geronimo/files/geronimo3.sh.in new file mode 100644 index 000000000000..9b9842f4a3d3 --- /dev/null +++ b/www/geronimo/files/geronimo3.sh.in @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/www/geronimo/files/geronimo3.sh.in,v 1.1 2012-07-09 13:36:34 gahr Exp $ +# + +# PROVIDE: %%APP_SHORTNAME%% +# REQUIRE: NETWORKING SERVERS +# KEYWORD: shutdown + +. /etc/rc.subr + +name="geronimo%%GERONIMO_VERSION%%" +rcvar=geronimo%%GERONIMO_VERSION%%_enable +pidfile="%%PID_FILE%%" + +export JAVA_HOME=%%JAVA_HOME%% +export JRE_HOME=$JAVA_HOME/jre +export EXT_DIRS="$JRE_HOME/lib/ext:${geronimo%%GERONIMO_VERSION%%_home}/lib/ext" +export ENDORSED_DIRS="$JRE_HOME/lib/endorsed:${geronimo%%GERONIMO_VERSION%%_home}/lib/endorsed" +export GERONIMO_PID=$pidfile + + +start_cmd="geronimo%%GERONIMO_VERSION%%_start" +stop_cmd="geronimo%%GERONIMO_VERSION%%_stop" + +geronimo%%GERONIMO_VERSION%%_start() { + %%GERONIMO_HOME%%/bin/geronimo start +} + +geronimo%%GERONIMO_VERSION%%_stop() { + rc_pid=$(check_pidfile $pidfile ${JRE_HOME}/bin/java) + echo "Stopping ${name}." + kill ${rc_pid} 2> /dev/null + wait_for_pids ${rc_pid} + rm $pidfile +} + +load_rc_config "${name}" + +run_rc_command "$1" |