From 3abf4484372b7c282226afc2e1dc4080ef9dc0b9 Mon Sep 17 00:00:00 2001 From: Chris Aniszczyk Date: Mon, 16 Feb 2004 00:50:18 +0000 Subject: Crazy bug fixes for tomcat + 5.0 version --- net-www/tomcat/Manifest | 14 ++- net-www/tomcat/files/digest-tomcat-5.0.18 | 1 + net-www/tomcat/metadata.xml | 5 + net-www/tomcat/tomcat-4.1.24-r1.ebuild | 4 +- net-www/tomcat/tomcat-5.0.18.ebuild | 157 ++++++++++++++++++++++++++++++ 5 files changed, 175 insertions(+), 6 deletions(-) create mode 100644 net-www/tomcat/files/digest-tomcat-5.0.18 create mode 100644 net-www/tomcat/metadata.xml create mode 100644 net-www/tomcat/tomcat-5.0.18.ebuild (limited to 'net-www/tomcat') diff --git a/net-www/tomcat/Manifest b/net-www/tomcat/Manifest index 421fd78447e1..f2b1bede8112 100644 --- a/net-www/tomcat/Manifest +++ b/net-www/tomcat/Manifest @@ -1,7 +1,13 @@ -MD5 c4f5f35be122d671a1547c021c3882cc ChangeLog 5316 -MD5 fc7137199d6afd173d23bce6d9585306 tomcat-4.1.24-r1.ebuild 3818 +MD5 03be876699295bfde07a2e559de1c669 tomcat-4.1.24-r1.ebuild 3817 +MD5 fefd444fe53757cddd957880a98ecc0a tomcat-5.0.18.ebuild 4123 +MD5 59e67d1d95f771ddd5dd37f5b344da2a ChangeLog 5315 MD5 f3d7f1cc3b7b8a69342e6bede7395f58 files/digest-tomcat-4.1.24-r1 74 +MD5 16a563fee9101781e780f3d7909f999d files/digest-tomcat-5.0.18 75 MD5 bf1c6e3b412968c9a06aeb15f21355e9 files/4.1.24/gentoo.diff 4002 +MD5 6edc3ed5ac8205492cf986e8550d6bc7 files/4.1.24/tomcat.conf 2709 +MD5 322e4606bb9702810840fc06a3b5a932 files/4.1.24/tomcat.init 816 MD5 53b2c10f99d7d2c05a69fc49b7acda8b files/4.1.24/21tomcat 58 -MD5 12a2562eeb8ec6dc5ef8b2172a5f29c4 files/4.1.24/tomcat.conf 2710 -MD5 da7e3d883b224f013f546d2a087099e8 files/4.1.24/tomcat.init 817 +MD5 d0b4b02720bc1672f97f846c44be219e files/5.0.18/gentoo.diff 6359 +MD5 95c21c44abff903cd06e033e935e9376 files/5.0.18/tomcat.conf 2610 +MD5 287f73496e9a96f5f86a076752f761dc files/5.0.18/tomcat.init 713 +MD5 d686b57da55c6d8da476981c6557a3a1 files/5.0.18/21tomcat 152 diff --git a/net-www/tomcat/files/digest-tomcat-5.0.18 b/net-www/tomcat/files/digest-tomcat-5.0.18 new file mode 100644 index 000000000000..2aa37064144d --- /dev/null +++ b/net-www/tomcat/files/digest-tomcat-5.0.18 @@ -0,0 +1 @@ +MD5 6653a88da9b805920485071fb73d4017 jakarta-tomcat-5.0.18.tar.gz 10318021 diff --git a/net-www/tomcat/metadata.xml b/net-www/tomcat/metadata.xml new file mode 100644 index 000000000000..838c00a4a448 --- /dev/null +++ b/net-www/tomcat/metadata.xml @@ -0,0 +1,5 @@ + + + +java + diff --git a/net-www/tomcat/tomcat-4.1.24-r1.ebuild b/net-www/tomcat/tomcat-4.1.24-r1.ebuild index 38d0c25025d4..f2333145b0e0 100644 --- a/net-www/tomcat/tomcat-4.1.24-r1.ebuild +++ b/net-www/tomcat/tomcat-4.1.24-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-www/tomcat/tomcat-4.1.24-r1.ebuild,v 1.5 2003/12/14 23:29:24 spider Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-www/tomcat/tomcat-4.1.24-r1.ebuild,v 1.6 2004/02/16 00:50:18 zx Exp $ S=${WORKDIR}/jakarta-${P} At="jakarta-tomcat-${PV}.tar.gz" diff --git a/net-www/tomcat/tomcat-5.0.18.ebuild b/net-www/tomcat/tomcat-5.0.18.ebuild new file mode 100644 index 000000000000..dd0d84c343d2 --- /dev/null +++ b/net-www/tomcat/tomcat-5.0.18.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/tomcat/tomcat-5.0.18.ebuild,v 1.1 2004/02/16 00:50:18 zx Exp $ + +S=${WORKDIR}/jakarta-${P} +At="jakarta-tomcat-${PV}.tar.gz" +DESCRIPTION="Apache Servlet-2.4/JSP-2.0 Container" +SRC_URI="http://apache.mirrors.pair.com/jakarta/tomcat-`echo ${PV} | cut -b 1`/v${PV}/bin/jakarta-${P}.tar.gz" +HOMEPAGE="http://jakarta.apache.org/tomcat" +KEYWORDS="x86 ppc sparc ~alpha" +LICENSE="Apache-1.1" +SLOT="0" +DEPEND=">=virtual/jdk-1.2" +RDEPEND="sys-apps/sed" + +src_unpack() { + tar xzf ${DISTDIR}/${At} || die + cd ${S} + epatch ${FILESDIR}/${PV}/gentoo.diff +} + + +pkg_setup() { + USERADDED=false + if ! groupmod tomcat >/dev/null 2>&1 ; then + groupadd -g 265 tomcat || die "problem adding group tomcat, gid 265" + USERADDED=true + fi + if ! id tomcat >/dev/null 2>&1 ; then + useradd -u 265 -g tomcat -s /bin/bash -d /opt/tomcat -c "Apache Tomcat" tomcat || die "problem adding user tomcat, uid 265" + USERADDED=true + fi +} + +src_install() { + TOMCAT_HOME="/opt/tomcat" + INSTALLING="yes" + DIROPTIONS="--mode=0755 --owner=tomcat --group=tomcat" + + # Create directories + dodir ${TOMCAT_HOME} + dodir /var/log/${PN} + dosym /var/log/${PN} ${TOMCAT_HOME}/logs + dodir ${TOMCAT_HOME}/temp + dodir ${TOMCAT_HOME}/work + + keepdir /var/log/${PN} + keepdir ${TOMCAT_HOME}/temp + keepdir ${TOMCAT_HOME}/work + + cd ${S} + + # INIT SCRIPTS AND ENV + + cp -a ${FILESDIR}/${PV}/tomcat.init ${S}/tomcat + insinto /etc/init.d + insopts -m0755 + doins ${S}/tomcat + + cp -a ${FILESDIR}/${PV}/tomcat.conf ${S}/tomcat + insinto /etc/conf.d + insopts -m0644 + doins ${S}/tomcat + + cp -a ${FILESDIR}/${PV}/21tomcat ${S}/21tomcat + insinto /etc/env.d + insopts -m0644 + doins ${S}/21tomcat + + # SEND JARS TO SHARED LOCATION + for i in \ + common/lib/*.jar + do + dojar ${i} + rm ${i} + done + + dodoc RELEASE-NOTES RUNNING.txt LICENSE + + chown -R tomcat.tomcat ${S} + DIROPTIONS="--mode=0755 --owner=tomcat --group=tomcat" + dodir ${TOMCAT_HOME}/common + dodir ${TOMCAT_HOME}/common/classes + dodir ${TOMCAT_HOME}/webapps + + rm bin/*.bat bin/*.exe + + cp -Rdp \ + bin \ + server \ + shared \ + webapps \ + work \ + ${D}${TOMCAT_HOME} + + cp -Rdp common/endorsed ${D}${TOMCAT_HOME}/common/ + + cp -Rdp conf ${D}/etc/tomcat + fperms 640 /etc/tomcat/tomcat-users.xml + + dosym /usr/share/tomcat/package.env ${TOMCAT_HOME}/common/package.env + dosym /usr/share/tomcat/lib ${TOMCAT_HOME}/common/lib + dosym /etc/tomcat ${TOMCAT_HOME}/conf + +} + +pkg_postinst() { + einfo " " + einfo " NOTICE!" + if ${USERADDED} ; then + einfo " User and group 'tomcat' have been added." + einfo " " + fi + einfo " FILE LOCATIONS:" + einfo " 1. Tomcat home directory: ${TOMCAT_HOME}" + einfo " Contains application data, configuration files." + einfo " 2. Runtime settings: /etc/conf.d/tomcat" + einfo " Contains CLASSPATH and JAVA_HOME settings." + einfo " 3. Configuration: /etc/tomcat/" + einfo " 4. Logs: /var/log/tomcat/" + einfo " 5. Executables, libraries: /usr/share/tomcat/" + einfo " " + einfo " " + einfo " STARTING AND STOPPING TOMCAT:" + einfo " /etc/init.d/tomcat start" + einfo " /etc/init.d/tomcat stop" + einfo " /etc/init.d/tomcat restart" + einfo " " + einfo " " + einfo " NETWORK CONFIGURATION:" + einfo " By default, Tomcat runs on port 8080. You can change this" + einfo " value by editing /etc/tomcat/server.xml." + einfo " " + einfo " To test Tomcat while it's running, point your web browser to:" + einfo " http://${HOSTNAME}:8080/" + einfo " " + einfo " " + einfo " BUGS:" + einfo " Please file any bugs at http://bugs.gentoo.org/ or else it" + einfo " may not get seen. Thank you." + einfo " " + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 10 +} + +# pkg_postrm() gets called during an unmerge and seperately (new environment) +# from the src_install() earlier so setting the INSTALLING var does not work. +#pkg_postrm() { +# if [ -z "${INSTALLING}" ] ; then +# einfo ">>> Removing user for Tomcat" +# userdel tomcat || die "Error removing Tomcat user" +# einfo ">>> Removing group for Tomcat" +# groupdel tomcat || die "Error removing Tomcat group" +# else +# einfo ">>> Tomcat user and group preserved" +# fi +#} -- cgit v1.2.3-65-gdbad