+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 5.0.27/gentoo.diff 463 RMD160 ace3fcd5d4d42e987840a0ba46c2f2e5db545dfc SHA1 2cac8406125e5bd360fed919eeb0d4685969462b SHA256 d8c9da161ae1274479f88f69821be780bd70ebfe7ad9c2f92db0f03f4b4c9401
MD5 cbb635ed31e3b7ddabe1db851a8b471e files/5.0.27/gentoo.diff 463
RMD160 ace3fcd5d4d42e987840a0ba46c2f2e5db545dfc files/5.0.27/gentoo.diff 463
MD5 23fa5265de5dc6680c3c9e4c7806d382 files/6/build-xml.patch 785
RMD160 d5d296009e86e0aec3aaf1ba4d1651dc7358d23c files/6/build-xml.patch 785
SHA256 51920be0dce79f1ea562ef46120e866ded371049e54f16a8e064e1b68b3d239c files/6/build-xml.patch 785
-AUX 6/tomcat.conf 2673 RMD160 a24b40e17f3b1715133144b8545c664340e9f138 SHA1 02bbf9ea3552cf24669f9d1ff7a7c57e618403ef SHA256 616ced5d8525f58b3d249c5d440d1b91107c2a100b6c1cf2f58891586a0f79da
-MD5 c91be163057fbe162534ab72eba7eed2 files/6/tomcat.conf 2673
-RMD160 a24b40e17f3b1715133144b8545c664340e9f138 files/6/tomcat.conf 2673
-SHA256 616ced5d8525f58b3d249c5d440d1b91107c2a100b6c1cf2f58891586a0f79da files/6/tomcat.conf 2673
-AUX 6/tomcat.init 3081 RMD160 d711863c68c9aa08d3df54fd9a917a667e3345c2 SHA1 2299892e2e0fe6037116e01849a0fa2047f0f695 SHA256 ec298388424ec538a8043cff413bb60d95afe07c2cee20a321d460dc94fa7e20
-MD5 1a100e4db4174d05ce49080d5a6d0845 files/6/tomcat.init 3081
-RMD160 d711863c68c9aa08d3df54fd9a917a667e3345c2 files/6/tomcat.init 3081
-SHA256 ec298388424ec538a8043cff413bb60d95afe07c2cee20a321d460dc94fa7e20 files/6/tomcat.init 3081
+AUX 6/tomcat.conf 2669 RMD160 0f0b660670f1a5fd43aba9bac75d40ee33e902fe SHA1 53bf051861b624f619f78d99d8ea634b8e617464 SHA256 ae15a874568a888d5998db3ddbcc6469ceab1e1dcd72239b441e924ceb0465cb
+MD5 87c3a871a5f81aa03cec06fe5b195bed files/6/tomcat.conf 2669
+RMD160 0f0b660670f1a5fd43aba9bac75d40ee33e902fe files/6/tomcat.conf 2669
+SHA256 ae15a874568a888d5998db3ddbcc6469ceab1e1dcd72239b441e924ceb0465cb files/6/tomcat.conf 2669
+AUX 6/tomcat.init 3077 RMD160 4fc1fdda60f82037e6f1cd0ca264d5e348a2fbd4 SHA1 a68c40272a62b1468189d6a3f5277d2bda78a30d SHA256 ac4e4c30a09662dc44ff1c413d30a5a5db0be8e8f47983d94f21d50a8fab236e
+MD5 87bdf76317cb433fb0cd98a6fc10b630 files/6/tomcat.init 3077
+RMD160 4fc1fdda60f82037e6f1cd0ca264d5e348a2fbd4 files/6/tomcat.init 3077
+SHA256 ac4e4c30a09662dc44ff1c413d30a5a5db0be8e8f47983d94f21d50a8fab236e files/6/tomcat.init 3077
DIST apache-tomcat-5.5.20-src.tar.gz 4796377 RMD160 587590d2e272d1ede73501b62933f544cd969822 SHA1 cc416242d8c9e1978702a207e305ca97afe53d4d SHA256 19f24717fb3e2db902c33e21650dfa88bbf98428c15b1ed68ecaf7a9150e4a77
DIST apache-tomcat-6.0.4-src.tar.gz 3210081 RMD160 67353d8c5a275517e56b2de236bdb19ebebaf7ff SHA1 9afd320c1274ae60d70e763915d6dd0c843df8c2 SHA256 f9383a861e489fcac2a7a98aad753744b48e1c6f52d8eb09e123a304b558244e
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 3877 RMD160 4efe03ed845aa3781273958de248e63aa7195746 SHA1 717e7d059afd5e0a99647e98f762a8bd8181a765 SHA256 9f1947f2f3ef429125dc9a144d2f0f13fd82103779f9c1eada1f8f3a54ab9c2b
-MD5 cb8be629daa984a3e7899d058103414e tomcat-5.0.27-r6.ebuild 3877
-RMD160 4efe03ed845aa3781273958de248e63aa7195746 tomcat-5.0.27-r6.ebuild 3877
-SHA256 9f1947f2f3ef429125dc9a144d2f0f13fd82103779f9c1eada1f8f3a54ab9c2b tomcat-5.0.27-r6.ebuild 3877
+EBUILD tomcat-5.0.27-r6.ebuild 3881 RMD160 80b96c74656e19ac148a68a8047b74066e5709b4 SHA1 8bb842e8a2f594593fab407e7f14d35f4a50ad38 SHA256 c750b594d6f7397f4dfa775738db62238391e86c347a3c5bbcc744d8394974ba
+MD5 999b5f8d571956043cde42233459eb5b tomcat-5.0.27-r6.ebuild 3881
+RMD160 80b96c74656e19ac148a68a8047b74066e5709b4 tomcat-5.0.27-r6.ebuild 3881
+SHA256 c750b594d6f7397f4dfa775738db62238391e86c347a3c5bbcc744d8394974ba tomcat-5.0.27-r6.ebuild 3881
EBUILD tomcat-5.0.28-r14.ebuild 9396 RMD160 266effb829b70d11022216a8d479898d0e9a526c SHA1 d815e80dbd5735741b1f42fb1ff15240af394c0b SHA256 729243dac70cf13b8d27cef8d74d86f6e695cf10e00399d7908d930f5e42671d
MD5 c4a7c24e9d21a98c54b824bbc37b636f tomcat-5.0.28-r14.ebuild 9396
RMD160 266effb829b70d11022216a8d479898d0e9a526c tomcat-5.0.28-r14.ebuild 9396
MD5 8f2de90288b7661deeda91757afb2a10 tomcat-5.5.20-r2.ebuild 10177
RMD160 33a47ba1a347bc913278eea38a6194051cb8094b tomcat-5.5.20-r2.ebuild 10177
SHA256 249959923f28a2a213180cfa69172211f5c0e5eecb8e3d5e755b0f31293efe2d tomcat-5.5.20-r2.ebuild 10177
-EBUILD tomcat-6.0.4.ebuild 4716 RMD160 309863239ed515e512a802f0528871adb7206d05 SHA1 621f00869458a4367a67edd61c60aa8e385000b5 SHA256 efffab544c02acf078db3bdeb0b6b67a1c42f2112f9adc4d846bf11ce14e8a5b
-MD5 7e1a1931d8c6ce8e6cc9b0f7539b7ac2 tomcat-6.0.4.ebuild 4716
-RMD160 309863239ed515e512a802f0528871adb7206d05 tomcat-6.0.4.ebuild 4716
-SHA256 efffab544c02acf078db3bdeb0b6b67a1c42f2112f9adc4d846bf11ce14e8a5b tomcat-6.0.4.ebuild 4716
-MISC ChangeLog 28606 RMD160 e7897480e12ddfab55efc8a0593bc81621a0f933 SHA1 fde9ed7ae861330e0d02c1cff63f0b7ae5b108bd SHA256 a58cc5185a5d7c72989ac959f31e682a8d27b9da2e53d8ea3d23ff6294d045ef
-MD5 348952ee27d8f97974a352082dafe8db ChangeLog 28606
-RMD160 e7897480e12ddfab55efc8a0593bc81621a0f933 ChangeLog 28606
-SHA256 a58cc5185a5d7c72989ac959f31e682a8d27b9da2e53d8ea3d23ff6294d045ef ChangeLog 28606
-MISC metadata.xml 558 RMD160 f81f3d20ca526007bbd8f0f88deffb7a097334ea SHA1 6ab9eadb2a8f19b0d4ea1f02ba88315d49e61fb1 SHA256 d5b4cdcd581677edce5b62c586d618f4c95660127fcb2fb7157f83e6d0e35fce
-MD5 e26537a19167254676bb36654dc01f91 metadata.xml 558
-RMD160 f81f3d20ca526007bbd8f0f88deffb7a097334ea metadata.xml 558
-SHA256 d5b4cdcd581677edce5b62c586d618f4c95660127fcb2fb7157f83e6d0e35fce metadata.xml 558
+EBUILD tomcat-5.5.20-r3.ebuild 10202 RMD160 a3687b584fc34cc19aef5f0d7583e35282e5a3df SHA1 a7c348702dba2a96009d59926bcf5f087c115630 SHA256 046d69fb79114adebcb483fdb0614a75d94e68089ccc4b65f9d6448b46f383bc
+MD5 68a3ab2663e5dcfd014015b66c28f9f5 tomcat-5.5.20-r3.ebuild 10202
+RMD160 a3687b584fc34cc19aef5f0d7583e35282e5a3df tomcat-5.5.20-r3.ebuild 10202
+SHA256 046d69fb79114adebcb483fdb0614a75d94e68089ccc4b65f9d6448b46f383bc tomcat-5.5.20-r3.ebuild 10202
+EBUILD tomcat-6.0.4.ebuild 4720 RMD160 0ab9b450fd0f489e4367d964b373dcbaa254a8ce SHA1 4ef1d6d8358ec2c3e1971777e48cc2ee7e79076b SHA256 9c2d60e5fe645033e8b6d001fabc6ebc8c4739853d81e31390bef04933341665
+MD5 5cdab7d864352e90ec3b8ad04087096d tomcat-6.0.4.ebuild 4720
+RMD160 0ab9b450fd0f489e4367d964b373dcbaa254a8ce tomcat-6.0.4.ebuild 4720
+SHA256 9c2d60e5fe645033e8b6d001fabc6ebc8c4739853d81e31390bef04933341665 tomcat-6.0.4.ebuild 4720
+MISC ChangeLog 28881 RMD160 dbf8fb6ed1f2209f87307db5edf59ae97d8755d1 SHA1 aaaeeb19443fe23f52e8f60b57e9cbd35c5fb7b2 SHA256 420bc291dfa2635e089c916b7aaa53892cd6d5ccf71010b462e4b8e9e766146f
+MD5 77be30f67d78f404393cb13025ea1f76 ChangeLog 28881
+RMD160 dbf8fb6ed1f2209f87307db5edf59ae97d8755d1 ChangeLog 28881
+SHA256 420bc291dfa2635e089c916b7aaa53892cd6d5ccf71010b462e4b8e9e766146f ChangeLog 28881
+MISC metadata.xml 556 RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 SHA1 e8dcd8204d0ea02558dd07e1aded5dc58ed1460c SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79
+MD5 0609d3339e0b8d5a3b4707f6b02aad3a metadata.xml 556
+RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 metadata.xml 556
+SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79 metadata.xml 556
MD5 a66da3a2fe33d0d76de033fa230407fa files/digest-tomcat-5.0.27-r6 271
RMD160 e1de763b91076b421b97582141290372d2695077 files/digest-tomcat-5.0.27-r6 271
SHA256 8adce6bec0e657beb514e68dc8196cca8650ec0f2b5d1e421106ccc9fe954531 files/digest-tomcat-5.0.27-r6 271
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 8adc14a8534e1c6f8d5f96b371e1895f files/digest-tomcat-5.5.20-r3 277
+RMD160 b9c5deac84bf5acd7a65ad80bdfaca9f7e343f3f files/digest-tomcat-5.5.20-r3 277
+SHA256 fda2efc7c4fe103d3fec9599fe3797d8784381008f71d9006c7224db91862b30 files/digest-tomcat-5.5.20-r3 277
MD5 9769185a9c73b3ce5fd94872335f6687 files/digest-tomcat-6.0.4 274
RMD160 ad9c1e6e82cc663e4e29b6df0c745e908b71b6bf files/digest-tomcat-6.0.4 274
SHA256 2d408d8f09d648a39784eaf3996957a58487a18ec0df69a2654db18e41089a59 files/digest-tomcat-6.0.4 274
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+iD8DBQFFeTo1cxLzpIGCsLQRAge2AJ97l7CYOQNjCMQiNmZIFbMXAXEqSQCcDiCP
+x0faIIaatyEs/A4DocdBhuY=
+=qp3j
+-----END PGP SIGNATURE-----
--- /dev/null
+# 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-5.5.20-r3.ebuild,v 1.1 2006/12/08 10:08:00 betelgeuse Exp $
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Apache Servlet-2.4/JSP-2.0 Container"
+
+MY_P="apache-${P}-src"
+SLOT="5.5"
+SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz"
+HOMEPAGE="http://jakarta.apache.org/tomcat"
+KEYWORDS="-ppc -ppc64 ~x86"
+LICENSE="Apache-2.0"
+
+IUSE="admin java5 doc examples source test"
+
+RDEPEND="=dev-java/eclipse-ecj-3.1*
+ =dev-java/commons-beanutils-1.7*
+ >=dev-java/commons-collections-3.1
+ >=dev-java/commons-daemon-1.0.1
+ >=dev-java/commons-dbcp-1.2.1
+ >=dev-java/commons-digester-1.7
+ >=dev-java/commons-fileupload-1.0
+ >=dev-java/commons-el-1.0
+ >=dev-java/commons-launcher-0.9
+ >=dev-java/commons-logging-1.0.4
+ >=dev-java/commons-modeler-1.1
+ >=dev-java/commons-pool-1.2
+ >=dev-java/log4j-1.2.9
+ ~dev-java/servletapi-2.4
+ admin? ( =dev-java/struts-1.2* )
+ dev-java/sun-javamail
+ java5? ( >=virtual/jre-1.5 )
+ !java5? (
+ =virtual/jre-1.4*
+ >=dev-java/commons-httpclient-2.0
+ dev-java/sun-jaf
+ >=dev-java/junit-3.8.1
+ =dev-java/mx4j-core-3*
+ >=dev-java/saxpath-1.0
+ >=dev-java/xerces-2.7.1
+ =dev-java/xml-commons-external-1.3*
+ )"
+DEPEND="java5? ( >=virtual/jdk-1.5 )
+ !java5? ( =virtual/jdk-1.4* )
+ ${RDEPEND}
+ dev-java/ant"
+
+if ! use java5; then
+ JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
+else
+ JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
+fi
+
+S=${WORKDIR}/${MY_P}
+
+TOMCAT_HOME="/usr/share/${PN}-${SLOT}"
+TOMCAT_NAME="${PN}-${SLOT}"
+WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps"
+
+pkg_setup() {
+ # new user for tomcat
+ enewgroup tomcat
+ enewuser tomcat -1 -1 /dev/null tomcat
+
+ java-pkg_filter-compiler ecj-3.1 ecj-3.2
+
+ if use java5; then
+ JAVA_PKG_WANT_SOURCE="1.5"
+ JAVA_PKG_WANT_TARGET="1.5"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ local PATCHES="
+ mainbuild-xml.patch
+ tomcatbuild-xml.patch
+ catalinabuild-xml.patch
+ jasperbuild-xml.patch
+ "
+ for patch in ${PATCHES}; do
+ epatch "${FILESDIR}/${PV}/${patch}"
+ done
+ if ! use examples; then
+ epatch "${FILESDIR}/${PV}/jsr152build-xml-examples.patch"
+ epatch "${FILESDIR}/${PV}/jsr154build-xml-examples.patch"
+ fi
+
+ # avoid packed jars :-)
+ mkdir -p ${S}/build/build/common
+ cd ${S}/build/build
+
+ mkdir ./bin && cd ./bin
+ java-pkg_jar-from commons-logging commons-logging-api.jar
+ java-pkg_jar-from commons-daemon
+ if ! use java5; then
+ java-pkg_jar-from mx4j-core-3.0 mx4j.jar jmx.jar
+ java-pkg_jar-from mx4j-core-3.0 mx4j-rjmx.jar jmx-remote.jar
+ fi
+
+ if ! use java5; then
+ mkdir ${S}/build/build/common/endorsed && cd ${S}/build/build/common/endorsed
+ java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar
+ java-pkg_jar-from xerces-2 xercesImpl.jar
+ fi
+
+ mkdir ${S}/build/build/common/lib && cd ${S}/build/build/common/lib
+ java-pkg_jar-from ant-core
+ java-pkg_jar-from commons-collections
+ java-pkg_jar-from commons-dbcp
+ java-pkg_jar-from commons-el
+ java-pkg_jar-from commons-pool
+ java-pkg_jar-from servletapi-2.4
+
+ mkdir -p ${S}/build/build/server/lib && cd ${S}/build/build/server/lib
+ java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar
+ java-pkg_jar-from commons-digester
+ java-pkg_jar-from commons-fileupload
+ java-pkg_jar-from commons-modeler
+}
+
+src_compile(){
+ local antflags="-Dbase.path=${T}"
+
+ antflags="${antflags} -Dcommons-collections.jar=$(java-config -p commons-collections)"
+ antflags="${antflags} -Dcommons-daemon.jar=$(java-config -p commons-daemon)"
+ antflags="${antflags} -Dcommons-digester.jar=$(java-config -p commons-digester)"
+ antflags="${antflags} -Dcommons-dbcp.jar=$(java-config -p commons-dbcp)"
+ antflags="${antflags} -Dcommons-el.jar=$(java-config -p commons-el)"
+ antflags="${antflags} -Dcommons-pool.jar=$(java-config -p commons-pool)"
+ antflags="${antflags} -Dcommons-fileupload.jar=$(java-config -p commons-fileupload)"
+ antflags="${antflags} -Dcommons-launcher.jar=$(java-config -p commons-launcher)"
+ antflags="${antflags} -Dcommons-modeler.jar=$(java-config -p commons-modeler)"
+ antflags="${antflags} -Djunit.jar=$(java-config -p junit)"
+ antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.1 ecj.jar)"
+ antflags="${antflags} -Dlog4j.jar=$(java-config -p log4j)"
+ antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.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)"
+ antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)"
+ if use admin; then
+ antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)"
+ antflags="${antflags} -Dstruts.home=/usr/share/struts"
+ else
+ antflags="${antflags} -Dadmin.build.notrequired=true"
+ antflags="${antflags} -Dadmin.precompile.notrequired=true"
+ fi
+ if ! use examples; then
+ antflags="${antflags} -Dexamples.precompile.notrequired=true"
+ fi
+ antflags="${antflags} -Djasper.home=${S}/jasper"
+ if ! use java5; then
+ antflags="${antflags} -Dcommons-httpclient.jar=$(java-config -p commons-httpclient)"
+ antflags="${antflags} -Dactivation.jar=$(java-config -p sun-jaf)"
+ antflags="${antflags} -Djmx.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j.jar)"
+ antflags="${antflags} -Djmx-remote.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j-rjmx.jar)"
+ antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)"
+ antflags="${antflags} -DxercesImpl.jar=$(java-pkg_getjar xerces-2 xercesImpl.jar)"
+ antflags="${antflags} -Dxml-apis.jar=$(java-pkg_getjar xml-commons-external-1.3 xml-apis.jar)"
+ fi
+
+ eant ${antflags}
+
+}
+
+src_install() {
+ cd ${S}/build/build
+
+ # 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 /usr/share/${TOMCAT_NAME}
+ keepdir /var/log/${TOMCAT_NAME}/
+ keepdir /var/tmp/${TOMCAT_NAME}/
+ keepdir /var/run/${TOMCAT_NAME}/
+
+ local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/
+ dodir ${CATALINA_BASE}
+ keepdir ${CATALINA_BASE}/shared/lib
+ keepdir ${CATALINA_BASE}/shared/classes
+
+ keepdir /usr/share/${TOMCAT_NAME}/${CATALIA_HOME}/common/lib
+
+ dodir /etc/${TOMCAT_NAME}
+ fperms 750 /etc/${TOMCAT_NAME}
+
+ diropts -m0755
+
+ # we don't need dos scripts
+ rm -f bin/*.bat
+
+ # copy the manager and admin context's to the right position
+ mkdir -p conf/Catalina/localhost
+ if use admin; then
+ cp ${S}/container/webapps/admin/admin.xml \
+ conf/Catalina/localhost
+ fi
+ cp ${S}/container/webapps/manager/manager.xml \
+ conf/Catalina/localhost
+
+ # make the jars available via java-config -p and jar-from, etc
+ base=$(pwd)
+ libdirs="common/lib server/lib"
+ for dir in ${libdirs}
+ do
+ cd ${dir}
+
+ for jar in *.jar;
+ do
+ # replace the file with a symlink
+ if [ ! -L ${jar} ]; then
+ java-pkg_dojar ${jar}
+ rm -f ${jar}
+ ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar}
+ fi
+ done
+
+ cd ${base}
+ done
+
+ # replace a packed struts.jar
+ if use admin; then
+ cd server/webapps/admin/WEB-INF/lib
+ rm -f struts.jar
+ java-pkg_jar-from struts-1.2 struts.jar
+ cd ${base}
+ else
+ rm -fR server/webapps/admin
+ fi
+
+ # 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,server-minimal}.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 common server ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy"
+
+ keepdir ${WEBAPPS_DIR}
+ set_webapps_perms ${D}/${WEBAPPS_DIR}
+
+ # 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
+ if use doc; then
+ cp -pr webapps/tomcat-docs ${D}${CATALINA_BASE}/webapps
+ fi
+ if use examples; then
+ cp -pr webapps/{jsp-examples,servlets-examples,webdav} \
+ ${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}/build/{RELEASE-NOTES,RUNNING.txt}
+ fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml
+}
+
+pkg_postinst() {
+ #due to previous ebuild bloopers, make sure everything is correct
+ chown root:root /etc/init.d/${TOMCAT_NAME}
+ chown root:root /etc/conf.d/${TOMCAT_NAME}
+
+ einfo
+ ewarn " This ebuild implements a new filesystem layout for tomcat"
+ ewarn " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml"
+ ewarn " for more information!."
+ einfo
+ einfo " Please file any bugs at http://bugs.gentoo.org/ or else it"
+ einfo " may not get seen. Thank you."
+ einfo
+
+# einfo "Run emerge --config =${PF}"
+# einfo "to configure Tomcat if you need to for example"
+# einfo "change the home directory of the Tomcat user."
+}
+
+#helpers
+set_webapps_perms() {
+ chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}."
+ chmod 750 ${1} || die "Failed to change permissions off ${1}."
+}
+
+pkg_config() {
+ # Better suggestions are welcome
+ local currentdir="$(getent passwd tomcat | gawk -F':' '{ print $6 }')"
+
+ einfo "The default home directory for Tomcat is /dev/null."
+ einfo "You need to change it if your applications needs it to"
+ einfo "be an actual directory. Current home directory:"
+ einfo "${currentdir}"
+ einfo ""
+ einfo "Do you want to change it [yes/no]?"
+
+ local answer
+ read answer
+
+ if [[ "${answer}" == "yes" ]]; then
+ einfo ""
+ einfo "Suggestions:"
+ einfo "${WEBAPPS_DIR}"
+ einfo ""
+ einfo "If you want to suggest a directory, file a bug to"
+ einfo "http://bugs.gentoo.org"
+ einfo ""
+ einfo "Enter home directory:"
+
+ local homedir
+ read homedir
+
+ einfo ""
+ einfo "Setting home directory to: ${homedir}"
+
+ /usr/sbin/usermod -d"${homedir}" tomcat
+
+ einfo "You can run emerge --config =${PF}"
+ einfo "again to change to homedir"
+ einfo "at any time."
+ fi
+}