Initial ebuild for Tomcat 6.0.2 alpha, despite sources/ebuild not named as such....
authorWilliam Thomson <wltjr@gentoo.org>
Mon, 20 Nov 2006 04:32:22 +0000 (04:32 +0000)
committerWilliam Thomson <wltjr@gentoo.org>
Mon, 20 Nov 2006 04:32:22 +0000 (04:32 +0000)
Package-Manager: portage-2.1.2_rc1-r6

www-servers/tomcat/ChangeLog
www-servers/tomcat/Manifest
www-servers/tomcat/files/6.0.2/build-xml.patch [new file with mode: 0644]
www-servers/tomcat/files/6.0.2/tomcat.conf [new file with mode: 0644]
www-servers/tomcat/files/6.0.2/tomcat.init [new file with mode: 0755]
www-servers/tomcat/files/digest-tomcat-6.0.2 [new file with mode: 0644]
www-servers/tomcat/tomcat-6.0.2.ebuild [new file with mode: 0644]

index a3da55ff1dbe007e155edffa1210ff858687ddd5..3a5006cecf07b80c08e0dd85dd5dd95fdacc204c 100644 (file)
@@ -1,6 +1,16 @@
 # ChangeLog for www-servers/tomcat
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.75 2006/11/04 21:07:30 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.76 2006/11/20 04:32:22 wltjr Exp $
+
+*tomcat-6.0.2 (20 Nov 2006)
+
+  20 Nov 2006; William L. Thomson Jr. <wltjr@gentoo.org>
+  +files/6.0.2/build-xml.patch, +files/6.0.2/tomcat.conf,
+  +files/6.0.2/tomcat.init, +tomcat-6.0.2.ebuild:
+  Initial ebuild for Tomcat 6.0.2 alpha, despite sources/ebuild not named as
+  such. Compiles, runs and should be some what useable. Although will be
+  package masked, since it's alpha sources. jni USE flag should not be used,
+  still working on that part, help there appreciated
 
   04 Nov 2006; William L. Thomson Jr. <wltjr@gentoo.org>
   -tomcat-5.5.20.ebuild, -tomcat-5.5.20-r1.ebuild:
index 2926511f3023bb0089315a99ae4ef653d3387ac0..a5cda5a7a8ee3a643555b4773c8d612cbe1d4a49 100644 (file)
@@ -138,8 +138,21 @@ AUX 5.5.20/tomcatbuild-xml.patch 12470 RMD160 e936baf49d5f1a34b5b3c5787d62fb5a06
 MD5 83d2b72b5c1c52e80492ee5199eb3625 files/5.5.20/tomcatbuild-xml.patch 12470
 RMD160 e936baf49d5f1a34b5b3c5787d62fb5a06ea52a2 files/5.5.20/tomcatbuild-xml.patch 12470
 SHA256 d76b0dcc3a6d8d60c0305d74ef980e5461bbcaef1059a306e38e5d358c2a01a4 files/5.5.20/tomcatbuild-xml.patch 12470
