summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/james/Makefile20
-rw-r--r--mail/james/distinfo4
-rw-r--r--mail/james/files/james.in168
-rw-r--r--mail/james/pkg-plist155
4 files changed, 184 insertions, 163 deletions
diff --git a/mail/james/Makefile b/mail/james/Makefile
index 5a48731b3e48..df06279c2249 100644
--- a/mail/james/Makefile
+++ b/mail/james/Makefile
@@ -2,34 +2,34 @@
# $FreeBSD$
PORTNAME= james
-PORTVERSION= 2.3.1
-PORTREVISION= 1
+PORTVERSION= 2.3.2.1
CATEGORIES= mail java
-MASTER_SITES= APACHE/${PORTNAME}/server/binaries
+MASTER_SITES= APACHE/${PORTNAME}/server/
DISTNAME= ${PORTNAME}-binary-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Java SMTP and POP3 Mail server and NNTP News server
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
USES= cpe
CPE_VENDOR= apache
USE_JAVA= yes
JAVA_VERSION= 1.6+
-NO_BUILD= YES
+NO_ARCH= yes
+NO_BUILD= yes
USE_RC_SUBR= james
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
APP_HOME?= ${PREFIX}/${PKGBASE}${PORTVERSION}
-PID_FILE= /var/run/${APP_SHORTNAME}.pid
+PID_FILE= /var/run/${PORTNAME}.pid
PLIST_SUB+= T=${APP_HOME:S/^${PREFIX}\///}
SUB_LIST= JAVA_HOME=${JAVA_HOME} \
PID_FILE=${PID_FILE} \
- JAMES_HOME=${APP_HOME} \
- JAMES_VERSION=${PORTVERSION:S/.//g}
-
-.include <bsd.port.pre.mk>
+ JAMES_HOME=${APP_HOME}
pre-patch:
@${ECHO_MSG} "Installation settings:"
@@ -60,4 +60,4 @@ do-install:
post-install:
@${ECHO_MSG} "${PORTNAME} ${PORTVERSION} has been installed in ${APP_HOME}."
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/mail/james/distinfo b/mail/james/distinfo
index b8d2ef382d57..71bccbea0771 100644
--- a/mail/james/distinfo
+++ b/mail/james/distinfo
@@ -1,2 +1,2 @@
-SHA256 (james-binary-2.3.1.tar.gz) = 280cca87c4a0f55504af9fcbaec5ab045a91a87359744bc7fc54a4bf20cf4122
-SIZE (james-binary-2.3.1.tar.gz) = 7570886
+SHA256 (james-binary-2.3.2.1.tar.gz) = dc7ada2846e2fbbcdb0613240170e89cc61ae66ec89cecd9805dbd24cefcf119
+SIZE (james-binary-2.3.2.1.tar.gz) = 7661407
diff --git a/mail/james/files/james.in b/mail/james/files/james.in
index 838ae5f61443..75b52265471a 100644
--- a/mail/james/files/james.in
+++ b/mail/james/files/james.in
@@ -2,95 +2,100 @@
#
# $FreeBSD$
#
-
+# PROVIDE: james
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
#
-# Configuration settings for geronimo%%GERONIMO_VERSION%% in /etc/rc.conf:
+# Configuration settings for james in /etc/rc.conf:
#
-# james%%JAMES_VERSION%%_enable (bool):
+# james_enable (bool):
# Set to "NO" by default.
-# Set it to "YES" to enable james%%JAMES_VERSION%%
-#
+# Set it to "YES" to enable james
#
-# james%%JAMES_VERSION%%_home (str)
+# james_home (str)
# Set to "%%JAMES_HOME%%" by default.
# Set the JAMES_HOME variable for the James process
#
-# james%%JAMES_VERSION%%_base (str)
+# james_base (str)
# Set to "%%JAMES_HOME%%" by default.
# Set the JAMES_BASE variable for the James process
#
-# james%%JAMES_VERSION%%_tmpdir (str)
+# james_tmpdir (str)
# Set to "/tmp" by default.
#
-# geronimo%%GERONIMO_VERSION%%_stop_timeout (num)
+# james_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.
+# Sets the timeout in seconds to allow james to shutdown.
+# After the timeout has elapsed, james will be killed.
#
-# james%%JAMES_VERSION%%_java_home (str):
-# james%%JAMES_VERSION%%_java_vendor (str):
-# james%%JAMES_VERSION%%_java_version (str):
-# james%%JAMES_VERSION%%_java_os (str):
+# james_java_home (str):
+# james_java_vendor (str):
+# james_java_version (str):
+# james_java_os (str):
# Specify the requirements of the Java VM to use. See javavm(1).
#
-# james%%JAMES_VERSION%%_classpath (str):
+# james_classpath (str):
# Set to "" by default.
# Addtional classes to add to the CLASSPATH
#
-# james%%JAMES_VERSION%%_java_opts (str):
+# james_java_opts (str):
# Set to "" by default.
# Java VM args to use.
#
-james%%JAMES_VERSION%%_enable="${james%%JAMES_VERSION%%_enable:-"NO"}"
-james%%JAMES_VERSION%%_java_version="${james%%JAMES_VERSION%%_java_version:-"%%JAVA_VERSION%%"}"
-james%%JAMES_VERSION%%_home="${james%%JAMES_VERSION%%_home:-"%%JAMES_HOME%%"}"
-james%%JAMES_VERSION%%_base="${james%%JAMES_VERSION%%_base:-"%%JAMES_HOME%%"}"
-james%%JAMES_VERSION%%_tmpdir="${james%%JAMES_VERSION%%_tmpdir:-"/tmp"}"
-james%%JAMES_VERSION%%_stop_timeout="${james%%JAMES_VERSION%%_stop_timeout:-"10"}"
+james_enable="${james_enable:-"NO"}"
+james_java_version="${james_java_version:-"%%JAVA_VERSION%%"}"
+james_home="${james_home:-"%%JAMES_HOME%%"}"
+james_base="${james_base:-"%%JAMES_HOME%%"}"
+james_tmpdir="${james_tmpdir:-"/tmp"}"
+james_stop_timeout="${james_stop_timeout:-"10"}"
. /etc/rc.subr
-name="james%%JAMES_VERSION%%"
-rcvar=james%%JAMES_VERSION%%_enable
+name=james
+rcvar=james_enable
pidfile="%%PID_FILE%%"
-JAVA_HOME=%%JAVA_HOME%%
-JRE_HOME=$JAVA_HOME/jre
+load_rc_config "${name}"
-JVM_EXT_DIRS="${james%%JAMES_VERSION%%_home}/lib:${james%%JAMES_VERSION%%_home}/tools/lib"
-JVM_OPTS="-Djava.ext.dirs=$JVM_EXT_DIRS"
+for var in $(list_vars "james[0-9]*"); do
+ echo "WARNING: \$$var is deprecated, use \$james_${var#*_} instead."
+ eval james_${var#*_}=\"\$$var\"
+done
-load_rc_config "${name}"
+JAVA_HOME="%%JAVA_HOME%%"
+JRE_HOME="$JAVA_HOME/jre"
+JVM_EXT_DIRS="${james_home}/lib:${james_home}/tools/lib"
+JVM_OPTS="-Djava.ext.dirs=$JVM_EXT_DIRS"
-if [ -n "${james%%JAMES_VERSION%%_java_home}" ] ; then
- export JAVA_HOME="${james%%JAMES_VERSION%%_java_home}"
+if [ -n "${james_java_home}" ] ; then
+ export JAVA_HOME="${james_java_home}"
fi
-if [ -n "${james%%JAMES_VERSION%%_java_version}" ] ; then
- export JAVA_VERSION="${james%%JAMES_VERSION%%_java_version}"
+if [ -n "${james_java_version}" ] ; then
+ export JAVA_VERSION="${james_java_version}"
fi
-if [ -n "${james%%JAMES_VERSION%%_java_vendor}" ] ; then
- export JAVA_VENDOR="${james%%JAMES_VERSION%%_java_vendor}"
+if [ -n "${james_java_vendor}" ] ; then
+ export JAVA_VENDOR="${james_java_vendor}"
fi
-if [ -n "${james%%JAMES_VERSION%%_java_os}" ] ; then
- export JAVA_OS="${james%%JAMES_VERSION%%_java_os}"
+if [ -n "${james_java_os}" ] ; then
+ export JAVA_OS="${james_java_os}"
fi
if [ "$JAVA_HOME" = "" ] ; then
- echo "ERROR: JAVA_HOME not found in your environment."
- echo
- echo "Please, set the JAVA_HOME variable in your environment to match the"
- echo "location of the Java Virtual Machine you want to use."
- exit 1
+ echo "ERROR: JAVA_HOME not found in your environment."
+ echo
+ echo "Please, set the JAVA_HOME variable in your environment to match the"
+ echo "location of the Java Virtual Machine you want to use."
+ return 1
fi
-if [ -z "${james%%JAMES_VERSION%%_tmpdir}" ] ; then
- # Define the java.io.tmpdir to use for Phoenix
- james%%JAMES_VERSION%%_tmpdir="${james%%JAMES_VERSION%%_home}"/temp
- mkdir -p "${james%%JAMES_VERSION%%_tmpdir}"
+if [ -z "${james_tmpdir}" ] ; then
+ # Define the java.io.tmpdir to use for Phoenix
+ james_tmpdir="${james_home}"/temp
+ mkdir -p "${james_tmpdir}"
fi
java_cmd=
@@ -102,43 +107,58 @@ fi
java_command="$java_cmd $JVM_OPTS \
- -Djava.security.policy=jar:file:${james%%JAMES_VERSION%%_home}/bin/phoenix-loader.jar!/META-INF/java.policy \
- -Dphoenix.home=${james%%JAMES_VERSION%%_home} \
- -Djava.io.tmpdir=${james%%JAMES_VERSION%%_tmpdir} \
- -jar ${james%%JAMES_VERSION%%_home}/bin/phoenix-loader.jar >/dev/null"
+ -Djava.security.policy=jar:file:${james_home}/bin/phoenix-loader.jar!/META-INF/java.policy \
+ -Dphoenix.home=${james_home} \
+ -Djava.io.tmpdir=${james_tmpdir} \
+ -jar ${james_home}/bin/phoenix-loader.jar >/dev/null"
PHOENIX_CONSOLE="$PHOENIX_TMPDIR/phoenix.console"
-if [ -z "$PHOENIX_CONSOLE" ]
-then
- if [ -w /dev/console ]
- then
- PHOENIX_CONSOLE=/dev/console
- else
- PHOENIX_CONSOLE=/dev/tty
- fi
+if [ -z "$PHOENIX_CONSOLE" ] ; then
+ if [ -w /dev/console ]; then
+ PHOENIX_CONSOLE=/dev/console
+ else
+ PHOENIX_CONSOLE=/dev/tty
+ fi
fi
-
# 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
+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_command}"
+start_cmd=james_start
+status_cmd=james_status
+stop_cmd=james_stop
+
+james_start() {
+ rc_pid=$(check_pidfile $pidfile *$procname*)
+
+ if [ ! -z "$rc_pid" ]; then
+ echo "Already running!"
+ return 1
+ fi
+
+ echo "Starting ${name}."
+ nohup sh -c "exec $java_command >>$PHOENIX_CONSOLE 2>&1" >/dev/null &
+ echo $! > $pidfile
+}
-start_precmd=pid_touch
-stop_cmd="james%%JAMES_VERSION%%_stop"
+james_status() {
+ rc_pid=$(check_pidfile $pidfile *$procname*)
-pid_touch ()
-{
- touch $pidfile
+ if [ -z "$rc_pid" ]; then
+ echo "${name} not running"
+ return 1
+ else
+ echo "${name} is running as pid $rc_pid"
+ return 0
+ fi
}
-james%%JAMES_VERSION%%_stop() {
+james_stop() {
rc_pid=$(check_pidfile $pidfile *$procname*)
if [ -z "$rc_pid" ]; then
@@ -153,7 +173,7 @@ james%%JAMES_VERSION%%_stop() {
echo "Stopping ${name}."
kill ${rc_pid}>/dev/null
- james_wait_max_for_pid ${james%%JAMES_VERSION%%_stop_timeout} ${rc_pid}
+ james_wait_max_for_pid ${james_stop_timeout} ${rc_pid}
kill -KILL ${rc_pid} 2> /dev/null && echo "Killed."
echo -n > ${pidfile}
}
diff --git a/mail/james/pkg-plist b/mail/james/pkg-plist
index c044ba790581..bd9409f526d2 100644
--- a/mail/james/pkg-plist
+++ b/mail/james/pkg-plist
@@ -1,77 +1,78 @@
-james2.3.1/LICENSE.txt
-james2.3.1/NOTICE.txt
-james2.3.1/README.txt
-james2.3.1/UPGRADE.txt
-james2.3.1/apps/dummy.txt
-james2.3.1/apps/james.sar
-james2.3.1/bin/Wrapper.LICENSE
-james2.3.1/bin/Wrapper.dll
-james2.3.1/bin/derby.properties
-james2.3.1/bin/lib/excalibur-cli-1.0.jar
-james2.3.1/bin/lib/excalibur-extension-1.0a.jar
-james2.3.1/bin/lib/excalibur-instrument-manager-1.0.jar
-james2.3.1/bin/lib/excalibur-io-1.1.jar
-james2.3.1/bin/lib/excalibur-logger-2.1.jar
-james2.3.1/bin/lib/excalibur-monitor-2.1.jar
-james2.3.1/bin/lib/jakarta-oro-2.0.8.jar
-james2.3.1/bin/lib/mx4j-jmx.jar
-james2.3.1/bin/lib/mx4j-tools.jar
-james2.3.1/bin/lib/mx4j.LICENSE
-james2.3.1/bin/lib/phoenix-engine.jar
-james2.3.1/bin/lib/spice-classman-1.0.jar
-james2.3.1/bin/lib/spice-loggerstore-0.5.jar
-james2.3.1/bin/lib/spice-salt-0.8.jar
-james2.3.1/bin/lib/spice-xmlpolicy-1.0.jar
-james2.3.1/bin/lib/spice.LICENSE
-james2.3.1/bin/phoenix-loader.jar
-james2.3.1/bin/phoenix.sh
-james2.3.1/bin/run.sh
-james2.3.1/bin/sendmail.py
-james2.3.1/bin/wrapper.jar
-james2.3.1/conf/kernel.xml
-james2.3.1/conf/phoenix-service.xml
-james2.3.1/conf/wrapper.conf
-james2.3.1/ext/README.txt
-james2.3.1/lib/avalon-framework-api-4.3.jar
-james2.3.1/lib/avalon-framework-impl-4.3.jar
-james2.3.1/lib/avalon-logkit-2.1.jar
-james2.3.1/lib/commons-collections-2.1.1.jar
-james2.3.1/lib/concurrent-1.3.4.jar
-james2.3.1/lib/excalibur-cli-1.0.jar
-james2.3.1/lib/excalibur-extension-1.0a.jar
-james2.3.1/lib/excalibur-instrument-api-2.1.jar
-james2.3.1/lib/excalibur-instrument-manager-1.0.jar
-james2.3.1/lib/excalibur-io-1.1.jar
-james2.3.1/lib/excalibur-logger-2.1.jar
-james2.3.1/lib/excalibur-monitor-2.1.jar
-james2.3.1/lib/excalibur-pool-api-2.1.jar
-james2.3.1/lib/excalibur-pool-impl-2.1.jar
-james2.3.1/lib/excalibur-thread-api-2.1.jar
-james2.3.1/lib/excalibur-thread-impl-2.1.jar
-james2.3.1/lib/jakarta-oro-2.0.8.jar
-james2.3.1/lib/mx4j-jmx.jar
-james2.3.1/lib/mx4j-tools.jar
-james2.3.1/lib/mx4j.LICENSE
-james2.3.1/lib/phoenix-client.jar
-james2.3.1/lib/phoenix-engine.jar
-james2.3.1/lib/spice-classman-1.0.jar
-james2.3.1/lib/spice-loggerstore-0.5.jar
-james2.3.1/lib/spice-salt-0.8.jar
-james2.3.1/lib/spice-xmlpolicy-1.0.jar
-james2.3.1/lib/spice.LICENSE
-james2.3.1/lib/tools.jar
-james2.3.1/logs/readme.txt
-james2.3.1/tools/lib/excalibur-i18n-1.0.jar
-james2.3.1/tools/lib/isorelax-20020414.jar
-james2.3.1/tools/lib/isorelax.LICENSE
-james2.3.1/tools/lib/msv-20020414.jar
-james2.3.1/tools/lib/msv.LICENSE
-james2.3.1/tools/lib/phoenix-tools.jar
-james2.3.1/tools/lib/qdox-1.1.jar
-james2.3.1/tools/lib/qdox.LICENSE
-james2.3.1/tools/lib/relaxngDatatype-20020414.jar
-james2.3.1/tools/lib/relaxngDatatype.LICENSE
-james2.3.1/tools/lib/spice-configkit-1.1.2.jar
-james2.3.1/tools/lib/spice.LICENSE
-james2.3.1/tools/lib/xsdlib-20020414.jar
-james2.3.1/tools/lib/xsdlib.LICENSE
+%%T%%/LICENSE.txt
+%%T%%/NOTICE.txt
+%%T%%/README.txt
+%%T%%/RELEASE_NOTES.txt
+%%T%%/UPGRADE.txt
+%%T%%/apps/dummy.txt
+%%T%%/apps/james.sar
+%%T%%/bin/Wrapper.LICENSE
+%%T%%/bin/Wrapper.dll
+%%T%%/bin/derby.properties
+%%T%%/bin/lib/excalibur-cli-1.0.jar
+%%T%%/bin/lib/excalibur-extension-1.0a.jar
+%%T%%/bin/lib/excalibur-instrument-manager-1.0.jar
+%%T%%/bin/lib/excalibur-io-1.1.jar
+%%T%%/bin/lib/excalibur-logger-2.1.jar
+%%T%%/bin/lib/excalibur-monitor-2.1.jar
+%%T%%/bin/lib/jakarta-oro-2.0.8.jar
+%%T%%/bin/lib/mx4j-jmx.jar
+%%T%%/bin/lib/mx4j-tools.jar
+%%T%%/bin/lib/mx4j.LICENSE
+%%T%%/bin/lib/phoenix-engine.jar
+%%T%%/bin/lib/spice-classman-1.0.jar
+%%T%%/bin/lib/spice-loggerstore-0.5.jar
+%%T%%/bin/lib/spice-salt-0.8.jar
+%%T%%/bin/lib/spice-xmlpolicy-1.0.jar
+%%T%%/bin/lib/spice.LICENSE
+%%T%%/bin/phoenix-loader.jar
+%%T%%/bin/phoenix.sh
+%%T%%/bin/run.sh
+%%T%%/bin/sendmail.py
+%%T%%/bin/wrapper.jar
+%%T%%/conf/kernel.xml
+%%T%%/conf/phoenix-service.xml
+%%T%%/conf/wrapper.conf
+%%T%%/ext/README.txt
+%%T%%/lib/avalon-framework-api-4.3.jar
+%%T%%/lib/avalon-framework-impl-4.3.jar
+%%T%%/lib/avalon-logkit-2.1.jar
+%%T%%/lib/commons-collections-2.1.1.jar
+%%T%%/lib/concurrent-1.3.4.jar
+%%T%%/lib/excalibur-cli-1.0.jar
+%%T%%/lib/excalibur-extension-1.0a.jar
+%%T%%/lib/excalibur-instrument-api-2.1.jar
+%%T%%/lib/excalibur-instrument-manager-1.0.jar
+%%T%%/lib/excalibur-io-1.1.jar
+%%T%%/lib/excalibur-logger-2.1.jar
+%%T%%/lib/excalibur-monitor-2.1.jar
+%%T%%/lib/excalibur-pool-api-2.1.jar
+%%T%%/lib/excalibur-pool-impl-2.1.jar
+%%T%%/lib/excalibur-thread-api-2.1.jar
+%%T%%/lib/excalibur-thread-impl-2.1.jar
+%%T%%/lib/jakarta-oro-2.0.8.jar
+%%T%%/lib/mx4j-jmx.jar
+%%T%%/lib/mx4j-tools.jar
+%%T%%/lib/mx4j.LICENSE
+%%T%%/lib/phoenix-client.jar
+%%T%%/lib/phoenix-engine.jar
+%%T%%/lib/spice-classman-1.0.jar
+%%T%%/lib/spice-loggerstore-0.5.jar
+%%T%%/lib/spice-salt-0.8.jar
+%%T%%/lib/spice-xmlpolicy-1.0.jar
+%%T%%/lib/spice.LICENSE
+%%T%%/lib/tools.jar
+%%T%%/logs/readme.txt
+%%T%%/tools/lib/excalibur-i18n-1.0.jar
+%%T%%/tools/lib/isorelax-20020414.jar
+%%T%%/tools/lib/isorelax.LICENSE
+%%T%%/tools/lib/msv-20020414.jar
+%%T%%/tools/lib/msv.LICENSE
+%%T%%/tools/lib/phoenix-tools.jar
+%%T%%/tools/lib/qdox-1.1.jar
+%%T%%/tools/lib/qdox.LICENSE
+%%T%%/tools/lib/relaxngDatatype-20020414.jar
+%%T%%/tools/lib/relaxngDatatype.LICENSE
+%%T%%/tools/lib/spice-configkit-1.1.2.jar
+%%T%%/tools/lib/spice.LICENSE
+%%T%%/tools/lib/xsdlib-20020414.jar
+%%T%%/tools/lib/xsdlib.LICENSE