head	1.4;
access;
symbols
	old_old_old_RELEASE_6_0_0:1.2
	old_old_old_old_RELEASE_5_4_0:1.1
	old_old_old_old_RELEASE_4_11_0:1.1
	old_old_old_old_RELEASE_5_3_0:1.1
	old_old_old_old_RELEASE_4_10_0:1.1
	old_old_old_old_RELEASE_5_2_1:1.1
	old_old_old_old_RELEASE_5_2_0:1.1
	old_old_old_old_RELEASE_4_9_0:1.1;
locks; strict;
comment	@# @;


1.4
date	2006.02.07.08.50.09;	author lawrance;	state dead;
branches;
next	1.3;

1.3
date	2005.09.29.15.08.23;	author hq;	state Exp;
branches;
next	1.2;

1.2
date	2005.06.13.14.08.34;	author hq;	state Exp;
branches;
next	1.1;

1.1
date	2003.08.13.11.39.38;	author znerd;	state Exp;
branches;
next	;


desc
@@


1.4
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
@#!/bin/sh
#
# Checks if the '%%USER%%' user and %%GROUP%% group exist. If they don't, then
# an attempt is made to create both.
#
# $FreeBSD: ports/www/tomcat55/pkg-install,v 1.3 2005/09/29 15:08:23 hq Exp $
#

# Make sure we're called during the 'make install' process
if [ "$2" != "PRE-INSTALL" ]; then
    exit 0
fi

# Set some constants
UID=80
GID=${UID}

# See if the group already exists
if ! pw groupshow "%%GROUP%%" 2>/dev/null 1>&2; then

	# If not, try to create it
	if pw groupadd "%%GROUP%%" -g ${GID}; then
		echo "Added group \"%%GROUP%%\"."
	elif pw groupadd "%%GROUP%%"; then
		echo "Added group \"%%GROUP%%\"."
	else
		echo "Adding group \"%%GROUP%%\" failed..."
		exit 1
	fi
fi

# See if the user already exists
if ! pw usershow "%%USER%%" 2>/dev/null 1>&2; then

	# If not, try to create it
	if pw useradd "%%USER%%" -u ${UID} -g "%%GROUP%%" -h - \
                -s "/sbin/nologin" -d "/nonexistent" \
                -c "World Wide Web Owner";
	then
		echo "Added user \"%%USER%%\"."
	elif pw useradd "%%USER%%" -g "%%GROUP%%" -h - \
                -s "/sbin/nologin" -d "/nonexistent" \
                -c "World Wide Web Owner";
	then
		echo "Added user \"%%USER%%\"."
	else
		echo "Adding user \"%%USER%%\" failed..."
		exit 1
	fi
fi
exit 0
@


1.3
log
@- Allow user to specify a Tomcat deamon user/group through TOMCAT_USER and
  TOMCAT_GROUP (www/www by default)
- Make it possible to add user/group even if UID/GID number is reserved

PR:		85761
Submitted by:	Pawel Wieleba <P.Wieleba@@iem.pw.edu.pl>
Approved by:	maintainer
@
text
@d6 1
a6 1
# $FreeBSD: ports/www/jakarta-tomcat55/pkg-install,v 1.2 2005/06/13 14:08:34 hq Exp $
@


1.2
log
@Update to version 5.5.9: this port is a repocopy of www/jakarta-tomcat5 and it
now tracks the Tomcat 5.5.x branch

PR:		81458
Reported by:	Scott Balmos <scott.balmos@@utoledo.edu>
Submitted by:	Kang Liu <liukang@@bjut.edu.cn> (maintainer)
@
text
@d3 1
a3 1
# Checks if the 'www' user and group exist. If they don't, then
d6 1
a6 1
# $FreeBSD: ports/www/jakarta-tomcat5/pkg-install,v 1.1 2003/08/13 11:39:38 znerd Exp $
a14 2
USER=www
GROUP=${USER}
d19 1
a19 1
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
d22 4
a25 2
	if pw groupadd ${GROUP} -g ${GID}; then
		echo "Added group \"${GROUP}\"."
d27 1
a27 1
		echo "Adding group \"${GROUP}\" failed..."
d33 1
a33 1
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
d36 3
a38 3
	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
		-s "/sbin/nologin" -d "/nonexistent" \
		-c "World Wide Web Owner"; \
d40 6
a45 1
		echo "Added user \"${USER}\"."
d47 1
a47 1
		echo "Adding user \"${USER}\" failed..."
@


1.1
log
@New port: Jakarta Tomcat 5.x.
See:
http://jakarta.apache.org/site/news.html#20030804.1
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html

PR:		55502
Submitted by:	Kang Liu <lazykang@@hotmail.com>
@
text
@d6 1
a6 1
# $FreeBSD: ports/www/jakarta-tomcat41/pkg-install,v 1.1 2002/02/21 20:08:30 znerd Exp $
@