+AUX 6.0.2/build-xml.patch 785 RMD160 d5d296009e86e0aec3aaf1ba4d1651dc7358d23c SHA1 085f416f6f68931b5c22f69af993188dea425a99 SHA256 51920be0dce79f1ea562ef46120e866ded371049e54f16a8e064e1b68b3d239c
+MD5 23fa5265de5dc6680c3c9e4c7806d382 files/6.0.2/build-xml.patch 785
+RMD160 d5d296009e86e0aec3aaf1ba4d1651dc7358d23c files/6.0.2/build-xml.patch 785
+SHA256 51920be0dce79f1ea562ef46120e866ded371049e54f16a8e064e1b68b3d239c files/6.0.2/build-xml.patch 785
+AUX 6.0.2/tomcat.conf 2673 RMD160 a24b40e17f3b1715133144b8545c664340e9f138 SHA1 02bbf9ea3552cf24669f9d1ff7a7c57e618403ef SHA256 616ced5d8525f58b3d249c5d440d1b91107c2a100b6c1cf2f58891586a0f79da
+MD5 c91be163057fbe162534ab72eba7eed2 files/6.0.2/tomcat.conf 2673
+RMD160 a24b40e17f3b1715133144b8545c664340e9f138 files/6.0.2/tomcat.conf 2673
+SHA256 616ced5d8525f58b3d249c5d440d1b91107c2a100b6c1cf2f58891586a0f79da files/6.0.2/tomcat.conf 2673
+AUX 6.0.2/tomcat.init 3081 RMD160 d711863c68c9aa08d3df54fd9a917a667e3345c2 SHA1 2299892e2e0fe6037116e01849a0fa2047f0f695 SHA256 ec298388424ec538a8043cff413bb60d95afe07c2cee20a321d460dc94fa7e20
+MD5 1a100e4db4174d05ce49080d5a6d0845 files/6.0.2/tomcat.init 3081
+RMD160 d711863c68c9aa08d3df54fd9a917a667e3345c2 files/6.0.2/tomcat.init 3081
+SHA256 ec298388424ec538a8043cff413bb60d95afe07c2cee20a321d460dc94fa7e20 files/6.0.2/tomcat.init 3081
 DIST apache-tomcat-5.5.17-src.tar.gz 4282022 RMD160 004d87bc64b32eee42f9979d2fdbb36836b69015 SHA1 d59994d06608fe13eb42a65484ccb1fdcca325e2 SHA256 295c9fa64d9aa81d5c836b694804d8d57fcfdbc76b9889a044852aa73f2c3ad8
 DIST apache-tomcat-5.5.20-src.tar.gz 4796377 RMD160 587590d2e272d1ede73501b62933f544cd969822 SHA1 cc416242d8c9e1978702a207e305ca97afe53d4d SHA256 19f24717fb3e2db902c33e21650dfa88bbf98428c15b1ed68ecaf7a9150e4a77
+DIST apache-tomcat-6.0.2-src.tar.gz 3244552 RMD160 9061581c2d43d2368d47570eb5841dffd50bd961 SHA1 19b03dbb65d1784266aee30a15de66d38486426c SHA256 77c7facbaa3460aef31cb7695fe8138f8f82abd03e8273658687a630e756e324
 DIST jakarta-tomcat-5.0.27.tar.gz 10298374 RMD160 a333fcb531bb98af20db6e0a10d3e8b2c72ee1fa SHA1 5f3981ecdd67e2b9774e643b336ad98ebc1bd4e3 SHA256 873fc94b4316235091e69bca926bd66a0fb9fab542016e582a03323ed6777d78
 DIST jakarta-tomcat-5.0.28-src.tar.gz 3565766 RMD160 22c5e60b2c5009dc33a62edcefa6760d82da859b SHA1 a4ac2ad52f8b8db8ae8c38979f5f50713e242e36 SHA256 bbf584b3c376d23d92b1a0d306eb8f3729cea244c7a850f81d2527a7df6d20fc
 EBUILD tomcat-5.0.27-r6.ebuild 3891 RMD160 a63bc4c19f34b2bada695cd904213805fd6fb0c9 SHA1 a92402bf5abd0060572299d1a27b6f4faafdd106 SHA256 734de2e9e4337bcfe0001ce948601cec1f68169e28df6cc3b4ef1abbddd228a3
@@ -158,10 +171,14 @@ EBUILD tomcat-5.5.20-r2.ebuild 10236 RMD160 803b546e349b196a101ea05d1270898f87df
 MD5 3ff07bfaf99e2a9666c74c9de87895ae tomcat-5.5.20-r2.ebuild 10236
 RMD160 803b546e349b196a101ea05d1270898f87df456b tomcat-5.5.20-r2.ebuild 10236
 SHA256 aae9bb56031ac2565d156de599e5c6e58076cb3ae7cd1d9672a9c478442c8961 tomcat-5.5.20-r2.ebuild 10236
