aboutsummaryrefslogtreecommitdiff
path: root/www/jakarta-tomcat3
diff options
context:
space:
mode:
authorErnst de Haan <znerd@FreeBSD.org>2002-04-15 21:57:02 +0000
committerErnst de Haan <znerd@FreeBSD.org>2002-04-15 21:57:02 +0000
commit08ead3b1c5ddc71143d7964778cda581234f384f (patch)
treeab1fcda6b02e6ab8e33e190fa4e8b871c351a2cd /www/jakarta-tomcat3
parentbf09b3e4ae2cf607b5cea7d54c2a374c24945deb (diff)
downloadports-08ead3b1c5ddc71143d7964778cda581234f384f.tar.gz
ports-08ead3b1c5ddc71143d7964778cda581234f384f.zip
Now using daemonctl.1 and startup.sh from jakarta-tomcat4.
Renamed the control program to tomcat3ctl for consistency with tomcat4ctl. Now displaying installation settings in pre-patch phase. Customizing files using ${SED} in post-patch phase. Also some small changes to promote consistency and genericity. Bumped PORTREVISION.
Notes
Notes: svn path=/head/; revision=57739
Diffstat (limited to 'www/jakarta-tomcat3')
-rw-r--r--www/jakarta-tomcat3/Makefile24
-rw-r--r--www/jakarta-tomcat3/files/jakarta-tomcat.sh32
-rw-r--r--www/jakarta-tomcat3/files/tomcatctl.175
-rw-r--r--www/jakarta-tomcat3/pkg-plist8
4 files changed, 16 insertions, 123 deletions
diff --git a/www/jakarta-tomcat3/Makefile b/www/jakarta-tomcat3/Makefile
index 1305eae2e77e..362bf40443b1 100644
--- a/www/jakarta-tomcat3/Makefile
+++ b/www/jakarta-tomcat3/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jakarta-tomcat
PORTVERSION= 3.3.1
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= www java
MASTER_SITES= http://jakarta.apache.org/builds/jakarta-tomcat/release/v${PORTVERSION}/bin/ \
http://www.metaverse.nl/~ernst/ \
@@ -19,16 +19,18 @@ MAINTAINER= znerd@FreeBSD.org
USE_JAVA= 1.2+
NO_BUILD= YES
+MAJOR_VER= ${PORTVERSION:R:R}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
APP_HOME?= ${PREFIX}/${PKGBASE}${PORTVERSION}
LOG_DIR= ${APP_HOME}/logs
PLIST_SUB+= T=${APP_HOME:S/^${PREFIX}\///}
APP_TITLE= Jakarta Tomcat
-APP_SHORTNAME= tomcat
+APP_SHORTNAME= tomcat${MAJOR_VER}
CONTROL_SCRIPT_NAME= ${APP_SHORTNAME}ctl
CONTROL_SCRIPT= ${PREFIX}/bin/${CONTROL_SCRIPT_NAME}
+CONTROL_SCRIPT_MANPAGE_TITLE= ${CONTROL_SCRIPT_NAME:U}
STARTUP_ORDER?= 020
-STARTUP_SCRIPT_NAME= ${PORTNAME}.sh
+STARTUP_SCRIPT_NAME= ${PORTNAME}${MAJOR_VER}.sh
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${STARTUP_SCRIPT_NAME}
USER= www
GROUP= www
@@ -40,16 +42,15 @@ AUTO_START?= NO
STOP_TIMEOUT?= 5
PID_FILE= /var/run/${APP_SHORTNAME}.pid
REPLACE_FILES= ${PORTSDIR}/www/jakarta-tomcat4/files/daemonctl.c \
- ${FILESDIR}/${CONTROL_SCRIPT_NAME}.1 \
- ${FILESDIR}/${STARTUP_SCRIPT_NAME} \
+ ${PORTSDIR}/www/jakarta-tomcat4/files/daemonctl.1 \
+ ${PORTSDIR}/www/jakarta-tomcat4/files/startup.sh \
${WRKSRC}/conf/server.xml
JAR_FILE= lib/${APP_SHORTNAME}.jar
-CONTROL_SCRIPT_MANPAGE_TITLE= TOMCATCTL
WRKDIR?= ${.CURDIR}/work
.include <bsd.port.pre.mk>
-pre-install:
+pre-patch:
@${ECHO_CMD} "Installation settings:"
@${ECHO_CMD} " Destination directory: ${APP_HOME}"
@${ECHO_CMD} " Control program location: ${CONTROL_SCRIPT}"
@@ -64,9 +65,9 @@ pre-install:
@${ECHO_CMD} " Stop time-out: ${STOP_TIMEOUT} sec."
@PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
-do-install:
+post-patch:
@${ECHO_CMD} -n ">> Removing unneeded files..."
- @${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'`
+ @${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'`
@${ECHO_CMD} " [ DONE ]"
.for f in ${REPLACE_FILES}
@@ -98,6 +99,7 @@ do-install:
@${ECHO_CMD} " [ DONE ]"
.endfor
+do-install:
@${ECHO_CMD} -n ">> Creating destination directory..."
@${MKDIR} ${APP_HOME}
@${MKDIR} ${LOG_DIR}
@@ -120,13 +122,13 @@ do-install:
@${ECHO_CMD} " [ DONE ]"
@${ECHO_CMD} -n ">> Installing startup script..."
- @${CP} ${WRKDIR}/${STARTUP_SCRIPT_NAME} ${STARTUP_SCRIPT}
+ @${CP} ${WRKDIR}/startup.sh ${STARTUP_SCRIPT}
@${CHMOD} 0544 ${STARTUP_SCRIPT}
@${ECHO_CMD} " [ DONE ]"
.if !defined(NOPORTDOCS)
@${ECHO_CMD} -n ">> Installing man pages..."
- @${INSTALL_MAN} ${WRKDIR}/${CONTROL_SCRIPT_NAME}.1 ${MANPREFIX}/man/man1
+ @${INSTALL_MAN} ${WRKDIR}/daemonctl.1 ${MANPREFIX}/man/man1/${CONTROL_SCRIPT_NAME}.1
@${ECHO_CMD} " [ DONE ]"
.endif
diff --git a/www/jakarta-tomcat3/files/jakarta-tomcat.sh b/www/jakarta-tomcat3/files/jakarta-tomcat.sh
deleted file mode 100644
index b27dea9f7de5..000000000000
--- a/www/jakarta-tomcat3/files/jakarta-tomcat.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# -*- mode: Fundamental; tab-width: 4; -*-
-# ex:ts=4
-#
-# %%APP_TITLE%% startup script.
-#
-# $FreeBSD$
-#
-
-
-# Set some variables
-MYSELF=`basename $0`
-
-case "$1" in
- start)
- truncate -s 0 %%PID_FILE%%
- chown %%USER%%:%%GROUP%% %%PID_FILE%%
- chmod 600 %%PID_FILE%%
- su -f -m %%USER%% -c "exec %%CONTROL_SCRIPT%% start > /dev/null" && echo -n ' %%APP_SHORTNAME%%'
- ;;
- stop)
- chown %%USER%%:%%GROUP%% %%PID_FILE%%
- chmod 600 %%PID_FILE%%
- su -f -m %%USER%% -c "exec %%CONTROL_SCRIPT%% stop > /dev/null" && echo -n ' %%APP_SHORTNAME%%'
- ;;
- *)
- echo ""
- echo "Usage: ${MYSELF} { start | stop }"
- echo ""
- exit 64
- ;;
-esac
diff --git a/www/jakarta-tomcat3/files/tomcatctl.1 b/www/jakarta-tomcat3/files/tomcatctl.1
deleted file mode 100644
index 18eec8bdd144..000000000000
--- a/www/jakarta-tomcat3/files/tomcatctl.1
+++ /dev/null
@@ -1,75 +0,0 @@
-.Dd February 21, 2002
-.Dt %%CONTROL_SCRIPT_MANPAGE_TITLE%% 1
-.Os FreeBSD
-.Sh NAME
-.Nm %%CONTROL_SCRIPT_NAME%%
-.Nd %%APP_TITLE%% server control interface
-.Sh SYNOPSIS
-.Nm
-.Op Ar start | Ar restart | Ar stop
-.Sh DESCRIPTION
-The
-.Nm
-program provides an interface to the %%APP_TITLE%% application server.
-.Pp
-The program expects exactly one argument, either
-.Ar start ,
-.Ar restart
-or
-.Ar stop .
-If more than one argument is given, then all arguments but the first are
-ignored.
-.Bl -tag -width indent
-.It Ar start
-Start %%APP_TITLE%%, if it is not already running.
-.It Ar restart
-Restart %%APP_TITLE%%. If it is already running, then it will be stopped and
-then started right after that. Otherwise it will just be started up.
-.It Ar stop
-Stop %%APP_TITLE%%, if it is actually running.
-.El
-.Sh ERRORS
-The following error conditions are detected. They will be checked in the
-specified order. In each case an error message is printed with the name of the
-control program prepended.
-.Pp
-If no argument is passed, then a simple help message is printed and the
-program exists with error code 0.
-.Pp
-If at least one argument is passed, but it is different from
-.Ar start ,
-.Ar restart
-or
-.Ar stop
-then the help message is printed as well, and the program exits with error
-code 1.
-.Pp
-The following errors conditions are defined:
-.Bl -tag -width indent
-.It Em Illegal program argument (error code 1)
-.It Em PID file not found (error code 2)
-.It Em PID file too large (error code 3)
-.It Em PID file contains illegal character (error code 4)
-.It Em Kill of process failed (error code 5)
-.It Em %%APP_TITLE%% is already running (error code 6)
-.It Em %%APP_TITLE%% is not running (error code 7)
-.It Em Unable to chdir to the %%APP_TITLE%% home directory (error code 8)
-.It Em Unable to open the stdout log file (error code 9)
-.It Em Unable to open the stderr log file (error code 10)
-.It Em Unable to start %%APP_TITLE%% (error code 11)
-.El
-.Sh FILES
-.Bl -tag -width -indent
-.It Pa %%PID_FILE%%
-The %%APP_TITLE%% PID file that is used to store the process ID of the
-currently running process in. It is emptied as soon as the server is stopped
-and filled with the process ID when it is started. It should never be writable
-for anyone but
-.Em www ,
-.It Pa %%STARTUP_SCRIPT%%
-A script that starts the
-.Nm
-program. It is used to start %%APP_TITLE%% at startup time.
-.El
-.Sh AUTHORS
-.An Ernst de Haan Aq znerd@FreeBSD.org
diff --git a/www/jakarta-tomcat3/pkg-plist b/www/jakarta-tomcat3/pkg-plist
index 20b92f60477d..81584345a9f2 100644
--- a/www/jakarta-tomcat3/pkg-plist
+++ b/www/jakarta-tomcat3/pkg-plist
@@ -1,5 +1,5 @@
-bin/tomcatctl
-etc/rc.d/020.jakarta-tomcat.sh
+bin/tomcat3ctl
+etc/rc.d/020.jakarta-tomcat3.sh
%%T%%/KEYS
%%T%%/LICENSE
%%T%%/bin/jspc.sh
@@ -24,7 +24,6 @@ etc/rc.d/020.jakarta-tomcat.sh
%%T%%/conf/users/example-users.xml
%%T%%/conf/users/global-users.xml
%%T%%/conf/users/tomcat-users.xml
-%%T%%/conf/workers.properties
%%T%%/doc/AJPv13.html
%%T%%/doc/JDBCRealm-howto.html
%%T%%/doc/NT-Service-howto.html
@@ -84,7 +83,6 @@ etc/rc.d/020.jakarta-tomcat.sh
%%T%%/lib/container/tomcat_util.jar
%%T%%/lib/container/xalan.jar
%%T%%/lib/stop-tomcat.jar
-%%T%%/lib/tmp42807.tmp
%%T%%/lib/tomcat.jar
%%T%%/logs/stderr.log
%%T%%/logs/stdout.log
@@ -176,7 +174,7 @@ etc/rc.d/020.jakarta-tomcat.sh
%%T%%/webapps/ROOT.war
%%T%%/webapps/admin.war
%%T%%/webapps/examples.war
-man/man1/tomcatctl.1
+man/man1/tomcat3ctl.1
@dirrm %%T%%/logs
@dirrm %%T%%/doc/images
@dirrm %%T%%/doc/appdev/sample/lib