head	1.76;
access;
symbols
	RELEASE_7_4_0:1.73
	RELEASE_8_2_0:1.73
	RELEASE_6_EOL:1.73
	RELEASE_8_1_0:1.72
	RELEASE_7_3_0:1.72
	RELEASE_8_0_0:1.72
	RELEASE_7_2_0:1.72
	RELEASE_7_1_0:1.71
	RELEASE_6_4_0:1.71
	RELEASE_5_EOL:1.70
	RELEASE_7_0_0:1.70
	RELEASE_6_3_0:1.70
	PRE_XORG_7:1.68
	old_RELEASE_4_EOL:1.66
	old_RELEASE_6_2_0:1.66
	old_RELEASE_6_1_0:1.64
	old_RELEASE_5_5_0:1.64
	old_RELEASE_6_0_0:1.61
	old_RELEASE_5_4_0:1.61
	old_RELEASE_4_11_0:1.59
	old_RELEASE_5_3_0:1.55
	old_RELEASE_4_10_0:1.55
	old_RELEASE_5_2_1:1.51
	old_RELEASE_5_2_0:1.51
	old_RELEASE_4_9_0:1.48
	old_RELEASE_5_1_0:1.47
	old_RELEASE_4_8_0:1.46
	old_RELEASE_5_0_0:1.44
	old_RELEASE_4_7_0:1.42
	old_old_RELEASE_4_6_2:1.36
	old_old_RELEASE_4_6_1:1.36
	old_old_RELEASE_4_6_0:1.36
	old_old_old_RELEASE_5_0_DP1:1.25
	old_old_old_RELEASE_4_5_0:1.10
	old_old_old_RELEASE_4_4_0:1.8
	old_old_old_RELEASE_4_3_0:1.5
	old_old_old_RELEASE_4_2_0:1.2;
locks; strict;
comment	@# @;


1.76
date	2011.10.25.05.38.12;	author dougb;	state dead;
branches;
next	1.75;

1.75
date	2011.08.10.16.17.36;	author bapt;	state Exp;
branches;
next	1.74;

1.74
date	2011.07.21.05.03.01;	author linimon;	state Exp;
branches;
next	1.73;

1.73
date	2010.11.01.23.25.51;	author ohauer;	state Exp;
branches;
next	1.72;

1.72
date	2008.12.08.06.43.50;	author linimon;	state Exp;
branches;
next	1.71;

1.71
date	2008.06.06.14.07.15;	author edwin;	state Exp;
branches;
next	1.70;

1.70
date	2007.07.25.02.48.10;	author nemoliu;	state Exp;
branches;
next	1.69;

1.69
date	2007.05.19.20.25.33;	author flz;	state Exp;
branches;
next	1.68;

1.68
date	2007.04.30.06.27.41;	author nemoliu;	state Exp;
branches;
next	1.67;

1.67
date	2007.03.17.20.54.57;	author gabor;	state Exp;
branches;
next	1.66;

1.66
date	2006.09.08.09.31.07;	author pav;	state Exp;
branches;
next	1.65;

1.65
date	2006.09.05.07.06.16;	author linimon;	state Exp;
branches;
next	1.64;

1.64
date	2006.02.08.13.35.17;	author lawrance;	state Exp;
branches;
next	1.63;

1.63
date	2006.02.07.13.40.59;	author lawrance;	state Exp;
branches;
next	1.62;

1.62
date	2006.02.07.08.50.08;	author lawrance;	state Exp;
branches;
next	1.61;

1.61
date	2005.03.21.00.08.05;	author hq;	state Exp;
branches;
next	1.60;

1.60
date	2005.03.19.18.44.28;	author krion;	state Exp;
branches;
next	1.59;

1.59
date	2004.12.19.04.04.26;	author hq;	state Exp;
branches;
next	1.58;

1.58
date	2004.12.06.02.35.40;	author hq;	state Exp;
branches;
next	1.57;

1.57
date	2004.12.03.14.20.04;	author hq;	state Exp;
branches;
next	1.56;

1.56
date	2004.12.03.01.01.33;	author hq;	state Exp;
branches;
next	1.55;

1.55
date	2004.04.03.11.22.22;	author znerd;	state Exp;
branches;
next	1.54;

1.54
date	2004.03.08.10.06.07;	author znerd;	state Exp;
branches;
next	1.53;

1.53
date	2004.03.08.09.50.08;	author znerd;	state Exp;
branches;
next	1.52;

1.52
date	2004.01.02.12.31.10;	author znerd;	state Exp;
branches;
next	1.51;

1.51
date	2003.11.27.08.35.02;	author znerd;	state Exp;
branches;
next	1.50;

1.50
date	2003.11.21.12.14.02;	author znerd;	state Exp;
branches;
next	1.49;

1.49
date	2003.11.13.12.54.55;	author trevor;	state Exp;
branches;
next	1.48;

1.48
date	2003.08.11.11.00.04;	author znerd;	state Exp;
branches;
next	1.47;

1.47
date	2003.03.27.07.35.34;	author znerd;	state Exp;
branches;
next	1.46;

1.46
date	2003.03.07.06.12.39;	author ade;	state Exp;
branches;
next	1.45;

1.45
date	2003.01.03.14.03.31;	author znerd;	state Exp;
branches;
next	1.44;

1.44
date	2002.10.09.23.10.32;	author znerd;	state Exp;
branches;
next	1.43;

1.43
date	2002.10.09.22.37.51;	author znerd;	state Exp;
branches;
next	1.42;

1.42
date	2002.09.30.12.40.59;	author znerd;	state Exp;
branches;
next	1.41;

1.41
date	2002.09.11.13.49.19;	author znerd;	state Exp;
branches;
next	1.40;

1.40
date	2002.09.03.09.47.01;	author znerd;	state Exp;
branches;
next	1.39;

1.39
date	2002.08.10.10.42.48;	author znerd;	state Exp;
branches;
next	1.38;

1.38
date	2002.06.25.15.12.50;	author znerd;	state Exp;
branches;
next	1.37;

1.37
date	2002.06.24.07.17.40;	author znerd;	state Exp;
branches;
next	1.36;

1.36
date	2002.05.08.22.00.04;	author znerd;	state Exp;
branches;
next	1.35;

1.35
date	2002.05.08.21.54.05;	author znerd;	state Exp;
branches;
next	1.34;

1.34
date	2002.04.15.21.34.42;	author znerd;	state Exp;
branches;
next	1.33;

1.33
date	2002.04.08.21.50.23;	author znerd;	state Exp;
branches;
next	1.32;

1.32
date	2002.04.08.19.19.31;	author znerd;	state Exp;
branches;
next	1.31;

1.31
date	2002.04.06.20.16.21;	author znerd;	state Exp;
branches;
next	1.30;

1.30
date	2002.04.04.22.48.18;	author znerd;	state Exp;
branches;
next	1.29;

1.29
date	2002.04.04.22.03.26;	author znerd;	state Exp;
branches;
next	1.28;

1.28
date	2002.04.03.21.28.50;	author znerd;	state Exp;
branches;
next	1.27;

1.27
date	2002.04.03.20.42.07;	author znerd;	state Exp;
branches;
next	1.26;

1.26
date	2002.04.03.19.49.24;	author znerd;	state Exp;
branches;
next	1.25;

1.25
date	2002.04.01.22.01.22;	author znerd;	state Exp;
branches;
next	1.24;

1.24
date	2002.03.30.21.08.55;	author znerd;	state Exp;
branches;
next	1.23;

1.23
date	2002.03.30.19.53.17;	author znerd;	state Exp;
branches;
next	1.22;

1.22
date	2002.03.30.18.51.01;	author znerd;	state Exp;
branches;
next	1.21;

1.21
date	2002.03.30.18.42.23;	author znerd;	state Exp;
branches;
next	1.20;

1.20
date	2002.03.30.18.15.21;	author znerd;	state Exp;
branches;
next	1.19;

1.19
date	2002.03.30.16.45.40;	author znerd;	state Exp;
branches;
next	1.18;

1.18
date	2002.03.30.14.51.12;	author znerd;	state Exp;
branches;
next	1.17;

1.17
date	2002.02.21.20.31.20;	author znerd;	state Exp;
branches;
next	1.16;

1.16
date	2002.02.21.20.06.55;	author znerd;	state Exp;
branches;
next	1.15;

1.15
date	2002.02.21.11.03.08;	author znerd;	state Exp;
branches;
next	1.14;

1.14
date	2002.02.19.13.52.30;	author znerd;	state Exp;
branches;
next	1.13;