-MISC ChangeLog 26086 RMD160 67710c9c18f7abb9f5fefb8abdb46a1204470d3e SHA1 9e20cdd6c63f234de3f384db238dbaf5abd242b8 SHA256 a4b88a0cf8cb1321e4cca71d98649b90d96877850413f13727ff30f78bdb1f89
-MD5 be288887ef24a9b8e24c12016fdacee9 ChangeLog 26086
-RMD160 67710c9c18f7abb9f5fefb8abdb46a1204470d3e ChangeLog 26086
-SHA256 a4b88a0cf8cb1321e4cca71d98649b90d96877850413f13727ff30f78bdb1f89 ChangeLog 26086
+EBUILD tomcat-6.0.2.ebuild 5122 RMD160 0b2ac2e4b5918a157e56b242fba44b6e43f55893 SHA1 ea138dcf3b829c49345b29636f68cf7afc43e945 SHA256 035403d18554f454c82e3b022730471a1e633e439172998ba759b38c0c904381
+MD5 028abe576f2c997ba59a9b604399a1ad tomcat-6.0.2.ebuild 5122
+RMD160 0b2ac2e4b5918a157e56b242fba44b6e43f55893 tomcat-6.0.2.ebuild 5122
+SHA256 035403d18554f454c82e3b022730471a1e633e439172998ba759b38c0c904381 tomcat-6.0.2.ebuild 5122
+MISC ChangeLog 26561 RMD160 3137cd6acec09da73bc9ad6befdab897dd6c773e SHA1 0c3b6a489819672e596983028d990614cdeb0d6d SHA256 894a9ae105946a528dd9f396c1d6f2960edd3e2e1de1e2eec5317c18250e7b04
+MD5 570252bb0c87bfb3f4fd9dc444682ad7 ChangeLog 26561
+RMD160 3137cd6acec09da73bc9ad6befdab897dd6c773e ChangeLog 26561
+SHA256 894a9ae105946a528dd9f396c1d6f2960edd3e2e1de1e2eec5317c18250e7b04 ChangeLog 26561
 MISC metadata.xml 558 RMD160 f81f3d20ca526007bbd8f0f88deffb7a097334ea SHA1 6ab9eadb2a8f19b0d4ea1f02ba88315d49e61fb1 SHA256 d5b4cdcd581677edce5b62c586d618f4c95660127fcb2fb7157f83e6d0e35fce
 MD5 e26537a19167254676bb36654dc01f91 metadata.xml 558
 RMD160 f81f3d20ca526007bbd8f0f88deffb7a097334ea metadata.xml 558
@@ -178,3 +195,6 @@ SHA256 99d72ea7a66a7df313d7f01eeb4bd0d7e6e0325601affc35142b9df1371398e7 files/di
 MD5 8adc14a8534e1c6f8d5f96b371e1895f files/digest-tomcat-5.5.20-r2 277
 RMD160 b9c5deac84bf5acd7a65ad80bdfaca9f7e343f3f files/digest-tomcat-5.5.20-r2 277
 SHA256 fda2efc7c4fe103d3fec9599fe3797d8784381008f71d9006c7224db91862b30 files/digest-tomcat-5.5.20-r2 277
