diff options
author | abs <abs@pkgsrc.org> | 2006-01-03 18:12:37 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2006-01-03 18:12:37 +0000 |
commit | bf64cd1ad53182ce8b4946775fcb38562532c991 (patch) | |
tree | 96e9d633b60c37e556afe9794c94225faadc2308 /www/apache-tomcat55/files | |
parent | ed2e784f64c256583c8ea193f53fa5a56f503f69 (diff) | |
download | pkgsrc-bf64cd1ad53182ce8b4946775fcb38562532c991.tar.gz |
Import apache-tomcat55 5.5.14 into pkgsrc:
Tomcat is the Java Servlet / Java Server Page environment produced
by the Apache Foundation's Tomcat Project. Tomcat can be run as a
standalone web server with Servlet and JSP support, or using Apache
Server as its web server via the mod_jk Apache module (www/ap-jk).
This is the Tomcat 5.5 package, which is a Java Serlet 2.4 and JSP
2.0 server.
This replaces jakarta-tomcat55, the old name for apache-tomcat.
pkgsrc previously had
pkgsrc jakarta-tomcat55 was 5.5.9 - there are over 300 lines of
changelog between that and 5.5.14:
http://tomcat.apache.org/tomcat-5.5-doc/changelog.html
Diffstat (limited to 'www/apache-tomcat55/files')
-rw-r--r-- | www/apache-tomcat55/files/getsite.sh | 8 | ||||
-rw-r--r-- | www/apache-tomcat55/files/tomcat.sh | 92 |
2 files changed, 100 insertions, 0 deletions
diff --git a/www/apache-tomcat55/files/getsite.sh b/www/apache-tomcat55/files/getsite.sh new file mode 100644 index 00000000000..3e954604c6a --- /dev/null +++ b/www/apache-tomcat55/files/getsite.sh @@ -0,0 +1,8 @@ +#!/bin/sh +TOMCAT_VERSION=${1##*-} +TOMCAT_VERSION=${TOMCAT_VERSION%%.tar.gz} +ftp -o - http://tomcat.apache.org/download-55.cgi | \ + grep '<option' | \ + tr -d '\n' | \ + sed -e's/[[:space:]]*//g' -e's,[^<]*<optionvalue="\([^"]*\)">[^<]*</option>,\1 ,g' | \ + sed -e"s,\(http:[^ ]*\),\1/tomcat/tomcat-5/v${TOMCAT_VERSION}/bin/,g" diff --git a/www/apache-tomcat55/files/tomcat.sh b/www/apache-tomcat55/files/tomcat.sh new file mode 100644 index 00000000000..ed948660378 --- /dev/null +++ b/www/apache-tomcat55/files/tomcat.sh @@ -0,0 +1,92 @@ +#! @RCD_SCRIPTS_SHELL@ +# +# $NetBSD: tomcat.sh,v 1.1.1.1 2006/01/03 18:12:37 abs Exp $ +# +# PROVIDE: tomcat +# REQUIRE: DAEMON +# +# To start tomcat at startup, copy this script to /etc/rc.d and set +# tomcat=YES in /etc/rc.conf. + +PREFIX=@PREFIX@ +TOMCAT_LIB=@TOMCAT_LIB@ + +if [ -z "${JAVA_HOME}" ] +then + JAVA_HOME="@JAVA_HOME@" + export JAVA_HOME +fi + +name="tomcat" +rcvar=$name +command="${TOMCAT_LIB}/bin/catalina.sh" + +# set defaults +if [ -r /etc/rc.conf ] +then + . /etc/rc.conf +else + eval ${rcvar}=YES +fi + +# $flags from environment overrides ${rcvar}_flags +if [ -n "${flags}" ] +then + eval ${rcvar}_flags="${flags}" +fi + +CLASSPATH=${CLASSPATH}:${PREFIX}/lib/java/servlet.jar:${PREFIX}/lib/java/jaxp.jar:${PREFIX}/lib/java/parser.jar:${PREFIX}/lib/java/crimson.jar:${PREFIX}/lib/java/ant.jar +if [ -n "${tomcat_classpath}" ] +then + CLASSPATH=${CLASSPATH}:${tomcat_classpath} +fi +export CLASSPATH + +cmd=${1:-start} + +checkyesno() +{ + eval _value=\$${1} + case $_value in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0 ;; + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) return 1 ;; + *) + echo "\$${1} is not set properly." + return 1 + ;; + esac +} + +if checkyesno ${rcvar} +then + if [ -x ${command} ] + then + case ${cmd} in + run|start) + echo "Starting ${name}." + (cd ${TOMCAT_LIB} && ${command} ${cmd}) + ;; + + stop) + echo "Stopping ${name}." + (cd ${TOMCAT_LIB} && ${command} ${cmd}) + ;; + + restart) + ( $0 stop ) + sleep 5 + $0 start + ;; + + flush) + cd ${TOMCAT_LIB}/work && rm -rf */* + ;; + + *) + echo 1>&2 "Usage: $0 [restart|start|stop|flush]" + exit 1 + ;; + esac + fi +fi +exit 0 |