1.13
date	2002.02.19.08.20.38;	author znerd;	state Exp;
branches;
next	1.12;

1.12
date	2002.02.04.13.38.25;	author znerd;	state Exp;
branches;
next	1.11;

1.11
date	2002.01.29.12.08.28;	author knu;	state Exp;
branches;
next	1.10;

1.10
date	2001.11.23.17.08.42;	author dirk;	state Exp;
branches;
next	1.9;

1.9
date	2001.10.01.21.01.46;	author mharo;	state Exp;
branches;
next	1.8;

1.8
date	2001.08.05.09.37.23;	author dirk;	state Exp;
branches;
next	1.7;

1.7
date	2001.05.21.08.05.37;	author dirk;	state Exp;
branches;
next	1.6;

1.6
date	2001.05.20.17.10.56;	author dirk;	state Exp;
branches;
next	1.5;

1.5
date	2001.04.08.13.09.03;	author dirk;	state Exp;
branches;
next	1.4;

1.4
date	2001.04.08.12.00.16;	author dirk;	state Exp;
branches;
next	1.3;

1.3
date	2001.04.07.17.05.22;	author des;	state Exp;
branches;
next	1.2;

1.2
date	2000.11.14.00.07.47;	author asami;	state Exp;
branches;
next	1.1;

1.1
date	2000.10.21.14.44.26;	author des;	state Exp;
branches;
next	;


desc
@@


1.76
log
@Remove www/tomcat41, No more upstream support
@
text
@# New ports collection makefile for:	jakarta-tomcat
# Date created:		20 Oct 2000
# Whom:			des
#
# $FreeBSD: ports/www/tomcat41/Makefile,v 1.75 2011/08/10 16:17:36 bapt Exp $
#

PORTNAME=	apache-tomcat
PORTVERSION=	4.1.36
PORTREVISION=	2
CATEGORIES=	www java
MASTER_SITES=	${MASTER_SITE_APACHE_TOMCAT}
MASTER_SITE_SUBDIR=	tomcat-4/v${PORTVERSION}/bin

MAINTAINER=	ports@@FreeBSD.org
COMMENT=	Open-source Java web server by Apache, stable 4.1.x branch

DEPRECATED=	No more upstream support
EXPIRATION_DATE=	2011-09-10

USE_JAVA=	yes
JAVA_VERSION=	1.5+
NO_BUILD=	YES
LATEST_LINK=	${APP_SHORTNAME}

USE_RC_SUBR=	tomcat41.sh
SUB_FILES=	pkg-install pkg-deinstall