+MD5 b8faa06ed7ce8aac00eaf7c6cfc18afc files/digest-tomcat-6.0.2 274
+RMD160 46958bfcb35d84de3df9249238b99faa12fb79ae files/digest-tomcat-6.0.2 274
+SHA256 da0e2d6c74a9b909142a5296d92d688ea4b25f1bc21227da983206f5d2b7c924 files/digest-tomcat-6.0.2 274
diff --git a/www-servers/tomcat/files/6.0.2/build-xml.patch b/www-servers/tomcat/files/6.0.2/build-xml.patch
new file mode 100644 (file)
index 0000000..a89196e
--- /dev/null
@@ -0,0 +1,30 @@
+--- build.xml  2006-11-15 18:33:20.000000000 -0500
++++ ../build.xml       2006-11-19 16:47:58.000000000 -0500
+@@ -446,11 +446,16 @@
+   <target name="deploy" depends="build-only,build-docs">
++<!--
+     <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
+             file="${tomcat-native.tar.gz}" />
++-->
+     <copy todir="${tomcat.build}/bin" file="${commons-daemon.jar}" />
++
++<!--
+     <copy todir="${tomcat.build}/bin" file="${commons-daemon.jsvc.tar.gz}" />
++-->
+       <!-- Copy scripts -->
+     <copy todir="${tomcat.build}/bin">
+@@ -489,8 +494,10 @@
+              excludes="**/CVS/**,**/.svn/**">
+     </javac>
++<!--
+       <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib" />
+     <copy file="${jasper-jdt.jar}" todir="${tomcat.build}/lib" />
++-->
+   </target>
diff --git a/www-servers/tomcat/files/6.0.2/tomcat.conf b/www-servers/tomcat/files/6.0.2/tomcat.conf
new file mode 100644 (file)
index 0000000..f612149
--- /dev/null
@@ -0,0 +1,75 @@
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/6.0.2/tomcat.conf,v 1.1 2006/11/20 04:32:22 wltjr Exp $
+
+# JVM Runtime
+# Using the default setting, it will determine your JVM from the system-vm
+# set using java-config.
+# See java-config(1) manual page for assistance in determining this value.
+#
+# You can override this value with whatever path you wish.  
+# Example: JAVA_HOME=/opt/sun-jdk-1.5.0.09
+
+JAVA_HOME=`java-config --jre-home`
+
+# (Optional) Java runtime options used when the "start", "stop", or "run"
+# commands are executed.
+# JAVA_OPTS=""
+
+# Where your web applications are located
+CATALINA_HOME=/usr/share/tomcat-6/
+CATALINA_BASE=/var/lib/tomcat-6/
+
+# Tomcat's User/Group
+# Change these at your own risk!!! These are not supported so if it 
+# breaks something, you are on your own.
+CATALINA_USER=tomcat
+CATALINA_GROUP=tomcat
+
+# Location of the Tomcat JARs and classes
+CATALINA_LIBDIR=/usr/share/tomcat-6/lib/
+
+# The CLASSPATH for Tomcat to use, plus any others you need.
+CLASSPATH=${CATALINA_LIBDIR}
+
+# (Optional) Directory path location of temporary directory the JVM should 
+# use (java.io.tmpdir).  Defaults to $CATALINA_BASE/temp.
+CATALINA_TMPDIR="/var/tmp/tomcat-6/"
+
+# TOMCAT STARTUP/SHUTDOWN
+#      debug             Start Catalina in a debugger
+#      debug -security   Debug Catalina with a security manager
+#      jpda start        Start Catalina under JPDA debugger
+#      start             Start Catalina in a separate window
+#      start -security   Start in a separate window with security manager
+#      stop              Stop Catalina"
+#
+# NOTE: -security requires JSSE (see below)
+# NOTE: jpda requires JPDA (see below)
+TOMCAT_START="start"
+TOMCAT_STOP="stop"
+
+# (Optional) Java runtime options used when the "start", "stop", or "run" 
+# commands are executed.
+# CATALINA_OPTS=""
+
+# Java Platform Debugger Architecture (JPDA)
+# http://java.sun.com/products/jpda/
+# Included with Java SDK 1.3 and later.  No need to specify location.
+#
+#   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+#                   command is executed. The default is "dt_socket".
+#
+#   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+#                   command is executed. The default is 8000.
+#
+# JPDA_TRANSPORT="dt_socket"
+# JPDA_ADDRESS="8000"
+
+# Java Secure Socket Extension (JSSE)
+# http://java.sun.com/products/jsse/
+# Included with Java SDK 1.4 and later.
+#
+#   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
+#                   (JSSE) installation, whose JAR files will be added to the
+#                   system class path used to start Tomcat.
+#
+# JSSE_HOME="/opt/sun-jdk-1.5.0.09/jre/lib/"
diff --git a/www-servers/tomcat/files/6.0.2/tomcat.init b/www-servers/tomcat/files/6.0.2/tomcat.init
new file mode 100755 (executable)
index 0000000..a6bbeca
--- /dev/null
@@ -0,0 +1,84 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/6.0.2/tomcat.init,v 1.1 2006/11/20 04:32:22 wltjr Exp $
+
+init_env_vars() {
+       # Set some sane defaults
+       if [ -z "${CATALINA_TMPDIR}" ] ; then
+               CATALINA_TMPDIR="${CATALINA_BASE}"/temp
+       fi
+       JPDA_TRANSPORT=${JPDA_TRANSPORT:="dt_socket"}
+       JPDA_ADDRESS=${JPDA_ADDRESS:="8000"}
+       JPDA_OPTS=${JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT},address=${JPDA_ADDRESS},server=y,suspend=n"}
+
+       # Activate Logging
+       if [[ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]]; then
+               JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+                       -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
+       fi
+
+       # Populate the classpath
+       CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib:${JAVA_HOME}/lib/tools.jar"
+       if [[ -n "${JSSE_HOME}" ]]; then
+               CLASSPATH="${CLASSPATH}:${JSSE_HOME}/lib/jcert.jar:${JSSE_HOME}/lib/jnet.jar:${JSSE_HOME}/lib/jsse.jar"
+       fi
+       CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar"
+
+       OPTS_CP="${JAVA_OPTS} ${CATALINA_OPTS} -classpath ${CLASSPATH}"
+
+       CATALINA_ARGS="-Dcatalina.base=${CATALINA_BASE} \
+                                  -Dcatalina.home=${CATALINA_HOME} \
+                                  -Djava.io.tmpdir=${CATALINA_TMPDIR} \
+                                  org.apache.catalina.startup.Bootstrap "
+}
+
+start-helper() {
+       local executor=${1}
+       shift
+       local arguments="--start --quiet --background --chuid ${CATALINA_USER}:${CATALINA_GROUP} \
+               --make-pidfile --pidfile /var/run/tomcat.pid"
+       start-stop-daemon ${arguments} --exec ${executor} -- ${OPTS_CP} "$@" ${CATALINA_ARGS} ${TOMCAT_START}
+       return $?
+}
+
+depend() {
+       use dns logger net
+}
+
+start()        {
+       ebegin "Starting Tomcat"
+       init_env_vars
+       # Figure out what arguments to pass start-helper based on TOMCAT_START
+       if [[ "${TOMCAT_START}" == "debug" ]] ; then
+               start-helper ${JAVA_HOME}/bin/jdb \
+                       -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share
+       elif [[ "${TOMCAT_START}" == "debug -security" ]] ; then
+               start-helper ${JAVA_HOME}/bin/jdb \
+                       -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
+                       -Djava.security.manager \
+                       -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
+       elif [[ "${TOMCAT_START}" == "jpda start" ]] ; then
+               start-helper ${JAVA_HOME}/bin/java ${JPDA_OPTS}
+       elif [[ "${TOMCAT_START}" == "start" ]] ; then
+               start-helper ${JAVA_HOME}/bin/java
+       elif [[ "${TOMCAT_START}" == "start -security" ]] ; then
+               start-helper ${JAVA_HOME}/bin/java \
+                       -Djava.security.manager \
+                       -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
+       else
+               eerror "Invalid TOMCAT_START variable value, or one is not set"
+               eerror "Please see /etc/conf.d/tomcat-5.5 for more information"
+               eend 1
+       fi
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping Tomcat"
+       init_env_vars
+       start-stop-daemon --stop --quiet \
+               --make-pidfile --pidfile /var/run/tomcat.pid \
+                       --exec ${JAVA_HOME}/bin/java -- ${OPTS_CP} ${CATALINA_ARGS} stop
+       eend $?
+}
diff --git a/www-servers/tomcat/files/digest-tomcat-6.0.2 b/www-servers/tomcat/files/digest-tomcat-6.0.2
new file mode 100644 (file)
index 0000000..97af87b
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 2f9fad7642013a5e4ccba3d763e6d479 apache-tomcat-6.0.2-src.tar.gz 3244552
+RMD160 9061581c2d43d2368d47570eb5841dffd50bd961 apache-tomcat-6.0.2-src.tar.gz 3244552
+SHA256 77c7facbaa3460aef31cb7695fe8138f8f82abd03e8273658687a630e756e324 apache-tomcat-6.0.2-src.tar.gz 3244552
diff --git a/www-servers/tomcat/tomcat-6.0.2.ebuild b/www-servers/tomcat/tomcat-6.0.2.ebuild
new file mode 100644 (file)
index 0000000..8c0b2cd
--- /dev/null
@@ -0,0 +1,169 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.2.ebuild,v 1.1 2006/11/20 04:32:22 wltjr Exp $
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Apache Servlet-2.4/JSP-2.0 Container"
+
+MY_P="apache-${P}-src"
+SLOT="6"
+SRC_URI="mirror://apache/${PN}/${PN}-6/v${PV}/src/${MY_P}.tar.gz"
+HOMEPAGE="http://jakarta.apache.org/tomcat"
+KEYWORDS="~amd64 ~x86"
+LICENSE="Apache-2.0"
+
+IUSE="doc examples jni source test"
+
+RDEPEND=">=virtual/jre-1.5
+       =dev-java/eclipse-ecj-3.2*
+       >=dev-java/commons-daemon-1.0.1
+       >=dev-java/commons-dbcp-1.2.1
+       >=dev-java/commons-logging-1.1
+       >=dev-java/commons-pool-1.2
+       jni? ( dev-libs/apr
+               dev-libs/openssl )"
+
+DEPEND=">=virtual/jdk-1.5
+       ${RDEPEND}
+       sys-apps/sed
+       test? (
+               dev-java/junit
+               dev-java/ant
+       )
+       !test? ( dev-java/ant-core )"
+
+JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
+
+S=${WORKDIR}/${MY_P}
+
+TOMCAT_HOME="/usr/share/${PN}-${SLOT}"
+TOMCAT_NAME="${PN}-${SLOT}"
+WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps"
+
+pkg_setup() {
+       enewgroup tomcat 265
+       enewuser tomcat 265 -1 /dev/null tomcat
+
+       JAVA_PKG_WANT_SOURCE="1.5"
+       JAVA_PKG_WANT_TARGET="1.5"
+}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       epatch "${FILESDIR}/${PV}/build-xml.patch"
+
+       cd ${S}/bin
+       java-pkg_jar-from commons-daemon
+}
+
+src_compile(){
+       # Prevent out of memory/heap space errors 
+       java-pkg_force-compiler ecj-3.2
+
+       local antflags="build-jasper-jdt build-only -Dbase.path=${T}"
+       antflags="${antflags} -Dant.jar=$(java-pkg_getjar ant-core ant.jar)"
+       antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar commons-daemon commons-daemon.jar)"
+       antflags="${antflags} -Dcommons-dbcp.jar=$(java-pkg_getjar commons-dbcp commons-dbcp.jar)"
+       antflags="${antflags} -Dcommons-pool.jar=$(java-pkg_getjar commons-pool commons-pool.jar)"
+       antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.2 ecj.jar)"
+       antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)"
+       antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)"
+       eant build-jasper-jdt ${antflags}
+
+       if use jni; then
+               cd ${S}/native/connector
+               sh buildconf --with-apr=/usr || die
+               econf --with-apr=/usr --with-ssl=/usr || die
+               make || die
+       fi
+}
+
+src_install() {
+       local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/
+
+       # init.d, conf.d
+       newinitd ${FILESDIR}/${PV}/tomcat.init ${TOMCAT_NAME}
+       newconfd ${FILESDIR}/${PV}/tomcat.conf ${TOMCAT_NAME}
+
+       # create dir structure
+       diropts -m755 -o tomcat -g tomcat
+       dodir   /etc/${TOMCAT_NAME}
+       fperms  750 /etc/${TOMCAT_NAME}
+       dodir /usr/share/${TOMCAT_NAME}
+       keepdir /var/log/${TOMCAT_NAME}/
+       keepdir /var/tmp/${TOMCAT_NAME}/
+       keepdir /var/run/${TOMCAT_NAME}/
+       dodir   ${CATALINA_BASE}
+       diropts -m0755
+
+       cd ${S}
+       # we don't need dos scripts
+       rm -f bin/*.bat
+
+       # fix context's since upstream is slackin
+       sed -i -e 's:}/server/:}/:' ${S}/webapps/host-manager/host-manager.xml
+       sed -i -e 's:}/server/:}/:' ${S}/webapps/manager/manager.xml
+
+       # copy the manager's context to the right position
+       mkdir -p conf/Catalina/localhost
+       cp ${S}/webapps/host-manager/host-manager.xml conf/Catalina/localhost
+       cp ${S}/webapps/manager/manager.xml conf/Catalina/localhost
+
+       # replace the default pw with a random one, see #92281
+       local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+       sed -e s:SHUTDOWN:${randpw}: -i conf/server.xml
+
+       # copy over the directories
+       chown -R tomcat:tomcat webapps/* conf/*
+       cp -pR conf/* ${D}/etc/${TOMCAT_NAME} || die "failed to copy conf"
+       cp -R bin output/build/bin output/build/lib ${D}/usr/share/${TOMCAT_NAME} \
+               || die "failed to copy"
+
+       cp ${T}/tomcat6-deps/jdt/jasper-jdt.jar ${D}/usr/share/${TOMCAT_NAME}/lib \
+               || die "failed to copy"
+
+       keepdir               ${WEBAPPS_DIR}
+       chown  tomcat:tomcat ${D}/${WEBAPPS_DIR} || die "Failed to change owner off ${1}."
+       chmod  750           ${D}/${WEBAPPS_DIR} || die "Failed to change permissions off ${1}."
+
+       cd ${S}
+
+       # Copy over webapps, some controlled by use flags
+       cp -p RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt
+       cp -pr webapps/ROOT ${D}${CATALINA_BASE}/webapps
+
+       mkdir ${D}${TOMCAT_HOME}/webapps
+       chown tomcat:tomcat ${D}${TOMCAT_HOME}/webapps
+       cp -pr webapps/host-manager ${D}${TOMCAT_HOME}/webapps
+       cp -pr webapps/manager ${D}${TOMCAT_HOME}/webapps
+
+       if use doc; then
+               cp -pr webapps/docs ${D}${CATALINA_BASE}/webapps
+       fi
+       if use examples; then
+               cp -pr webapps/examples \
+                       ${D}${CATALINA_BASE}/webapps
+       fi
+
+       # symlink the directories to make CATALINA_BASE possible
+       dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf
+       dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs
+       dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp
+       dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work
+
+       dodoc  ${S}/{RELEASE-NOTES,RUNNING.txt}
+       fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml
+}
+
+pkg_postinst() {
+       einfo
+       einfo " This ebuild implements a FHS compliant layout for tomcat"
+       einfo " Please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml"
+       einfo " for more information."
+       einfo
+       einfo " Please report any bugs to http://bugs.gentoo.org/"
+       einfo
+}