MAJOR_VER=	${PORTVERSION:R}
APP_HOME?=	${PREFIX}/${PKGBASE}${PORTVERSION:R}
LOG_DIR=	${APP_HOME}/logs
PLIST_SUB+=	T=${APP_HOME:S/^${PREFIX}\///} WWWOWN=${TOMCAT_USER} WWWGRP=${TOMCAT_GROUP}
APP_TITLE=	Apache Tomca
APP_SHORTNAME=	tomcat${MAJOR_VER:S/.//}
TOMCAT_USER?=	www
TOMCAT_GROUP?=	www
PW?=		/usr/sbin/pw
HTTP_PORT?=	8180
SHUTDOWN_PORT?=	8005
AJP_1_3_PORT?=	8009
STDOUT_LOG=	${LOG_DIR}/stdout.log
STDERR_LOG=	${LOG_DIR}/stderr.log
PID_FILE=	/var/run/${APP_SHORTNAME}.pid
REPLACE_FILES=	${WRKSRC}/conf/server.xml
REPLACE_LIST_TEMP=	${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
JAR_FILE=	bin/bootstrap.jar
WRKDIR?=	${WRKDIRPREFIX}${.CURDIR}/work
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
CONF_EXT=	sample
PLIST_SUB+=	CONF_EXT=${CONF_EXT}

SUB_LIST=	AJP_1_3_PORT=${AJP_1_3_PORT} \
		APP_HOME=${APP_HOME} \
		APP_SHORTNAME=${APP_SHORTNAME} \
		APP_TITLE="${APP_TITLE}" \
		GROUP=${TOMCAT_GROUP} \
		HTTP_PORT=${HTTP_PORT} \
		JAR_FILE=${JAR_FILE} \
		JAVA_HOME=${JAVA_HOME} \
		PID_FILE=${PID_FILE} \
		SHUTDOWN_PORT=${SHUTDOWN_PORT} \
		STDERR_LOG=${STDERR_LOG} \
		STDOUT_LOG=${STDOUT_LOG} \
		TOMCAT_HOME=${APP_HOME} \
		TOMCAT_VERSION=${MAJOR_VER:S/.//} \
		USER=${TOMCAT_USER} \

.include <bsd.port.pre.mk>

pre-patch:
	@@${ECHO_MSG} "Installation settings:"
	@@${ECHO_MSG} "   Destination directory:    ${APP_HOME}"
	@@${ECHO_MSG} "   Location of JDK:          ${JAVA_HOME}"
	@@${ECHO_MSG} "   Location of Java port:    ${JAVA_PORT}"
	@@${ECHO_MSG} "   Running as (user/group):  ${TOMCAT_USER}/${TOMCAT_GROUP}"
	@@${ECHO_MSG} "   HTTP port:                ${HTTP_PORT}"
	@@${ECHO_MSG} "   Shutdown listener port:   ${SHUTDOWN_PORT}"
	@@${ECHO_MSG} "   AJP 1.3 connector port:   ${AJP_1_3_PORT}"
	@@${ECHO_MSG} "   Logfile stdout:           ${STDOUT_LOG}"
	@@${ECHO_MSG} "   Logfile stderr:           ${STDERR_LOG}"

post-patch:
	@@${ECHO_MSG} -n ">> Removing unneeded files..."
	@@${FIND} ${WRKSRC} -type f \( -name '*.bak' -or -name '*.bat' -or -name '*.dll' -or -name '*.exe' -or -name '*.orig' \) -delete
	@@${ECHO_MSG} " [ DONE ]"

.for file in ${REPLACE_FILES}
	@@${ECHO_MSG} -n ">> Customizing `basename ${file}`..."
	@@${SED} ${REPLACE_LIST_TEMP} ${file} > ${WRKDIR}/`basename ${file}`
	@@${ECHO_MSG} " [ DONE ]"
.endfor

pre-install:
	@@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

do-install:
	@@${ECHO_MSG} -n ">> Creating destination directory..."
	@@${MKDIR} ${APP_HOME}
	@@${MKDIR} ${LOG_DIR}
	@@${ECHO_MSG} " [ DONE ]"

	@@${ECHO_MSG} ">> Copying files to destination directory..."
	@@${CP} ${WRKDIR}/server.xml ${WRKSRC}/conf/
	@@(cd ${WRKSRC};${FIND} conf -type f | ${SED} -e '/${CONF_EXT}/d') \
		| while read a; do \
			${MV} ${WRKSRC}/$$a ${WRKSRC}/$$a.${CONF_EXT}; \
			if [ ! -e "${APP_HOME}/$$a" ]; then \
				${ECHO_MSG} "	Installing local configuration file: ${APP_HOME}/$$a"; \
				${CP} ${WRKSRC}/$$a.${CONF_EXT} ${WRKSRC}/$$a; \
			else \
				${ECHO_MSG} "	Preserving local configuration file: ${APP_HOME}/$$a"; \
			fi; \
		done
	@@${CP} -R ${WRKSRC}/* ${APP_HOME}
	@@${ECHO_MSG} " [ DONE ]"

	@@${ECHO_MSG} -n ">> Creating log files..."
	@@${INSTALL} /dev/null ${STDOUT_LOG}
	@@${INSTALL} /dev/null ${STDERR_LOG}
	@@${ECHO_MSG} " [ DONE ]"

	@@${ECHO_MSG} -n ">> Creating symlink to tools.jar..."
	@@${LN} -sf ${JAVA_HOME}/lib/tools.jar ${APP_HOME}/common/lib/tools.jar
	@@${ECHO_MSG} " [ DONE ]"

	@@${ECHO_MSG} -n ">> Fixing ownership settings..."
	@@${CHOWN} -R ${TOMCAT_USER}:${TOMCAT_GROUP} ${APP_HOME}/conf ${APP_HOME}/logs \
		${APP_HOME}/temp ${APP_HOME}/work
	@@${ECHO_MSG} " [ DONE ]"

	@@${ECHO_MSG} -n ">> Fixing permissions..."
	@@${CHMOD} 755 `${FIND} ${APP_HOME} -type d`
	@@${ECHO_MSG} " [ DONE ]"

post-install:
	@@${ECHO_MSG} "${APP_TITLE} ${PORTVERSION} has been installed in ${APP_HOME}."

.include <bsd.port.post.mk>
@


1.75
log
@Deprecate tomcat41
According to http://tomcat.apache.org/security-4.html it is not supported anymore

Reported by:	Jason Helfman (irc)
@
text
@d5 1
a5 1
# $FreeBSD$
@


1.74
log
@Now that the Java 1.3 and Java 1.4 ports are deprecated and will expire soon,
remove support for them from bsd.java.mk.  As Jikes is not available in Java 1.5
or higher, remove it from bsd.java.mk too (suggested by hq@@) and from the ports
which used it (only occurences were USE_JIKES=no).  Support for the Blackdown VM
is also removed, as it is not available in Java 1.5 and higher.

Also remove the mapping from Java 1.1-1.4 to Java 1.5+ in bsd.java.mk to detect
old, broken ports; therefore bump the minimal value of JAVA_VERSION to 1.5.
While here, replace static values of JAVA_VERSION in files/*.in by
%%JAVA_VERSION%% .

PR:		ports/158969
Submitted by:	rene
Tested on:	pointyhat-west -exp
@
text
@d18 3
@


1.73
log
@ -replace a ugly find construct during post-patch phase

PR:		151879
Submitted by:	ohauer
Approved by:	glarkin (mentor, implicit)
@
text
@d19 1
a19 1
JAVA_VERSION=	1.2+
@


1.72
log
@Reset nemoliu due to maintainer-timeouts and no response to email.

Hat:	portmgr
@
text
@d81 1
a81 1
	@@${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'`
@


1.71
log
@Bump portrevision due to upgrade of devel/gettext.

The affected ports are the ones with gettext as a run-dependency
according to ports/INDEX-7 (5007 of them) and the ones with USE_GETTEXT
in Makefile (29 of them).

PR:             ports/124340
Submitted by:   edwin@@
Approved by:    portmgr (pav)
@
text
@d15 1
a15 1
MAINTAINER=	nemoliu@@FreeBSD.org
@


1.70
log
@ - update to 4.1.36

Approved by:	delphij (mentor)
@
text
@d10 1
a10 1
PORTREVISION=	1
@


1.69
log
@- Welcome X.org 7.2 \o/.
- Set X11BASE to ${LOCALBASE} for recent ${OSVERSION}.
- Bump PORTREVISION for ports intalling files in ${X11BASE}.
@
text
@d9 1
a9 1
PORTVERSION=	4.1.34
@


1.68
log
@Use my @@FreeBSD.org address.

Approved by:	delphij (mentor)
@
text
@d10 1
@


1.67
log
@- Update to 4.1.34
- Follow the project name change as it was with tomcat55
- Pass maintainership to submitter

PR:		ports/109424
Submitted by:	Nemo Liu <nemoliu@@gmail.com>
Repo-opied by:	marcus
@
text
@d14 1
a14 1
MAINTAINER=	nemoliu@@gmail.com
@


1.66
log
@- Work around an inability of rc.subr's _find_processes() to work with
  processes that show as [java] on ps output.  This should fix the rc script
  stop action for all folks.
@
text
@d8 2
a9 3
PORTNAME=	jakarta-tomcat
PORTVERSION=	4.1.31
PORTREVISION=	5
d11 1
a11 1
MASTER_SITES=	${MASTER_SITE_APACHE_JAKARTA}
d14 1
a14 1
MAINTAINER=	ports@@FreeBSD.org
d29 1
a29 1
APP_TITLE=	Jakarta Tomcat
@


1.65
log
@Reset inactive maintainer who has not responded to email.

Hat:		portmgr
@
text
@d10 1
a10 1
PORTREVISION=	4
@


1.64
log
@- Make sure the rc script creates and chowns the PID file before running
  'daemon'.  No need for the port to create a PID file at install time
  (it would just be eaten by rc.d/cleanvar anyway).
- Use 'ps -o comm' to grab a suitable procname.  'ps -o command' is not
  reliable enough.
- Bump PORTREVISION since these changes fix broken rc script operation.

Approved by:	maintainer timeout (as part of previous update)
@
text
@d15 1
a15 1
MAINTAINER=	liukang@@bjut.edu.cn
@


1.63
log
@Since the procname of tomcat processes may vary due to javavmwrapper,
subvert the 'check_pid_file' procname check by setting it from the output
of 'ps'.

Remove the previous attempt at handling this problem, which was to put
a wildcard in procname.  I'll wear my pointy hat for that bogus hack.

Reported by:	Fritz Heinrichmeyer <Fritz.Heinrichmeyer@@FernUni-Hagen.de>
@
text
@d10 1
a10 1
PORTREVISION=	3
a131 6
	@@${ECHO_MSG} -n ">> Creating PID file..."
	@@${TOUCH} ${PID_FILE}
	@@${CHOWN} ${TOMCAT_USER}:${TOMCAT_GROUP} ${PID_FILE}
	@@${CHMOD} 0600 ${PID_FILE}
	@@${ECHO_MSG} " [ DONE ]"

@


1.62
log
@Clean up Tomcat 4, 4.1, 5, and 5.5 ports.

These changes apply to all ports, unless mentioned otherwise:

- Move jakarta-tomcat55 to tomcat55 (it is no longer a Jakarta project). [6]
- Improve the tomcat55 rc script.  Fix PID handling.  Improve the
  shutdown process.  Use USE_RC_SUBR to its full potential. [2]
- Backport tomcat55 rc script to the other tomcat ports.  This allows
  us to pass command line arguments to the JVM.  Noted in UPDATING.
  [1], [3], [4]
- Change ownership of installed files.  All files are now installed
  with default uid/gid (root:wheel) except for those in the conf/, logs/,
  temp/ and work/ directories. [5]
- No longer install tomcatXXctl binary.  rc scripts are more flexible
  and can be reconfigured without recompiling.
- Remove AUTO_START and STOP_TIMEOUT (replaced with rc tomcatXX_stop_timeout).
- Remove a long list of sed expressions in favour of SUB_LIST.
- Move pkg_{,de}install to files/pkg_{,de}install.in.  Add them to
  SUB_FILES.  Tidy up substitutions and remove hardcoded values.
- Some nonfunctional tidying and removal of Makefile cruft.

PR:		ports/38018 [1], ports/38020 [2], ports/74344 [3],
		ports/75143 [4], ports/83434 [5], ports/92692 [6]
Submitted by:	Ari Suutari <ari.suutari@@syncrontech.com> [1] [2],
		SimpleRezo Team <freebsd@@simplerezo.com> [3],
		Anton Yudin <toha@@toha.org.ua> [4],
		Jan Grant <jan.grant@@bristol.ac.uk> [5],
		lawrance [6]
Approved by:	Kang Liu <liukang@@cn.freebsd.org> (maintainer) [6]
		Maintainer timeouts on [1], [2], [3], [4], [5]
Big thanks to:	hq for the initial tomcat55 script
		jasonb on FreeNode #tomcat for packaging advice
@
text
@d10 1
a10 1
PORTREVISION=	2
@


1.61
log
@- Fix a patching problem in Tomcat ports
- Add a patch-dependency on jakarta-tomcat4

PR:		79052
Submitted by:	maintainer
Obtained from:	des (for jakarta-tomcat41)
@
text
@d10 1
a10 1
PORTREVISION=	1
a17 1
PATCH_DEPENDS=	${NONEXISTENT}:${PORTSDIR}/www/jakarta-tomcat4:pre-everything
d23 2
a24 3
.if !defined(NOPORTDOCS)
MAN1=	${CONTROL_SCRIPT_NAME}.1
.endif
d29 1
a29 1
PLIST_SUB+=	T=${APP_HOME:S/^${PREFIX}\///} WWWOWN=${USER} WWWGRP=${GROUP}
d32 2
a33 8
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}${MAJOR_VER:S/.//}.sh
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${STARTUP_SCRIPT_NAME}
USER=		www
GROUP=		www
a36 1
WARP_PORT?=	8008
a39 2
AUTO_START?=	NO
STOP_TIMEOUT?=	5
d41 2
a42 4
REPLACE_FILES=	${PORTSDIR}/www/jakarta-tomcat4/files/daemonctl.c \
		${PORTSDIR}/www/jakarta-tomcat4/files/daemonctl.1 \
		${PORTSDIR}/www/jakarta-tomcat4/files/startup.sh \
		conf/server.xml
d44 2
d49 16
a69 2
	@@${ECHO_MSG} "   Control program location: ${CONTROL_SCRIPT}"
	@@${ECHO_MSG} "   Startup script location:  ${STARTUP_SCRIPT}"
d72 1
a72 1
	@@${ECHO_MSG} "   Running as (user/group):  ${USER}/${GROUP}"
a74 1
	@@${ECHO_MSG} "   WARP port:                ${WARP_PORT}"
a77 3
	@@${ECHO_MSG} "   Starting after install:   ${AUTO_START}"
	@@${ECHO_MSG} "   Stop time-out:            ${STOP_TIMEOUT} sec."
	@@PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
d84 3
a86 29
.for f in ${REPLACE_FILES}
	@@${ECHO_MSG} -n ">> Customizing `basename $f`..."
	@@(cd ${WRKSRC} && ${SED} \
	-e "/%%AJP_1_3_PORT%%/s//${AJP_1_3_PORT}/g" \
	-e "/%%APP_HOME%%/s//${APP_HOME:S/\//\\\//g}/g" \
	-e "/%%APP_SHORTNAME%%/s//${APP_SHORTNAME}/g" \
	-e "/%%APP_TITLE%%/s//${APP_TITLE}/g" \
	-e "/%%CONTROL_SCRIPT%%/s//${CONTROL_SCRIPT:S/\//\\\//g}/g" \
	-e "/%%CONTROL_SCRIPT_MANPAGE_TITLE%%/s//${CONTROL_SCRIPT_MANPAGE_TITLE}/g" \
	-e "/%%CONTROL_SCRIPT_NAME%%/s//${CONTROL_SCRIPT_NAME}/g" \
	-e "/%%GROUP%%/s//${GROUP}/g" \
	-e "/%%HTTP_PORT%%/s//${HTTP_PORT}/g" \
	-e "/%%JAVA_CMD%%/s//bin\/java/g" \
	-e "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/g" \
	-e "/%%JAR_FILE%%/s//${JAR_FILE:S/\//\\\//g}/g" \
	-e "/%%LOG_DIR%%/s//${LOG_DIR:S/\//\\\//g}/g" \
	-e "/%%PID_FILE%%/s//${PID_FILE:S/\//\\\//g}/g" \
	-e "/%%PORTNAME%%/s//${PORTNAME}/g" \
	-e "/%%PORTVERSION%%/s//${PORTVERSION}/g" \
	-e "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/g" \
	-e "/%%SHUTDOWN_PORT%%/s//${SHUTDOWN_PORT}/g" \
	-e "/%%STARTUP_SCRIPT_NAME%%/s//${STARTUP_SCRIPT_NAME}/g" \
	-e "/%%STARTUP_SCRIPT%%/s//${STARTUP_SCRIPT:S/\//\\\//g}/g" \
	-e "/%%STDERR_LOG%%/s//${STDERR_LOG:S/\//\\\//g}/g" \
	-e "/%%STDOUT_LOG%%/s//${STDOUT_LOG:S/\//\\\//g}/g" \
	-e "/%%STOP_TIMEOUT%%/s//${STOP_TIMEOUT}/g" \
	-e "/%%USER%%/s//${USER}/g" \
	-e "/%%WARP_PORT%%/s//${WARP_PORT}/g" \
	$f > ${WRKDIR}/`basename $f`)
d90 3
a113 22
	@@${ECHO_MSG} -n ">> Compiling and installing control program..."
	@@${SED} \
	-e "/%%JAVA_ARGS%%/s//\"-Dcatalina.home=${APP_HOME:S/\//\\\//g}\",/g" \
	-e "/%%JAR_ARGS%%/s//\"start\",/g" \
	${WRKDIR}/daemonctl.c > ${WRKDIR}/daemonctl_.c
	@@cd ${WRKDIR} && ${CC} -ansi -o ${CONTROL_SCRIPT_NAME} daemonctl_.c
	@@${CP} ${WRKDIR}/${CONTROL_SCRIPT_NAME} ${CONTROL_SCRIPT}
	@@${CHOWN} ${USER}:${GROUP} ${CONTROL_SCRIPT}
	@@${CHMOD} 6754 ${CONTROL_SCRIPT}
	@@${ECHO_MSG} " [ DONE ]"

	@@${ECHO_MSG} -n ">> Installing startup script..."
	@@${CP} ${WRKDIR}/startup.sh ${STARTUP_SCRIPT}
	@@${CHMOD} 0544 ${STARTUP_SCRIPT}
	@@${ECHO_MSG} " [ DONE ]"

.if !defined(NOPORTDOCS)
	@@${ECHO_MSG} -n ">> Installing man pages..."
	@@${INSTALL_MAN} ${WRKDIR}/daemonctl.1 ${MANPREFIX}/man/man1/${CONTROL_SCRIPT_NAME}.1
	@@${ECHO_MSG} " [ DONE ]"
.endif

d124 2
a125 1
	@@${CHOWN} -R ${USER}:${GROUP} ${APP_HOME}
d134 1
a134 1
	@@${CHOWN} ${USER}:${GROUP} ${PID_FILE}
a139 7
	@@${ECHO_MSG} "If a user should be able to use ${CONTROL_SCRIPT_NAME}, then put this user in the group ${GROUP}."
.if !defined(NOPORTDOCS)
	@@${ECHO_MSG} "Use 'man ${CONTROL_SCRIPT_NAME}' for information about starting and stopping ${APP_TITLE}."
.endif
.if ${AUTO_START} == "YES"
	@@${CONTROL_SCRIPT} start || true
.endif
@


1.60
log
@Remove hardcoded WRKDIRPREFIX.

Proposed by:	des
@
text
@d18 1
a28 1
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
d55 1
a55 1
		${WRKSRC}/conf/server.xml
d87 1
a87 1
	@@${SED} \
d113 1
a113 1
	$f > ${WRKDIR}/`basename $f`
@


1.59
log
@- Back up config files during deinstall
- Use ECHO_MSG rather than ECHO_CMD

PR:		43565
Submitted by:	maintainer, Brent Verner <brent@@rcfile.org>
@
text
@a56 1
WRKDIR?=	${WRKDIRPREFIX}${.CURDIR}/work
@


1.58
log
@- Update to version 4.1.31 [1]
- Update to bsd.java.mk 2.0 [1]
- Use MASTER_SITE_JAKARTA [1]
- Improved filename of manpage in Makefile [1]
- Added $FreeBSD$ tags where missing

PR:		74705 [1]
Submitted by:	maintainer [1]
@
text
@d10 1
d23 1
d25 1
d31 1
a31 1
PLIST_SUB+=	T=${APP_HOME:S/^${PREFIX}\///}
d58 2
d64 15
a78 15
	@@${ECHO_CMD} "Installation settings:"
	@@${ECHO_CMD} "   Destination directory:    ${APP_HOME}"
	@@${ECHO_CMD} "   Control program location: ${CONTROL_SCRIPT}"
	@@${ECHO_CMD} "   Startup script location:  ${STARTUP_SCRIPT}"
	@@${ECHO_CMD} "   Location of JDK:          ${JAVA_HOME}"
	@@${ECHO_CMD} "   Location of Java port:    ${JAVA_PORT}"
	@@${ECHO_CMD} "   Running as (user/group):  ${USER}/${GROUP}"
	@@${ECHO_CMD} "   HTTP port:                ${HTTP_PORT}"
	@@${ECHO_CMD} "   Shutdown listener port:   ${SHUTDOWN_PORT}"
	@@${ECHO_CMD} "   WARP port:                ${WARP_PORT}"
	@@${ECHO_CMD} "   AJP 1.3 connector port:   ${AJP_1_3_PORT}"
	@@${ECHO_CMD} "   Logfile stdout:           ${STDOUT_LOG}"
	@@${ECHO_CMD} "   Logfile stderr:           ${STDERR_LOG}"
	@@${ECHO_CMD} "   Starting after install:   ${AUTO_START}"
	@@${ECHO_CMD} "   Stop time-out:            ${STOP_TIMEOUT} sec."
d82 1
a82 1
	@@${ECHO_CMD} -n ">> Removing unneeded files..."
d84 1
a84 1
	@@${ECHO_CMD} " [ DONE ]"
d87 1
a87 1
	@@${ECHO_CMD} -n ">> Customizing `basename $f`..."
d115 1
a115 1
	@@${ECHO_CMD} " [ DONE ]"
d119 1
a119 1
	@@${ECHO_CMD} -n ">> Creating destination directory..."
d122 1
a122 1
	@@${ECHO_CMD} " [ DONE ]"
d124 12
a135 1
	@@${ECHO_CMD} -n ">> Copying files to destination directory..."
d137 1
a137 2
	@@${CP} ${WRKDIR}/server.xml ${APP_HOME}/conf/
	@@${ECHO_CMD} " [ DONE ]"
d139 1
a139 1
	@@${ECHO_CMD} -n ">> Compiling and installing control program..."
d148 1
a148 1
	@@${ECHO_CMD} " [ DONE ]"
d150 1
a150 1
	@@${ECHO_CMD} -n ">> Installing startup script..."
d153 1
a153 1
	@@${ECHO_CMD} " [ DONE ]"
d156 1
a156 1
	@@${ECHO_CMD} -n ">> Installing man pages..."
d158 1
a158 1
	@@${ECHO_CMD} " [ DONE ]"
d161 1
a161 1
	@@${ECHO_CMD} -n ">> Creating log files..."
d164 1
a164 1
	@@${ECHO_CMD} " [ DONE ]"
d166 1
a166 1
	@@${ECHO_CMD} -n ">> Creating symlink to tools.jar..."
d168 1
a168 1
	@@${ECHO_CMD} " [ DONE ]"
d170 1
a170 1
	@@${ECHO_CMD} -n ">> Fixing ownership settings..."
d172 1
a172 1
	@@${ECHO_CMD} " [ DONE ]"
d174 1
a174 1
	@@${ECHO_CMD} -n ">> Fixing permissions..."
d176 1
a176 1
	@@${ECHO_CMD} " [ DONE ]"
d178 1
a178 1
	@@${ECHO_CMD} -n ">> Creating PID file..."
d182 1
a182 1
	@@${ECHO_CMD} " [ DONE ]"
d185 2
a186 2
	@@${ECHO_CMD} "${APP_TITLE} ${PORTVERSION} has been installed in ${APP_HOME}."
	@@${ECHO_CMD} "If a user should be able to use ${CONTROL_SCRIPT_NAME}, then put this user in the group ${GROUP}."
d188 1
a188 1
	@@${ECHO_CMD} "Use 'man ${CONTROL_SCRIPT_NAME}' for information about starting and stopping ${APP_TITLE}."
@


1.57
log
@Assign all Jakarta Tomcat ports to the same maintainer, Kang Liu (already
maintainer of www/jakarta-tomcat5).
@
text
@d9 1
a9 2
PORTVERSION=	4.1.30
PORTREVISION=	0
d11 2
a12 3
MASTER_SITES=	http://www.apache.org/dist/jakarta/tomcat-4/v${PORTVERSION}/bin/ \
		${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=	znerd
d17 2
a18 1
USE_JAVA=	1.2+
d22 1
a22 1
MAN1=	tomcat41ctl.1
@


1.56
log
@Reset znerd's ports maintainership:

- All JDK ports (and JDK documentation ports) that were formerly maintained by
  znerd have been assigned to java@@FreeBSD.org
- I will handle some of the remaining ports (jakarta-commons-*, jdom, xalan-j
  and xmlenc)
- Everything else is reset to ports@@FreeBSD.org

Approved by:	znerd (maintainer)
@
text
@d16 1
a16 1
MAINTAINER=	ports@@FreeBSD.org
@


1.55
log
@Set LATEST_LINK to ${APP_SHORTNAME}. LATEST_LINK was
previously already set to jakarta-tomcat[VERSION], but this
was not consistent with the jakarta-tomcat5 port.

PR:		63210
Submitted by:	Kang Liu <liukang@@bjpu.edu.cn>
@
text
@d16 1
a16 1
MAINTAINER=	znerd@@FreeBSD.org
@


1.54
log
@Update to Tomcat 4.1.30.
@
text
@d21 1
a21 1
LATEST_LINK=	jakarta-tomcat41
@


1.53
log
@Set LATEST_LINK.

Reported by:	kris
@
text
@d9 2
a10 2
PORTVERSION=	4.1.29
PORTREVISION=	1
@


1.52
log
@Fixed name of PID file in pkg-deinstall.
Bumped PORTREVISION.

PR:		60781
Submitted by:	Kang Liu <liukang@@bjpu.edu.cn>
@
text
@d21 1
@


1.51
log
@Fixed the MASTER_SITES.

Approved by:	portmgr (adamw)
@
text
@d10 1
@


1.50
log
@Fix last commit. PORTVERSION should be 4.1.29, not 4.1.27.

Noticed by:	ve@@hardcore.lt
@
text
@d11 1
a11 1
MASTER_SITES=	http://www.apache.org/dist/jakarta/tomcat-4/binaries/ \
@


1.49
log
@Use the FIND and XARGS macros introduced in bsd.port.mk 1.391.
@
text
@d9 1
a9 1
PORTVERSION=	4.1.27
@


1.48
log
@Update to 4.1.27.

Tomcat 4.1.27 includes security fixes for:
. improper recycling of SSL client certificates with Coyote JK 2
. improper handling of invalid content lengths in requests, causing
  HTTP processors to be left in an invalid state in Coyote HTTP/1.1,
  causing a DoS condition
. URI normalization bug in Coyote
. improper handling of certain URLs in Coyote JK 2, causing a DoS
  condition

PR:		55362
Submitted by:	Kang Liu <lazykang@@hotmail.com>
@
text
@d159 1
a159 1
	@@${CHMOD} 755 `find ${APP_HOME} -type d`
@


1.47
log
@Upgrade to 4.1.24.

PR:		50241
Requested by:	Tony Harverson <Tony@@epages.net>
		Jason Jenkins <socrates73@@hotmail.com>
@
text
@d9 1
a9 1
PORTVERSION=	4.1.24
d11 1
a11 1
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v${PORTVERSION}/bin/ \
d20 2
@


1.46
log
@Clear moonlight beckons.
Requiem mors pacem pkg-comment,
And be calm ports tree.

E Nomini Patri, E Fili, E Spiritu Sancti.
@
text
@d9 1
a9 1
PORTVERSION=	4.1.18
a11 1
		http://www.metaverse.nl/~ernst/ \
@


1.45
log
@Update to 4.1.18.
@
text
@d17 1
@


1.44
log
@Fixed daemonctl control program to work with the FreeBSD JDK 1.3.1.
The fix consists of 2 lines at the beginning of the program:

	setuid(geteuid());
	setgid(getegid());

Bumped PORTREVISION of Orion, Tomcat and JBoss ports.

PR:		40470, 43679
Submitted by:	Ari Suutari <ari.suutari@@syncrontech.com>
Reviewed by:	audit
Approved by:	Silence on -audit (since Sept 13, 2002)
@
text
@d9 1
a9 2
PORTVERSION=	4.1.12
PORTREVISION=	2
@


1.43
log
@Changed target installation directory so it does not include
the minor version number anymore.

Bumped PORTREVISION.

PR:		43565
Requested by:	Andrew Gerweck <andy@@gerweck.dyndns.org>
@
text
@d10 1
a10 1
PORTREVISION=	1
@


1.42
log
@Security fix: Upgrade to 4.1.12.

PR:	43504
@
text
@d10 1
d24 1
a24 1
APP_HOME?=	${PREFIX}/${PKGBASE}${PORTVERSION}
@


1.41
log
@Upgrade to Tomcat 4.1.10 (stable).
@
text
@d9 1
a9 1
PORTVERSION=	4.1.10
@


1.40
log
@New port: Jakarta Tomcat 4.1. This port is based on the Tomcat 4
port.
@
text
@d9 1
a9 1
PORTVERSION=	4.1.9
d11 1
a11 1
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v${PORTVERSION}-beta/bin/ \
@


1.39
log
@Changed WRKDIR definition. It is changed from
${.CURDIR}/work to ${WRKDIRPREFIX}${.CURDIR}/work.

PR:		39593
@
text
@d9 1
a9 1
PORTVERSION=	4.0.4
d11 1
a11 1
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat-${PORTVERSION:R}/release/v${PORTVERSION}/bin/ \
d21 1
a21 1
MAJOR_VER=	${PORTVERSION:R:R}
d27 1
a27 1
APP_SHORTNAME=	tomcat${MAJOR_VER}
d32 1
a32 1
STARTUP_SCRIPT_NAME=	${PORTNAME}${MAJOR_VER}.sh
d46 3
a48 3
REPLACE_FILES=	${FILESDIR}/daemonctl.c \
		${FILESDIR}/daemonctl.1 \
		${FILESDIR}/startup.sh \
@


1.38
log
@Improved the post-installation message.

Requested by:	phantom
@
text
@d51 1
a51 1
WRKDIR?=	${.CURDIR}/work
@


1.37
log
@Upgrade to Tomcat 4.0.4.

For release notes, see:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4/RELEASE-NOTES
@
text
@d168 1
a168 1
	@@${ECHO_CMD} "If a user should be able to use ${CONTROL_SCRIPT_NAME}, put it in the group ${GROUP}."
@


1.36
log
@Changed daemonctl program to check if the JAR file exists before
trying to start the JVM. This is a serious usability improvement.
Bumped PORTREVISION.
@
text
@d9 1
a9 2
PORTVERSION=	4.0.3
PORTREVISION=	9
d11 1
a11 1
MASTER_SITES= http://jakarta.apache.org/builds/jakarta-tomcat-${PORTVERSION:R}/release/v${PORTVERSION}/bin/ \
@


1.35
log
@Improved the startup script. Always displaying a space first
before the name of the application being started/stopped. The
advantage is that if there is an error, then the message will
have a space prepended instead of being appended to the previous
application name.
When the application is 'stop'ped, the error messages, if any,
are now hidden. Instead the name of the application is just
shown.
Bumped PORTREVISION.
@
text
@d10 1
a10 1
PORTREVISION=	8
@


1.34
log
@Now using generic startup.sh and daemonctl.c that will be
shared among other ports, like www/orion, www/jboss2 and
www/jakarta-tomcat3.

Now displaying installation settings in pre-patch phase.
Customizing files using ${SED} in post-patch phase.

Furthermore some small changes to promote consistency and
genericity. I'm attempting to make the result of

   $ diff -ruN --exclude=CVS jakarta-tomcat3 jakarta-tomcat4

as small as possible.

Bumped PORTREVISION to help portupgrade in doing what it
does best ;)
@
text
@d10 1
a10 1
PORTREVISION=	7
@


1.33
log
@Daemon control program now checks if process is really
terminated. If not, it will send the process a SIGKILL
after a certain time-out period. The time-out can be
passed to the port Makefile as a parameter.

Improved documentation a bit here and there.

Added some explicit casts to make lint(1) a bit
happier :-)

Applied some refactoring here and there. Moved some
functionality into a new function 'existsProcess'.

Slightly changed the output of the program.

Bumped PORTREVISION.
@
text
@d10 1
a10 1
PORTREVISION=	6
d12 1
a12 1
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v${PORTVERSION}/bin/ \
d22 1
d28 1
a28 1
APP_SHORTNAME=	tomcat4
d31 1
d33 1
a33 1
STARTUP_SCRIPT_NAME=	${PORTNAME}4.sh
d48 2
a49 2
		${FILESDIR}/tomcatctl.1 \
		${FILESDIR}/jakarta-tomcat.sh \
a51 1
CONTROL_SCRIPT_MANPAGE_TITLE=	TOMCAT4CTL
d56 1
a56 1
pre-install:
d74 1
a74 1
do-install:
d111 1
d134 1
a134 1
	@@${CP} ${WRKDIR}/jakarta-tomcat.sh ${STARTUP_SCRIPT}
d140 1
a140 2
	@@${CP} ${WRKDIR}/tomcatctl.1 ${WRKDIR}/${CONTROL_SCRIPT_NAME}.1
	@@${INSTALL_MAN} ${WRKDIR}/${CONTROL_SCRIPT_NAME}.1 ${MANPREFIX}/man/man1
@


1.32
log
@Made the daemon control program less verbose.
Bumped PORTREVISION.

Prompted by:	Kees Jan Koster <K.J.Koster@@kpn.com>
@
text
@d10 1
a10 1
PORTREVISION=	5
d43 1
d70 1
d103 1
@


1.31
log
@Now installs the shell scripts as well. They were previously
not installed because there was the control program tomcat4ctl
already. For some instances, however, tomcat4ctl is not
powerful enough. For instance when setting up multiple
instances of Tomcat, see
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/RUNNING.txt.

Also added tools.jar to pkg-plist. It should have been added
previously.

Bumped PORTREVISION.

Prompted by:	Gavin Cameron <gavin@@itworks.com.au>
@
text
@d10 1
a10 1
PORTREVISION=	4
@


1.30
log
@Fixed a problem where the extracted files would
sometimes (?) be looked for in the directory
'work/work' instead of just 'work'.
Bumped PORTREVISION.
@
text
@d10 1
a10 1
PORTREVISION=	3
d73 1
a73 1
	@@${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'` ${WRKSRC}/bin/*.sh
@


1.29
log
@Creating symlink to tools.jar. Bumped PORTREVISION.

Prompted by:	Calvin NG <calvinng@@brel.com>
@
text
@d10 1
a10 1
PORTREVISION=	2
d50 1
a50 1
WRKDIR?=	work
@


1.28
log
@Minor cleanup.
@
text
@d10 1
a10 1
PORTREVISION=	1
d143 4
@


1.27
log
@Now checking for the Java VM too in the control
program. Bumped PORTREVISION.
@
text
@d122 1
a122 1
	@@cd ${WRKDIR} && ${CC} -DJAR_ARGS=${JAR_ARGS} -DJAVA_ARGS=${JAVA_ARGS} -ansi -o ${CONTROL_SCRIPT_NAME} daemonctl_.c
@


1.26
log
@Little generalization and cleanup. Nothing
spectacular. Not bumped PORTREVISION.
@
text
@d10 1
@


1.25
log
@Upgrade to Jakarta Tomcat 4.0.3. The Jakarta Tomcat 3
branch has moved to www/jakarta-tomcat3.

PR:	31096, 32022
@
text
@a47 2
JAVA_ARGS=	'"-Dcatalina.home=${APP_HOME}"'
JAR_ARGS=	'"start"'
d55 13
a67 13
	@@${ECHO_CMD} "   Destination directory:   ${APP_HOME}"
	@@${ECHO_CMD} "   Control script location: ${CONTROL_SCRIPT}"
	@@${ECHO_CMD} "   Startup script location: ${STARTUP_SCRIPT}"
	@@${ECHO_CMD} "   Location of JDK:         ${JAVA_HOME}"
	@@${ECHO_CMD} "   Location of Java port:   ${JAVA_PORT}"
	@@${ECHO_CMD} "   Running as (user/group): ${USER}/${GROUP}"
	@@${ECHO_CMD} "   HTTP port:               ${HTTP_PORT}"
	@@${ECHO_CMD} "   Shutdown listener port:  ${SHUTDOWN_PORT}"
	@@${ECHO_CMD} "   WARP port:               ${WARP_PORT}"
	@@${ECHO_CMD} "   AJP 1.3 connector port:  ${AJP_1_3_PORT}"
	@@${ECHO_CMD} "   Logfile stdout:          ${STDOUT_LOG}"
	@@${ECHO_CMD} "   Logfile stderr:          ${STDERR_LOG}"
	@@${ECHO_CMD} "   Starting after install:  ${AUTO_START}"
d116 6
a121 2
	@@${ECHO_CMD} -n ">> Compiling and installing control script..."
	@@cd ${WRKDIR} && ${CC} -DJAR_ARGS=${JAR_ARGS} -DJAVA_ARGS=${JAVA_ARGS} -ansi -o ${CONTROL_SCRIPT_NAME} daemonctl.c
@


1.24
log
@Changed a message to make it more generic.
@
text
@d9 1
a9 2
PORTVERSION=	3.3.1
PORTREVISION=	5
d11 1
a11 1
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat/release/v${PORTVERSION}/bin/ \
d26 1
a26 1
APP_SHORTNAME=	tomcat
d30 1
a30 1
STARTUP_SCRIPT_NAME=	${PORTNAME}.sh
d35 4
a38 1
HTTP_PORT?=	8080
d44 2
a45 2
		${FILESDIR}/${CONTROL_SCRIPT_NAME}.1 \
		${FILESDIR}/${STARTUP_SCRIPT_NAME} \
d47 4
a50 4
JAR_FILE=	lib/${APP_SHORTNAME}.jar
JAVA_ARGS=	'"-Dtomcat.install=${APP_HOME}"'
JAR_ARGS=	'"run"'
CONTROL_SCRIPT_MANPAGE_TITLE=	TOMCATCTL
d64 3
d74 1
a74 1
	@@${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'`
d80 1
d97 1
d103 1
d126 1
a126 1
	@@${CP} ${WRKDIR}/${STARTUP_SCRIPT_NAME} ${STARTUP_SCRIPT}
d132 1
@


1.23
log
@Replacing the man page title (in capitals) in order
to make the man page fully generic for jakarta-tomcat,
jakarta-tomcat4, orion and possibly others.

PORTREVISION is not bumped, since the resulting man
page is exactly the same.
@
text
@d68 1
a68 1
	@@${ECHO_CMD} -n ">> Removing all .bat and .orig files..."
@


1.22
log
@Now replacing STARTUP_SCRIPT in man page. Bumped PORTREVISION again.
@
text
@d48 1
d79 1
@


1.21
log
@Stopping the server from pkg-deinstall. Applying
replacements to server.xml. Bumped PORTREVISION.
@
text
@d10 1
a10 1
PORTREVISION=	4
d90 1
@


1.20
log
@Removed reference to workers.properties since it no
longer exists. Bumped PORTREVISION.
@
text
@d10 1
a10 1
PORTREVISION=	2
d104 1
@


1.19
log
@Removed reference to non-existent ${FILESDIR}/MANIFEST.MF.
Bumped PORTREVISION.
@
text
@d10 1
a10 1
PORTREVISION=	1
a103 1
	@@${CP} ${WRKDIR}/workers.properties ${APP_HOME}/conf
@


1.18
log
@Lot of changes: Using USE_JAVA infrastructure. Upgraded port
to 3.3.1. Using HTTP_PORT i.s.o. LISTEN_PORT. Using
daemonctl.c i.s.o. tomcatctl shell script. Displaying steps
i.s.o. commands being executed. Synced man page.
@
text
@d10 1
a40 1
MANIFEST=	MANIFEST.MF
d44 1
a44 3
		${WRKSRC}/conf/server.xml \
		${FILESDIR}/${MANIFEST}
#		${WRKSRC}/conf/workers.properties
@


1.17
log
@Fixed the man page for tomcatctl.
@
text
@d9 1
a9 2
PORTVERSION=	3.2.4
PORTREVISION=	2
d18 1
a18 2
RUN_DEPENDS=	${JAVA_HOME}/bin/javac:${JAVA_PORT}

d30 4
a33 5
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${PORTNAME}.sh
JAVA_HOME?=	${LOCALBASE}/jdk1.3.1
JAVA_PORT?=	${PORTSDIR}/java/jdk13
USER_NAME=	www
GROUP_NAME=	www
d35 1
a35 1
LISTEN_PORT?=	8080
d39 14
d61 2
a62 2
	@@${ECHO_CMD} "   Running as (user/group): ${USER_NAME}/${GROUP_NAME}"
	@@${ECHO_CMD} "   Port to listen at:       ${LISTEN_PORT}"
d66 1
d69 51
a119 50
	@@# Create the destination directory
	${MKDIR} ${APP_HOME}

	@@# Copy all files except .bat and .orig files
	${RM} -f `${FIND} ${WRKSRC} -name '*.bat'`
	${RM} -f `${FIND} ${WRKSRC} -name '*.orig'`
	${CP} -R ${WRKSRC}/* ${APP_HOME}
	${CHMOD} 755 `find ${APP_HOME} -type d`

	@@# Install the workers.properties file after processing it
	${CAT} ${WRKSRC}/conf/workers.properties \
	| ${SED} "/%%TOMCAT_HOME%%/s//${APP_HOME:S/\//\\\//g}/" \
	| ${SED} "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/" \
	> ${WRKDIR}/workers.properties
	${MV} ${WRKDIR}/workers.properties ${APP_HOME}/conf/workers.properties

	@@# Install the startup script
	${CAT} ${FILESDIR}/${PORTNAME}.sh \
	| ${SED} "/%%USER_NAME%%/s//${USER_NAME}/" \
	| ${SED} "/%%APP_SHORTNAME%%/s//${APP_SHORTNAME}/" \
	| ${SED} "/%%CONTROL_SCRIPT%%/s//${CONTROL_SCRIPT:S/\//\\\//g}/" \
	> ${STARTUP_SCRIPT}
	${CHMOD} 0554 ${STARTUP_SCRIPT}

	@@# Install the control script
	${CAT} ${FILESDIR}/${CONTROL_SCRIPT_NAME} \
	| ${SED} "/%%PORTNAME%%/s//${PORTNAME}/" \
	| ${SED} "/%%APP_TITLE%%/s//${APP_TITLE}/" \
	| ${SED} "/%%APP_SHORTNAME%%/s//${APP_SHORTNAME}/" \
	| ${SED} "/%%APP_HOME%%/s//${APP_HOME:S/\//\\\//g}/" \
	| ${SED} "/%%LOG_DIR%%/s//${LOG_DIR:S/\//\\\//g}/" \
	| ${SED} "/%%STARTUP_SCRIPT_NAME%%/s//${PORTNAME}.sh/" \
	| ${SED} "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/" \
	| ${SED} "/%%USER_NAME%%/s//${USER_NAME}/" \
	| ${SED} "/%%STDOUT_LOG%%/s//${STDOUT_LOG:S/\//\\\//g}/" \
	| ${SED} "/%%STDERR_LOG%%/s//${STDERR_LOG:S/\//\\\//g}/" \
	> ${CONTROL_SCRIPT}
	${CHOWN} ${USER_NAME}:${GROUP_NAME} ${CONTROL_SCRIPT}
	${CHMOD} 6554 ${CONTROL_SCRIPT}

	@@# Create the directories that the application will create at the
	@@# first run
	${MKDIR} ${LOG_DIR}
	${CHMOD} 6775 ${LOG_DIR}

	@@# Install the server.xml file after processing it
	${CAT} ${WRKSRC}/conf/server.xml \
	| ${SED} "/%%LISTEN_PORT%%/s//${LISTEN_PORT}/" \
	> ${WRKDIR}/server.xml
	${MV} ${WRKDIR}/server.xml ${APP_HOME}/conf/server.xml
a120 7
	@@# Change ownership for the files
	${CHOWN} -R ${USER_NAME}:${GROUP_NAME} ${APP_HOME}

	@@# Change the execute permissions for all shell scripts
	${CHMOD} 0554 ${APP_HOME}/bin/*

	@@# Install the man page
d122 3
a124 7
	${CAT} ${FILESDIR}/${CONTROL_SCRIPT_NAME}.1 \
	| ${SED} "/%%APP_TITLE%%/s//${APP_TITLE}/" \
	| ${SED} "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/" \
	| ${SED} "/%%CONTROL_SCRIPT_NAME%%/s//${CONTROL_SCRIPT_NAME}/" \
	| ${SED} "/%%STARTUP_ORDER%%/s//${STARTUP_ORDER}.sh/" \
	> ${WRKDIR}/${CONTROL_SCRIPT_NAME}.1
	${INSTALL_MAN} ${WRKDIR}/${CONTROL_SCRIPT_NAME}.1 ${MANPREFIX}/man/man1
d127 19
d148 1
a148 1
	@@${ECHO_CMD} "If you would like a user to be able to use ${CONTROL_SCRIPT_NAME}, then put this user in the group ${GROUP_NAME}."
a152 1
	@@${ECHO_CMD} "Starting ${APP_TITLE}..."
d156 1
a156 1
.include <bsd.port.mk>
@


1.16
log
@Cleaned things up. Made things working :-) Both the startup script
in ${PREFIX}/etc/rc.d and the control script in ${PREFIX}/bin have
been refactored and now actually work very well.

Using the 'www' user and group, creating them if they don't exist.
I've used the same approach as www/apache13.

STDOUT_LOG and STDERR_LOG are now fixed (no ?= anymore) since the
package deinstall does not support a different location.

This fixes the first half of PR 28624.
See: http://www.freebsd.org/cgi/query-pr.cgi?pr=34931

Reported by:	Kees Jan Koster <k.j.koster@@kpn.com>
@
text
@d10 1
a10 1
PORTREVISION=	1
d117 1
d119 2
@


1.15
log
@Upgraded from Jakarta 3.2.3 to 3.2.4.
Not using DIST_SUBDIR anymore.
@
text
@d10 1
d29 2
a30 2
APPCTL_NAME=	${APP_SHORTNAME}ctl
CTL_SCRIPT=	${PREFIX}/bin/${APPCTL_NAME}
d35 2
a36 4
USER_NAME?=	${APP_SHORTNAME}
GROUP_NAME?=	${USER_NAME}
USER_ID?=	7103
GROUP_ID?=	${USER_ID}
d39 2
a40 2
STDOUT_LOG?=	${LOG_DIR}/stdout.log
STDERR_LOG?=	${LOG_DIR}/stderr.log
d46 1
a46 1
	@@${ECHO_CMD} "   Control script location: ${CTL_SCRIPT}"
d50 1
a50 1
	@@${ECHO_CMD} "   Running as (user/group): ${USER_NAME}/${GROUP_NAME} (${USER_ID}:${GROUP_ID})"
a56 4
	@@# Add the group and the user if they do not exist
	${PW} groupadd -n ${GROUP_NAME} -g ${GROUP_ID} || true
	${PW} useradd -n ${USER_NAME} -u ${USER_ID} -g ${GROUP_NAME} -c "${APP_TITLE} account" -d ${APP_HOME} -s ${SH} -h - || true

d73 8
d82 1
a82 1
	${CAT} ${FILESDIR}/${APPCTL_NAME} \
a83 1
	| ${SED} "/%%PORTVERSION%%/s//${PORTVERSION}/" \
d93 3
a95 7
	> ${CTL_SCRIPT}
	${CHOWN} ${USER_NAME}:${GROUP_NAME} ${CTL_SCRIPT}
	${CHMOD} 6554 ${CTL_SCRIPT}

	@@# Install the startup script
	${CP} ${FILESDIR}/${PORTNAME}.sh ${STARTUP_SCRIPT}
	${CHMOD} 0554 ${STARTUP_SCRIPT}
d116 1
a116 1
	${CAT} ${FILESDIR}/${APPCTL_NAME}.1 \
d118 2
a119 2
	> ${WRKDIR}/${APPCTL_NAME}.1
	${INSTALL_MAN} ${WRKDIR}/${APPCTL_NAME}.1 ${MANPREFIX}/man/man1
d124 1
a124 1
	@@${ECHO_CMD} "If you would like a user to be able to use ${APPCTL_NAME}, then put this user in the group ${GROUP_NAME}."
d126 1
a126 1
	@@${ECHO_CMD} "Use 'man ${APPCTL_NAME}' for information about starting and stopping ${APP_TITLE}."
d130 1
a130 1
	@@${CTL_SCRIPT} start || true
@


1.14
log
@Reverting changes. Accidentally committed *all* changes in my working copy, instead of only removing the second APP_TITLE. Bumped the PORTREVISION.
@
text
@d9 1
a9 2
PORTVERSION=	3.2.3
PORTREVISION=	3
d11 1
a11 1
MASTER_SITES=	http://www.apache.org/dist/jakarta/jakarta-tomcat/release/v${PORTVERSION}/bin/ \
a14 1
DIST_SUBDIR=	jakarta/tomcat/${PORTVERSION}
@


1.13
log
@APP_TITLE was set twice.

Reported by: Kimura Fuyuki <fuyuki@@mj.0038.net>
@
text
@d10 1
a10 1
PORTREVISION=	2
@


1.12
log
@A lot of changes:
* Bumped PORTREVISION
* Now displays installation settings
* Now possible to choose JDK. By default uses FreeBSD JDK 1.3.1 (instead of FreeBSD JDK 1.1.8)
* Does not depend on pinstall anymore
* Now possible to change TOMCAT_HOME. By default uses /jakarta-tomcat-3.2.3 (instead of /tomcat)
* Now possible to change LISTEN_PORT. Default is 8080 (unchanged)
* Added support for running Tomcat as a different user/group. By default a new user 'tomcat' and a new group 'tomcat' are created and used
* A 'tomcatctl' script is installed in /usr/local/bin/, which uses interprocess communication to start/stop/restart Tomcat
* Option is added for automatically starting Tomcat after install (AUTO_START). By default Tomcat is started right away
* Appends stdout and stderr to log files
* Uses a numeric prefix for the script in /etc/rc.d (now by default 020.jakarta-tomcat.sh instead of tomcat.sh)
@
text
@d10 1
a10 1
PORTREVISION=	1
d33 1
a33 2
RC_SCRIPT=	${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${PORTNAME}.sh
APP_TITLE=	Jakarta Tomcat
d44 1
a44 1
AUTO_START?=	YES
d50 1
a50 1
	@@${ECHO_CMD} "   Startup script location: ${RC_SCRIPT}"
d88 1
a88 1
	| ${SED} "/%%RC_SCRIPT_NAME%%/s//${PORTNAME}.sh/" \
d94 2
a95 1
	${CHMOD} 755 ${CTL_SCRIPT}
d98 2
a99 1
	${LN} -sf ${CTL_SCRIPT} ${RC_SCRIPT}
d101 1
a101 1
	@@# Create the directories that the application will create it at the
d103 2
a104 1
	${MKDIR} ${APP_HOME}/logs
d115 3
d128 1
@


1.11
log
@Use ${ECHO_CMD} instead of ${ECHO} where you mean the echo command;
the ECHO macro is set to "echo" by default, but it is set to "true" if
make(1) is invoked with the -s option while ECHO_CMD is always set to
the echo command.
@
text
@d10 6
a15 2
CATEGORIES=	www
MASTER_SITES=	http://www.apache.org/dist/jakarta/jakarta-tomcat/release/v${PORTVERSION}/bin/
d20 1
a20 2
BUILD_DEPENDS=	pinstall:${PORTSDIR}/devel/pinstall
RUN_DEPENDS=	${LOCALBASE}/jdk1.1.8/bin/javac:${PORTSDIR}/java/jdk
d22 37
a58 1
NO_BUILD=	yes
d61 59
a119 5
	@@/usr/bin/perl -i -pe "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/conf/workers.properties
	@@${LN} -fs ${WRKSRC} ${WRKDIR}/tomcat
	@@pinstall -v -d ${WRKDIR}
	@@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/tomcat.sh > ${WRKDIR}/tomcat.sh
	@@${INSTALL_SCRIPT} ${WRKDIR}/tomcat.sh /usr/local/etc/rc.d
d122 8
a129 1
	@@${ECHO_CMD} "etc/rc.d/tomcat.sh" >> ${TMPPLIST}
@


1.10
log
@Give maintainership to znerd.
@
text
@d29 1
a29 1
	@@${ECHO} "etc/rc.d/tomcat.sh" >> ${TMPPLIST}
@


1.9
log
@MASTER_SITE moved

Approved by: maintainer
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.8 2001/08/05 09:37:23 dirk Exp $
d14 1
a14 1
MAINTAINER=	dirk@@FreeBSD.org
@


1.8
log
@Upgrade to 3.2.3.
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.7 2001/05/21 08:05:37 dirk Exp $
d11 1
a11 1
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat/release/v${PORTVERSION}/bin/
@


1.7
log
@- provide startup script
- log tomcat messages to a file (logs/tomcat.log)
- fix plist
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.6 2001/05/20 17:10:56 dirk Exp $
d9 1
a9 2
PORTVERSION=	3.2.1
PORTREVISION=	2
@


1.6
log
@Give jakarta-tomcat a chance of working with mod_jk.
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.5 2001/04/08 13:09:03 dirk Exp $
d10 1
a10 1
PORTREVISION=	1
d23 1
a23 1
	/usr/bin/perl -i -pe "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/conf/workers.properties
d26 5
@


1.5
log
@Upgrade to 3.2.1.

PR:		ports/26027
Submitted by:	Michael Lyngbl <michael@@lyngbol.dk>
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.4 2001/04/08 12:00:16 dirk Exp $
d10 1
d23 1
@


1.4
log
@Overtake maintainership.
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.3 2001/04/07 17:05:22 des Exp $
d9 1
a9 1
PORTVERSION=	3.1
d11 1
a11 2
MASTER_SITES=	http://jakarta.apache.org/builds/tomcat/release/v${PORTVERSION}/bin/
DISTNAME=	${PORTNAME}
@


1.3
log
@It ain't me.
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.2 2000/11/14 00:07:47 asami Exp $
d15 1
a15 1
MAINTAINER=	ports@@FreeBSD.org
@


1.2
log
@javac is in a jdk version specific directory, not ${LOCALBASE}/bin, so
spell it out.

Submitted by:	bento
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/jakarta-tomcat/Makefile,v 1.1 2000/10/21 14:44:26 des Exp $
d15 1
a15 1
MAINTAINER=	des@@FreeBSD.org
@


1.1
log
@The Apache Project's Jakarta Tomcat web server.
@
text
@d5 1
a5 1
# $FreeBSD$
d18 1
a18 1
RUN_DEPENDS=	javac:${PORTSDIR}/java/jdk
@

