diff --git a/README.md b/README.md
index 73eb22f..927c21c 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,8 @@
# apache-tomcat
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+Tomcat is developed in an open and participatory environment and released under the Apache Software License 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world.
+We invite you to participate in this open development project.
+
diff --git a/apache-tomcat-7.0-build.properties b/apache-tomcat-7.0-build.properties
new file mode 100644
index 0000000..209993c
--- /dev/null
+++ b/apache-tomcat-7.0-build.properties
@@ -0,0 +1,182 @@
+# -----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -----------------------------------------------------------------------------
+# build.properties.sample
+#
+# This is an example "build.properties" file, used to customize building
+# Tomcat for your local environment. It defines the location of all external
+# modules that Tomcat depends on. Copy this file to "build.properties"
+# in the top-level source directory, and customize it as needed.
+#
+# $Id: build.properties.default 1075337 2011-02-28 14:13:37Z markt $
+# -----------------------------------------------------------------------------
+
+# ----- Version Control Flags -----
+version.major=7
+version.minor=0
+version.build=9
+version.patch=0
+version.suffix=
+
+# ----- Build control flags -----
+# Note enabling validation uses Checkstyle which is LGPL licensed
+execute.validate=false
+execute.test.bio=true
+execute.test.nio=true
+# Still requires APR/native library to be present
+execute.test.apr=true
+test.haltonfailure=false
+
+# ----- Default Base Path for Dependent Packages -----
+# Please note this path must be absolute, not relative,
+# as it is referenced with different working directory
+# contexts by the various build scripts.
+base.path=/usr/share/java
+#base.path=C:/path/to/the/repository
+#base.path=/usr/local
+
+compile.source=1.6
+compile.target=1.6
+compile.debug=true
+
+base-apache.loc.1=http://www.apache.org/dist
+base-apache.loc.2=http://archive.apache.org/dist
+base-commons.loc.1=${base-apache.loc.1}/commons
+base-commons.loc.2=${base-apache.loc.2}/commons
+base-tomcat.loc.1=${base-apache.loc.1}/tomcat
+base-tomcat.loc.2=${base-apache.loc.2}/tomcat
+
+base-sf.loc=http://downloads.sourceforge.net
+base-maven.loc=http://repo2.maven.org/maven2
+
+# Mirror, was used when there were problems with the main SF downloads site
+# base-sf.loc=http://sunet.dl.sourceforge.net
+
+# ----- Commons Logging, version 1.1 or later -----
+# If this version is updated, check the versions required for the deps
+# - avalon-framework
+# - log4j
+# - logkit
+# - servletapi
+#commons-logging.version=1.1.1
+#commons-logging.home=${base.path}/commons-logging-${commons-logging.version}
+#commons-logging-src.loc.1=${base-commons.loc.1}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz
+#commons-logging-src.loc.2=${base-commons.loc.2}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz
+#commons-logging-src.tar.gz=${commons-logging.home}/commons-logging-${commons-logging.version}-src.tar.gz
+
+# ----- Avalon Framework (required by commons logging) -----
+#avalon-framework.version=4.1.3
+#avalon-framework.home=${base.path}/avalon-framework-${avalon-framework.version}
+#avalon-framework.loc=${base-maven.loc}/avalon-framework/avalon-framework/${avalon-framework.version}/avalon-framework-${avalon-framework.version}.jar
+avalon-framework.jar=${base.path}/excalibur/avalon-framework.jar
+
+# ----- log4j (required by commons logging) -----
+#log4j.version=1.2.12
+#log4j.home=${base.path}/log4j-${log4j.version}
+#log4j.loc=${base-maven.loc}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar
+log4j.jar=${base.path}/log4j.jar
+
+# ----- logkit (required by commons logging) -----
+#logkit.version=1.0.1
+#logkit.home=${base.path}/logkit-${logkit.version}
+#logkit.loc=${base-maven.loc}/logkit/logkit/${logkit.version}/logkit-${logkit.version}.jar
+logkit.jar=${base.path}/excalibur/avalon-logkit.jar
+
+# ----- servletapi (required by commons logging) -----
+#servletapi.version=2.3
+#servletapi.home=${base.path}/servletapi-${servletapi.version}
+#servletapi.loc=${base-maven.loc}/servletapi/servletapi/${servletapi.version}/servletapi-${servletapi.version}.jar
+servletapi.jar=${base.path}/servletapi4.jar
+
+# ----- Webservices - JAX RPC -----
+#jaxrpc-lib.version=1.1-rc4
+#jaxrpc-lib.home=${base.path}/jaxrpc-${jaxrpc-lib.version}
+#jaxrpc-lib.loc=${base-maven.loc}/geronimo-spec/geronimo-spec-jaxrpc/${jaxrpc-lib.version}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
+jaxrpc-lib.jar=${base.path}/geronimo/jaxrpc-1.1-api.jar
+
+# ----- Webservices - WSDL4J -----
+#wsdl4j-lib.version=1.6.1
+#wsdl4j-lib.home=${base.path}/wsdl4j-${wsdl4j-lib.version}
+#wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${wsdl4j-lib.version}.jar
+#wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar
+wsdl4j-lib.jar=${base.path}/wsdl4j.jar
+
+# ----- Eclipse JDT, version 3.2 or later -----
+#jdt.version=3.6
+#jdt.release=R-3.6-201006080911
+#jdt.home=${base.path}/ecj-${jdt.version}
+jdt.jar=${base.path}/eclipse-ecj.jar
+# The download will be moved to the archive area eventually. We are taking care of that in advance.
+#jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops/${jdt.release}/ecj-${jdt.version}.jar
+#jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops/${jdt.release}/ecj-${jdt.version}.jar
+
+# ----- Tomcat native library -----
+#tomcat-native.version=1.1.20
+#tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
+#tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
+#tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
+#tomcat-native.loc.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
+#tomcat-native.dll.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries
+#tomcat-native.dll.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/binaries
+#tomcat-native.dll.win32=${tomcat-native.home}/tcnative-1.dll.x86
+#tomcat-native.dll.x64=${tomcat-native.home}/tcnative-1.dll.x64
+#tomcat-native.dll.i64=${tomcat-native.home}/tcnative-1.dll.i64
+
+# ----- Commons DBCP, version 1.1 or later -----
+#commons-dbcp.version=1.4
+#commons-dbcp.home=${base.path}/commons-dbcp-1.4-src
+#commons-dbcp-src.loc.1=${base-commons.loc.1}/dbcp/source/commons-dbcp-1.4-src.tar.gz
+#commons-dbcp-src.loc.2=${base-commons.loc.2}/dbcp/source/commons-dbcp-1.4-src.tar.gz
+
+# ----- Commons Pool, version 1.1 or later -----
+#commons-pool.home=${base.path}/commons-pool-1.5.5-src
+#commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-1.5.5-src.tar.gz
+#commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-1.5.5-src.tar.gz
+
+# ----- NSIS, version 2.0 or later -----
+#nsis.home=${base.path}/nsis-2.46
+#nsis.exe=${nsis.home}/makensis.exe
+#nsis.installoptions.dll=${nsis.home}/Plugins/InstallOptions.dll
+#nsis.nsexec.dll=${nsis.home}/Plugins/nsExec.dll
+#nsis.nsisdl.dll=${nsis.home}/Plugins/NSISdl.dll
+#nsis.loc=${base-sf.loc}/nsis/nsis-2.46.zip
+
+# ----- Commons Daemon, version 1.0-Alpha or later -----
+commons-daemon.version=1.0.5
+commons-daemon.jar=${base.path}/apache-commons-daemon-${commons-daemon.version}.jar
+
+# ----- JUnit Unit Test Suite, version 3.7 or later -----
+#junit.home=${base.path}/junit3.8.2
+#junit.lib=${junit.home}
+junit.jar=${base.path}/junit.jar
+#junit.loc=${base-sf.loc}/junit/junit3.8.2.zip
+
+# ----- Checkstyle, version 5.1 or later -----
+checkstyle.version=5.1
+#checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
+#checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle-${checkstyle.version}.zip
+checkstyle.jar=${base.path}/checkstyle-all-${checkstyle.version}.jar
+
+# ----- JSON Libraries (for bayeux module) -----
+#json-lib.home=${base.path}/json-20080701
+#json-lib.lib=http://repo1.maven.org/maven2/org/json/json/20080701/json-20080701.jar
+json-lib.jar=${base.path}/json.jar
+
+# ----- Dojo Toolkit (for bayeux module) -----
+#dojo-js.home=${base.path}/dojo-release-1.1.1
+#dojo-js.loc=http://download.dojotoolkit.org/release-1.1.1/dojo-release-1.1.1.tar.gz
+#dojo-js.jar=${dojo-js.home}/dojo/dojo.js
+
diff --git a/apache-tomcat-7.0-context-ROOT.xml b/apache-tomcat-7.0-context-ROOT.xml
new file mode 100644
index 0000000..6c7bdfe
--- /dev/null
+++ b/apache-tomcat-7.0-context-ROOT.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/apache-tomcat-7.0-context-docs.xml b/apache-tomcat-7.0-context-docs.xml
new file mode 100644
index 0000000..9a11041
--- /dev/null
+++ b/apache-tomcat-7.0-context-docs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/apache-tomcat-7.0-context-examples.xml b/apache-tomcat-7.0-context-examples.xml
new file mode 100644
index 0000000..dd3e0d3
--- /dev/null
+++ b/apache-tomcat-7.0-context-examples.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/apache-tomcat-7.0-context-host-manager.xml b/apache-tomcat-7.0-context-host-manager.xml
new file mode 100644
index 0000000..779c84c
--- /dev/null
+++ b/apache-tomcat-7.0-context-host-manager.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apache-tomcat-7.0-context-manager.xml b/apache-tomcat-7.0-context-manager.xml
new file mode 100644
index 0000000..200cec9
--- /dev/null
+++ b/apache-tomcat-7.0-context-manager.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/apache-tomcat-7.0-digest.script b/apache-tomcat-7.0-digest.script
new file mode 100644
index 0000000..324f51d
--- /dev/null
+++ b/apache-tomcat-7.0-digest.script
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# tomcat6-digest script
+# JPackage Project
+
+# Source functions library
+if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+else
+ echo "Can't find functions library, aborting"
+ exit 1
+fi
+
+# Get the tomcat config (use this for environment specific settings)
+if [ -z "${TOMCAT_CFG}" ]; then
+ TOMCAT_CFG="/etc/tomcat7/tomcat7.conf"
+fi
+
+if [ -r "$TOMCAT_CFG" ]; then
+ . $TOMCAT_CFG
+fi
+
+set_javacmd
+#jsse.jar=$JAVA_HOME/jre/lib/jsse.jar
+#jcert.jar=$JAVA_HOME/jre/lib/jce.jar
+#jnet.jar=$JAVA_HOME/jre/lib/rt.jar
+#jdbc20ext.jar=$JAVA_HOME/jre/lib/rt.jar
+# CLASSPATH munging
+if [ -n "$JSSE_HOME" ]; then
+ CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
+fi
+CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
+CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
+export CLASSPATH
+
+# Configuration
+MAIN_CLASS="org.apache.catalina.startup.Tool"
+BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
+BASE_OPTIONS=""
+BASE_JARS="apache-commons-daemon tomcat7/catalina tomcat7-servlet-3.0-api tomcat7/tomcat-coyote"
+
+# Set parameters
+set_classpath $BASE_JARS
+set_flags $BASE_FLAGS
+set_options $BASE_OPTIONS
+
+# Let's start
+run -server org.apache.catalina.realm.RealmBase "$@"
diff --git a/apache-tomcat-7.0-log4j.properties b/apache-tomcat-7.0-log4j.properties
new file mode 100644
index 0000000..1252a64
--- /dev/null
+++ b/apache-tomcat-7.0-log4j.properties
@@ -0,0 +1,11 @@
+log4j.rootLogger=debug, R
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=${catalina.home}/logs/tomcat.log
+log4j.appender.R.MaxFileSize=10MB
+log4j.appender.R.MaxBackupIndex=10
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.logger.org.apache.catalina=DEBUG, R
+log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R
+log4j.logger.org.apache.catalina.core=DEBUG, R
+log4j.logger.org.apache.catalina.session=DEBUG, R
diff --git a/apache-tomcat-7.0-tool-wrapper.script b/apache-tomcat-7.0-tool-wrapper.script
new file mode 100644
index 0000000..bd8d77c
--- /dev/null
+++ b/apache-tomcat-7.0-tool-wrapper.script
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# tomcat6-digest script
+# JPackage Project
+
+# Source functions library
+if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+else
+ echo "Can't find functions library, aborting"
+ exit 1
+fi
+
+# Get the tomcat config (use this for environment specific settings)
+if [ -z "${TOMCAT_CFG}" ]; then
+ TOMCAT_CFG="/etc/tomcat7/tomcat7.conf"
+fi
+
+if [ -r "$TOMCAT_CFG" ]; then
+ . $TOMCAT_CFG
+fi
+
+set_javacmd
+#jsse.jar=$JAVA_HOME/jre/lib/jsse.jar
+#jcert.jar=$JAVA_HOME/jre/lib/jce.jar
+#jnet.jar=$JAVA_HOME/jre/lib/rt.jar
+#jdbc20ext.jar=$JAVA_HOME/jre/lib/rt.jar
+# CLASSPATH munging
+if [ -n "$JSSE_HOME" ]; then
+ CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
+fi
+CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
+CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
+export CLASSPATH
+
+# Configuration
+MAIN_CLASS="org.apache.catalina.startup.Tool"
+BASE_OPTIONS=""
+BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
+BASE_JARS="apache-commons-daemon tomcat7/catalina tomcat7-servlet-3.0-api tomcat7/tomcat-coyote"
+
+# Set parameters
+set_classpath $BASE_JARS
+set_flags $BASE_FLAGS
+set_options $BASE_OPTIONS
+
+# Let's start
+run "$@"
diff --git a/apache-tomcat-7.0.8-bootstrap-MANIFEST.MF.patch b/apache-tomcat-7.0.8-bootstrap-MANIFEST.MF.patch
new file mode 100644
index 0000000..cbc8542
--- /dev/null
+++ b/apache-tomcat-7.0.8-bootstrap-MANIFEST.MF.patch
@@ -0,0 +1,9 @@
+--- res/META-INF/bootstrap.jar.manifest 2011-02-04 13:52:34.000000000 +0100
++++ res/META-INF/bootstrap.jar.manifest-gil 2011-02-28 17:22:55.000000000 +0100
+@@ -1,6 +1,5 @@
+ Manifest-Version: 1.0
+ Main-Class: org.apache.catalina.startup.Bootstrap
+-Class-Path: commons-daemon.jar
+ Specification-Title: Apache Tomcat Bootstrap
+ Specification-Version: @VERSION_MAJOR_MINOR@
+ Specification-Vendor: Apache Software Foundation
diff --git a/apache-tomcat-7.0.8-build_xml.patch b/apache-tomcat-7.0.8-build_xml.patch
new file mode 100644
index 0000000..7d678a7
--- /dev/null
+++ b/apache-tomcat-7.0.8-build_xml.patch
@@ -0,0 +1,461 @@
+--- build.xml 2011-02-18 22:44:13.000000000 +0100
++++ build.xml-gil 2011-03-01 15:13:36.000000000 +0100
+@@ -420,51 +420,8 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+-
++
+
+
+
+
+-
+-
+-
+-
+-
+
+
+
+@@ -1008,7 +958,7 @@
+
+
+
+-
++
+
+
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
+-
+-
+-
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
+
+-
++
+
+
+
+@@ -2095,300 +1991,6 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- Eclipse project files created.
+-Read the Building page on the Apache Tomcat documentation site for details on how to configure your Eclipse workplace.
+-
+-
+
+
+
diff --git a/apache-tomcat-7.0.8-tomcat-users-webapp.patch b/apache-tomcat-7.0.8-tomcat-users-webapp.patch
new file mode 100644
index 0000000..c54bad1
--- /dev/null
+++ b/apache-tomcat-7.0.8-tomcat-users-webapp.patch
@@ -0,0 +1,12 @@
+--- conf/tomcat-users.xml 2011-02-04 13:52:30.000000000 +0100
++++ conf/tomcat-users.xml-gil 2011-02-28 17:27:16.000000000 +0100
+@@ -33,4 +33,9 @@
+
+
+ -->
++
++
++
++
++
+
diff --git a/apache-tomcat-7.0.9-LDAPUserDatabase.patch b/apache-tomcat-7.0.9-LDAPUserDatabase.patch
new file mode 100644
index 0000000..f8f6bc7
--- /dev/null
+++ b/apache-tomcat-7.0.9-LDAPUserDatabase.patch
@@ -0,0 +1,438 @@
+diff -urN java/org/apache/catalina/startup/LDAPUserDatabase.java java/org/apache/catalina/startup-gil/LDAPUserDatabase.java
+--- java/org/apache/catalina/startup/LDAPUserDatabase.java 1970-01-01 01:00:00.000000000 +0100
++++ java/org/apache/catalina/startup-gil/LDAPUserDatabase.java 2011-03-01 16:54:57.000000000 +0100
+@@ -0,0 +1,196 @@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++
++package org.apache.catalina.startup;
++
++import java.util.Enumeration;
++import java.util.Hashtable;
++
++import javax.naming.Context;
++import javax.naming.NamingEnumeration;
++import javax.naming.NamingException;
++import javax.naming.directory.Attribute;
++import javax.naming.directory.Attributes;
++import javax.naming.directory.SearchControls;
++import javax.naming.directory.SearchResult;
++import javax.naming.ldap.Control;
++import javax.naming.ldap.InitialLdapContext;
++import javax.naming.ldap.LdapContext;
++import javax.naming.ldap.PagedResultsControl;
++import javax.naming.ldap.PagedResultsResponseControl;
++
++
++/**
++ * Concrete implementation of the UserDatabase
interface
++ * that retrieves user data from LDAP server.
++ *
++ * @author Jan Rękorajski
++ * @version 0.1
++ */
++
++public final class LDAPUserDatabase
++ implements UserDatabase {
++
++ // --------------------------------------------------------- Constructors
++
++ /**
++ * Initialize a new instance of this user database component.
++ */
++ public LDAPUserDatabase() {
++ super();
++ }
++
++ // --------------------------------------------------- Instance Variables
++
++ /**
++ * The set of home directories for all defined users, keyed by username.
++ */
++ private Hashtable homes = new Hashtable();
++
++ /**
++ * The UserConfig listener with which we are associated.
++ */
++ private UserConfig userConfig = null;
++
++ // ----------------------------------------------------------- Properties
++
++ /**
++ * Return the UserConfig listener with which we are associated.
++ */
++ public UserConfig getUserConfig() {
++ return (this.userConfig);
++ }
++
++ /**
++ * Set the UserConfig listener with which we are associated.
++ *
++ * @param userConfig The new UserConfig listener
++ */
++ public void setUserConfig(UserConfig userConfig) {
++ this.userConfig = userConfig;
++ init();
++ }
++
++ // ------------------------------------------------------- Public Methods
++
++ /**
++ * Return an absolute pathname to the home directory for the specified user.
++ *
++ * @param user User for which a home directory should be retrieved
++ */
++ public String getHome(String user) {
++ return homes.get(user);
++ }
++
++
++ /**
++ * Return an enumeration of the usernames defined on this server.
++ */
++ public Enumeration getUsers() {
++ return (homes.keys());
++ }
++
++ // ------------------------------------------------------ Private Methods
++
++
++ /**
++ * Initialize our set of users and home directories.
++ */
++ private void init() {
++ String connectionURL = userConfig.getConnectionURL();
++ String connectionName = userConfig.getConnectionName();
++ String connectionPassword = userConfig.getConnectionPassword();
++ String authentication = userConfig.getAuthentication();
++ String searchBase = userConfig.getSearchBase();
++ String searchFilter = userConfig.getSearchFilter();
++ boolean searchSubtree = userConfig.getSearchSubtree();
++ String userAttr = userConfig.getUserAttr();
++ String homeAttr = userConfig.getHomeAttr();
++ int pageSize = userConfig.getPageSize();
++
++ try {
++ Hashtable env = new Hashtable();
++
++ env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
++ if (connectionName != null)
++ env.put(Context.SECURITY_PRINCIPAL, connectionName);
++ if (connectionPassword != null)
++ env.put(Context.SECURITY_CREDENTIALS, connectionPassword);
++ if (connectionURL != null)
++ env.put(Context.PROVIDER_URL, connectionURL);
++ if (authentication != null)
++ env.put(Context.SECURITY_AUTHENTICATION, authentication);
++
++ LdapContext ctx = new InitialLdapContext(env, null);
++
++ SearchControls constraints = new SearchControls();
++ String returnAttrs[] = { userAttr, homeAttr };
++ constraints.setReturningAttributes(returnAttrs);
++ if (searchSubtree) {
++ constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
++ } else {
++ constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
++ }
++
++ // Request the paged results control
++ if (pageSize > 0) {
++ Control[] ctls = new Control[]{ new PagedResultsControl(pageSize, Control.NONCRITICAL) };
++ ctx.setRequestControls(ctls);
++ }
++
++ byte[] cookie = null;
++ do {
++ NamingEnumeration results = ctx.search(searchBase, searchFilter, constraints);
++ while (results != null && results.hasMore()) {
++ SearchResult sr = (SearchResult)results.next();
++ String username = null;
++ String home = null;
++ Attributes attr = sr.getAttributes();
++ Attribute a = attr.get(homeAttr);
++ if (a != null && a.size() == 1)
++ home = (String)a.get();
++ a = attr.get(userAttr);
++ if ((home != null) && (a != null)) {
++ // Add all possible names of this user and corresponding directory
++ for (int i = 0; i < a.size(); i++) {
++ username = (String)a.get(i);
++ if (username != null) {
++ homes.put(username, home);
++ }
++ }
++ }
++ }
++ cookie = null;
++ Control[] controls = ctx.getResponseControls();
++ if (controls != null) {
++ for (int i = 0; i < controls.length; i++) {
++ if (controls[i] instanceof PagedResultsResponseControl) {
++ PagedResultsResponseControl prrc = (PagedResultsResponseControl)controls[i];
++ cookie = prrc.getCookie();
++ }
++ }
++ }
++ if (cookie != null) {
++ ctx.setRequestControls(new Control[]{ new PagedResultsControl(pageSize, cookie, Control.CRITICAL) });
++ }
++ } while ((cookie != null) && (cookie.length != 0));
++ } catch (Exception e) {
++ // e.printStackTrace();
++ }
++ }
++}
+\ Manca newline alla fine del file
+diff -urN java/org/apache/catalina/startup/UserConfig.java java/org/apache/catalina/startup-gil/UserConfig.java
+--- java/org/apache/catalina/startup/UserConfig.java 2010-04-29 15:43:39.000000000 +0200
++++ java/org/apache/catalina/startup-gil/UserConfig.java 2011-03-01 17:10:43.000000000 +0100
+@@ -83,6 +83,65 @@
+
+
+ /**
++ * The connection URL for the LDAP server we will contact.
++ */
++ private String connectionURL = null;
++
++
++ /**
++ * The connection username for the LDAP server we will contact.
++ */
++ private String connectionName = null;
++
++
++ /**
++ * The connection password for the LDAP server we will contact.
++ */
++ private String connectionPassword = null;
++
++
++ /**
++ * The type of authentication to use
++ */
++ private String authentication = null;
++
++
++ /**
++ * The page size for paged LDAP query.
++ */
++ private int pageSize = 0;
++
++
++ /**
++ * The base element for user searches.
++ */
++ private String searchBase = "";
++
++
++ /**
++ * The message format used to search for users.
++ */
++ private String searchFilter = "(objectClass=posixAccount)";
++
++
++ /**
++ * Should we search the entire subtree for matching users?
++ */
++ private boolean searchSubtree = false;
++
++
++ /**
++ * The attibute that denotes user name(s).
++ */
++ private String userAttr = "uid";
++
++
++ /**
++ * The attibute that denotes user home directory.
++ */
++ private String homeAttr = "homeDirectory";
++
++ /**
+ * The string resources for this package.
+ */
+ private static final StringManager sm =
+@@ -186,6 +245,167 @@
+
+ }
+
++
++ /**
++ * The connection URL for the LDAP server we will contact.
++ */
++ public String getConnectionURL() {
++
++ return (this.connectionURL);
++
++ }
++ public void setConnectionURL(String connectionURL) {
++
++ this.connectionURL = connectionURL;
++
++ }
++
++
++ /**
++ * The connection username for the LDAP server we will contact.
++ */
++ public String getConnectionName() {
++
++ return (this.connectionName);
++
++ }
++ public void setConnectionName(String connectionName) {
++
++ this.connectionName = connectionName;
++
++ }
++
++
++ /**
++ * The connection password for the LDAP server we will contact.
++ */
++ public String getConnectionPassword() {
++
++ return (this.connectionPassword);
++
++ }
++ public void setConnectionPassword(String connectionPassword) {
++
++ this.connectionPassword = connectionPassword;
++
++ }
++
++ /**
++ * Return the type of authentication to use.
++ */
++ public String getAuthentication() {
++
++ return (this.authentication);
++
++ }
++
++ /**
++ * Set the type of authentication to use.
++ *
++ * @param authentication The authentication
++ */
++ public void setAuthentication(String authentication) {
++
++ this.authentication = authentication;
++
++ }
++
++
++ /**
++ * Return the page size for paged LDAP query.
++ */
++ public int getPageSize() {
++
++ return (this.pageSize);
++
++ }
++
++ /**
++ * Set the page size for paged LDAP query.
++ *
++ * @param pagesize The page size
++ */
++ public void setPageSize(int pageSize) {
++
++ this.pageSize = pageSize;
++
++ }
++
++
++ /**
++ * The base element for user searches.
++ */
++ public String getSearchBase() {
++
++ return (this.searchBase);
++
++ }
++ public void setSearchBase(String searchBase) {
++
++ this.searchBase = searchBase;
++
++ }
++
++
++ /**
++ * The message format used to search for users.
++ */
++ public String getSearchFilter() {
++
++ return (this.searchFilter);
++
++ }
++ public void setSearchFilter(String searchFilter) {
++
++ this.searchFilter = searchFilter;
++
++ }
++
++
++ /**
++ * Should we search the entire subtree for matching users?
++ */
++ public boolean getSearchSubtree() {
++
++ return (this.searchSubtree);
++
++ }
++ public void setSearchSubtree(boolean searchSubtree) {
++
++ this.searchSubtree = searchSubtree;
++
++ }
++
++
++ /**
++ * The attibute that denotes user name(s).
++ */
++ public String getUserAttr() {
++
++ return (this.userAttr);
++
++ }
++ public void setUserAttr(String userAttr) {
++
++ this.userAttr = userAttr;
++
++ }
++
++
++ /**
++ * The attibute that denotes user home directory.
++ */
++ public String getHomeAttr() {
++
++ return (this.homeAttr);
++
++ }
++ public void setHomeAttr(String homeAttr) {
++
++ this.homeAttr = homeAttr;
++
++ }
++
+
+ /**
+ * Return the user database class name for this component.
diff --git a/apache-tomcat-7.0.9-catalina_policy-javadir.patch b/apache-tomcat-7.0.9-catalina_policy-javadir.patch
new file mode 100644
index 0000000..b60caa1
--- /dev/null
+++ b/apache-tomcat-7.0.9-catalina_policy-javadir.patch
@@ -0,0 +1,13 @@
+--- conf/catalina.policy 2010-08-02 13:00:51.000000000 +0200
++++ conf/catalina.policy-gil 2011-03-01 15:17:32.000000000 +0100
+@@ -52,6 +52,10 @@
+ permission java.security.AllPermission;
+ };
+
++// These permissions apply to all shared system extensions
++grant codeBase "file:/usr/share/java/-" {
++ permission java.security.AllPermission;
++};
+
+ // ========== CATALINA CODE PERMISSIONS =======================================
+
diff --git a/apache-tomcat-7.0.9-server_xml-URIEncoding-utf8.patch b/apache-tomcat-7.0.9-server_xml-URIEncoding-utf8.patch
new file mode 100644
index 0000000..ea2b5f0
--- /dev/null
+++ b/apache-tomcat-7.0.9-server_xml-URIEncoding-utf8.patch
@@ -0,0 +1,32 @@
+--- conf/server.xml 2011-03-01 21:01:34.000000000 +0100
++++ conf/server.xml-gil 2011-03-01 21:07:52.000000000 +0100
+@@ -69,12 +69,14 @@
+ -->
+
+
+
+
+
+
+
+-
++
+
+
+
++
++
++
++
++
++
++
+
+
+
diff --git a/apache-tomcat-7.0.9-tomcat-users_xml-admin.patch b/apache-tomcat-7.0.9-tomcat-users_xml-admin.patch
new file mode 100644
index 0000000..f80d03f
--- /dev/null
+++ b/apache-tomcat-7.0.9-tomcat-users_xml-admin.patch
@@ -0,0 +1,18 @@
+--- conf/tomcat-users.xml 2011-03-02 00:56:49.000000000 +0100
++++ conf/tomcat-users.xml-gil 2011-03-02 01:07:08.000000000 +0100
+@@ -26,11 +26,15 @@
+ and thus are ignored when reading this file. Do not forget to remove
+ that surrounds them.
+ -->
++
+
+
diff --git a/apache-tomcat-7.0.conf b/apache-tomcat-7.0.conf
new file mode 100644
index 0000000..803542f
--- /dev/null
+++ b/apache-tomcat-7.0.conf
@@ -0,0 +1,50 @@
+# System-wide configuration file for tomcat6 services
+# This will be sourced by tomcat6 and any secondary service
+# Values will be overridden by service-specific configuration
+# files in /etc/sysconfig
+#
+# Use this one to change default values for all services
+# Change the service specific ones to affect only one service
+# (see, for instance, /etc/sysconfig/tomcat7)
+#
+
+# Where your java installation lives
+JAVA_HOME="@@@JAVAHOME@@@"
+
+# Where your tomcat installation lives
+CATALINA_BASE="@@@TCHOME@@@"
+CATALINA_HOME="@@@TCHOME@@@"
+JASPER_HOME="@@@TCHOME@@@"
+CATALINA_TMPDIR="@@@TCTEMP@@@"
+
+# You can pass some parameters to java here if you wish to
+#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
+
+# Use JAVA_OPTS to set java.library.path for libtcnative.so
+#JAVA_OPTS="-Djava.library.path=@@@LIBDIR@@@"
+
+# What user should run tomcat
+TOMCAT_USER="tomcat"
+
+# You can change your tomcat locale here
+#LANG="en_US"
+
+# Run tomcat under the Java Security Manager
+SECURITY_MANAGER="false"
+
+# Time to wait in seconds, before killing process
+SHUTDOWN_WAIT="30"
+
+# Whether to annoy the user with "attempting to shut down" messages or not
+SHUTDOWN_VERBOSE="false"
+
+# Set the TOMCAT_PID location
+CATALINA_PID="/var/run/tomcat7.pid"
+
+# Connector port is 8080 for this tomcat7 instance
+#CONNECTOR_PORT="8080"
+
+# If you wish to further customize your tomcat7 environment,
+# put your own definitions here
+# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
+
diff --git a/apache-tomcat-7.0.init b/apache-tomcat-7.0.init
new file mode 100644
index 0000000..dc8c34d
--- /dev/null
+++ b/apache-tomcat-7.0.init
@@ -0,0 +1,291 @@
+#!/bin/bash
+#
+# tomcat6 This shell script takes care of starting and stopping Tomcat
+#
+# chkconfig: - 80 20
+#
+### BEGIN INIT INFO
+# Provides: tomcat7
+# Required-Start: $network $syslog
+# Required-Stop: $network $syslog
+# Default-Start:
+# Default-Stop:
+# Description: Release implementation for Servlet 3.0 and JSP 2.2
+# Short-Description: start and stop tomcat
+### END INIT INFO
+#
+# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
+# - heavily rewritten by Deepak Bhole and Jason Corley
+#
+
+## Source function library.
+#. /etc/rc.d/init.d/functions
+# Source LSB function library.
+if [ -r /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+else
+ exit 1
+fi
+
+DISTRIB_ID=`lsb_release -i -s 2>/dev/null`
+
+NAME="$(basename $0)"
+unset ISBOOT
+if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
+ NAME="${NAME:3}"
+ ISBOOT="1"
+fi
+
+# For SELinux we need to use 'runuser' not 'su'
+if [ -x "/sbin/runuser" ]; then
+ SU="/sbin/runuser"
+else
+ SU="/bin/su"
+fi
+
+# Get the tomcat config (use this for environment specific settings)
+TOMCAT_CFG="/etc/tomcat7/tomcat7.conf"
+if [ -r "$TOMCAT_CFG" ]; then
+ . $TOMCAT_CFG
+fi
+
+# Get instance specific config file
+if [ -r "/etc/sysconfig/${NAME}" ]; then
+ . /etc/sysconfig/${NAME}
+fi
+
+# Define which connector port to use
+CONNECTOR_PORT="${CONNECTOR_PORT:-8080}"
+
+# Path to the tomcat launch script
+TOMCAT_SCRIPT="/usr/sbin/tomcat7"
+
+# Tomcat program name
+TOMCAT_PROG="${NAME}"
+
+# Define the tomcat username
+TOMCAT_USER="${TOMCAT_USER:-tomcat}"
+
+# Define the tomcat log file
+TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat7/catalina.out}"
+
+RETVAL="0"
+
+# Look for open ports, as the function name might imply
+function findFreePorts() {
+ local isSet1="false"
+ local isSet2="false"
+ local isSet3="false"
+ local lower="8000"
+ randomPort1="0"
+ randomPort2="0"
+ randomPort3="0"
+ local -a listeners="( $(
+ netstat -ntl | \
+ awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}'
+ ) )"
+ while [ "$isSet1" = "false" ] || \
+ [ "$isSet2" = "false" ] || \
+ [ "$isSet3" = "false" ]; do
+ let port="${lower}+${RANDOM:0:4}"
+ if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then
+ if [ "$isSet1" = "false" ]; then
+ export randomPort1="$port"
+ isSet1="true"
+ elif [ "$isSet2" = "false" ]; then
+ export randomPort2="$port"
+ isSet2="true"
+ elif [ "$isSet3" = "false" ]; then
+ export randomPort3="$port"
+ isSet3="true"
+ fi
+ fi
+ done
+}
+
+function makeHomeDir() {
+ if [ ! -d "$CATALINA_HOME" ]; then
+ echo "$CATALINA_HOME does not exist, creating"
+ if [ ! -d "/usr/share/${NAME}" ]; then
+ mkdir /usr/share/${NAME}
+ cp -pLR /usr/share/tomcat7/* /usr/share/${NAME}
+ fi
+ mkdir -p /var/log/${NAME} \
+ /var/cache/${NAME} \
+ /var/tmp/${NAME}
+ ln -fs /var/cache/${NAME} ${CATALINA_HOME}/work
+ ln -fs /var/tmp/${NAME} ${CATALINA_HOME}/temp
+ cp -pLR /usr/share/${NAME}/bin $CATALINA_HOME
+ cp -pLR /usr/share/${NAME}/conf $CATALINA_HOME
+ ln -fs /usr/share/java/tomcat7 ${CATALINA_HOME}/lib
+ ln -fs /usr/share/tomcat7/webapps ${CATALINA_HOME}/webapps
+ chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME}
+ fi
+}
+
+function parseOptions() {
+ options=""
+ options="$options $(
+ awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \
+ $TOMCAT_CFG
+ )"
+ if [ -r "/etc/sysconfig/${NAME}" ]; then
+ options="$options $(
+ awk '!/^#/ && !/^$/ { ORS=" ";
+ print "export ", $0, ";" }' \
+ /etc/sysconfig/${NAME}
+ )"
+ fi
+ TOMCAT_SCRIPT="$options ${TOMCAT_SCRIPT}"
+}
+
+# See how we were called.
+function start() {
+ echo -n "Starting ${TOMCAT_PROG}: "
+ if [ -f "/var/lock/subsys/${NAME}" ] ; then
+ if [ -f "/var/run/${NAME}.pid" ]; then
+ read kpid < /var/run/${NAME}.pid
+# if checkpid $kpid 2>&1; then
+ if [ -d "/proc/${kpid}" ]; then
+ log_success_msg
+ if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
+ echo
+ fi
+ return 0
+ fi
+ fi
+ fi
+ # fix permissions on the log and pid files
+ export CATALINA_PID="/var/run/${NAME}.pid"
+ touch $CATALINA_PID
+ chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
+ touch $TOMCAT_LOG
+ chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG
+ if [ "$CATALINA_HOME" != "/usr/share/tomcat7" ]; then
+ # Create a tomcat directory if it doesn't exist
+ makeHomeDir
+ # If CATALINA_HOME doesn't exist modify port number so that
+ # multiple instances don't interfere with each other
+ findFreePorts
+ sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \
+ -e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \
+ ${CATALINA_HOME}/conf/server.xml
+ fi
+ parseOptions
+ if [ "$SECURITY_MANAGER" = "true" ]; then
+ $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \
+ >> $TOMCAT_LOG 2>&1
+ else
+ $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1
+ fi
+ RETVAL="$?"
+ if [ "$RETVAL" -eq 0 ]; then
+ log_success_msg
+ touch /var/lock/subsys/${NAME}
+ else
+ log_failure_msg
+ fi
+ if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
+ echo
+ fi
+ return $RETVAL
+}
+
+function stop() {
+ RETVAL="0"
+ echo -n "Stopping ${TOMCAT_PROG}: "
+ if [ -f "/var/lock/subsys/${NAME}" ]; then
+ parseOptions
+ $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1
+ RETVAL="$?"
+ if [ "$RETVAL" -eq "0" ]; then
+ count="0"
+ if [ -f "/var/run/${NAME}.pid" ]; then
+ read kpid < /var/run/${NAME}.pid
+ until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \
+ [ "$count" -gt "$SHUTDOWN_WAIT" ]; do
+ if [ "$SHUTDOWN_VERBOSE" = "true" ]; then
+ echo "waiting for processes $kpid to exit"
+ fi
+ sleep 1
+ let count="${count}+1"
+ done
+ if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then
+ if [ "$SHUTDOWN_VERBOSE" = "true" ]; then
+ echo "killing processes which didn't stop after $SHUTDOWN_WAIT seconds"
+ fi
+ kill -9 $kpid
+ fi
+ log_success_msg
+ fi
+ rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid
+ else
+ log_failure_msg
+ fi
+ else
+ log_success_msg
+ fi
+ if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
+ echo
+ fi
+ return $RETVAL
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart|try-restart)
+ if [ -f "/var/run/${NAME}.pid" ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ RETVAL="3"
+ ;;
+ force-reload)
+ if [ -f "/var/run/${NAME}.pid" ]; then
+ stop
+ start
+ fi
+ ;;
+ status)
+ if [ -f "/var/run/${NAME}.pid" ]; then
+# status ${NAME}
+# RETVAL="$?"
+ read kpid < /var/run/${NAME}.pid
+ if [ -d "/proc/${kpid}" ]; then
+ echo "${NAME} (pid ${kpid}) is running..."
+ RETVAL="0"
+ fi
+ else
+ pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)"
+ if [ -z "$pid" ]; then
+# status ${NAME}
+# RETVAL="$?"
+ echo "${NAME} is stopped"
+ RETVAL="3"
+ else
+ echo "${NAME} (pid $pid) is running..."
+ RETVAL="0"
+ fi
+ fi
+ ;;
+ version)
+ ${TOMCAT_SCRIPT} version
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}"
+ RETVAL="2"
+esac
+
+exit $RETVAL
diff --git a/apache-tomcat-7.0.logrotate b/apache-tomcat-7.0.logrotate
new file mode 100644
index 0000000..a87b4c0
--- /dev/null
+++ b/apache-tomcat-7.0.logrotate
@@ -0,0 +1,8 @@
+@@@TCLOG@@@/catalina.out {
+ copytruncate
+ weekly
+ rotate 52
+ compress
+ missingok
+ create 0644 tomcat tomcat
+}
diff --git a/apache-tomcat-7.0.sysconfig b/apache-tomcat-7.0.sysconfig
new file mode 100644
index 0000000..f661347
--- /dev/null
+++ b/apache-tomcat-7.0.sysconfig
@@ -0,0 +1,56 @@
+# Service-specific configuration file for tomcat7. This will be sourced by
+# the SysV init script after the global configuration file
+# /etc/tomcat7/tomcat7.conf, thus allowing values to be overridden in
+# a per-service manner.
+#
+# NEVER change the init script itself. To change values for all services make
+# your changes in /etc/tomcat7/tomcat7.conf
+#
+# To change values for a specific service make your edits here.
+# To create a new service create a link from /etc/init.d/ to
+# /etc/init.d/tomcat7 (do not copy the init script) and make a copy of the
+# /etc/sysconfig/tomcat7 file to /etc/sysconfig/ and change
+# the property values so the two services won't conflict. Register the new
+# service in the system as usual (see chkconfig and similars).
+#
+
+# Where your java installation lives
+#JAVA_HOME="@@@JAVAHOME@@@"
+
+# Where your tomcat installation lives
+#CATALINA_BASE="@@@TCHOME@@@"
+#CATALINA_HOME="@@@TCHOME@@@"
+#JASPER_HOME="@@@TCHOME@@@"
+#CATALINA_TMPDIR="@@@TCTEMP@@@"
+
+# You can pass some parameters to java here if you wish to
+#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
+
+# Use JAVA_OPTS to set java.library.path for libtcnative.so
+#JAVA_OPTS="-Djava.library.path=@@@LIBDIR@@@"
+
+# What user should run tomcat
+#TOMCAT_USER="tomcat"
+
+# You can change your tomcat locale here
+#LANG="en_US"
+
+# Run tomcat under the Java Security Manager
+#SECURITY_MANAGER="false"
+
+# Time to wait in seconds, before killing process
+#SHUTDOWN_WAIT="30"
+
+# Whether to annoy the user with "attempting to shut down" messages or not
+#SHUTDOWN_VERBOSE="false"
+
+# Set the TOMCAT_PID location
+#CATALINA_PID="/var/run/tomcat7.pid"
+
+# Connector port is 8080 for this tomcat7 instance
+#CONNECTOR_PORT="8080"
+
+# If you wish to further customize your tomcat7 environment,
+# put your own definitions here
+# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
+
diff --git a/apache-tomcat-7.0.wrapper b/apache-tomcat-7.0.wrapper
new file mode 100644
index 0000000..ec5770e
--- /dev/null
+++ b/apache-tomcat-7.0.wrapper
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# tomcat6-digest script
+# JPackage Project
+
+# Source functions library
+if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+else
+ echo "Can't find functions library, aborting"
+ exit 1
+fi
+
+# Get the tomcat config (use this for environment specific settings)
+if [ -z "${TOMCAT_CFG}" ]; then
+ TOMCAT_CFG="/etc/tomcat7/tomcat7.conf"
+fi
+
+if [ -r "$TOMCAT_CFG" ]; then
+ . $TOMCAT_CFG
+fi
+
+set_javacmd
+
+#jsse.jar=$JAVA_HOME/jre/lib/jsse.jar
+#jcert.jar=$JAVA_HOME/jre/lib/jce.jar
+#jnet.jar=$JAVA_HOME/jre/lib/rt.jar
+#jdbc20ext.jar=$JAVA_HOME/jre/lib/rt.jar
+# CLASSPATH munging
+if [ -n "$JSSE_HOME" ]; then
+ CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
+fi
+CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
+CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
+export CLASSPATH
+
+# Configuration
+MAIN_CLASS="org.apache.catalina.startup.Tool"
+BASE_OPTIONS=""
+BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
+BASE_JARS="apache-commons-daemon tomcat7/catalina tomcat7-servlet-3.0-api tomcat7/tomcat-coyote"
+
+# Set parameters
+set_classpath $BASE_JARS
+set_flags $BASE_FLAGS
+set_options $BASE_OPTIONS
+
+# Let's start
+run "$@"
diff --git a/apache-tomcat.spec b/apache-tomcat.spec
new file mode 100644
index 0000000..9ce02ed
--- /dev/null
+++ b/apache-tomcat.spec
@@ -0,0 +1,800 @@
+%define jsp_api_version 2.2
+%define servlet_api_version 3.0
+%define el_api_version 2.2
+%define with_embed 1
+%define pkgname apache-tomcat-%{version}-src
+%define pkg_dir %{_builddir}/apache-tomcat-%{version}/%{pkgname}
+
+%define tom_name tomcat7
+%define native_ver 1.1.20
+%define daemon_ver 1.0.5
+%define logging_ver 1.1.1
+%define dojo_ver 1.1.1
+# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
+%define appdir %{_localstatedir}/lib/%{tom_name}/webapps
+%define bindir %{_datadir}/%{tom_name}/bin
+%define confdir %{_sysconfdir}/%{tom_name}
+%define homedir %{_datadir}/%{tom_name}
+%define libdir %{_javadir}/%{tom_name}
+%define logdir %{_localstatedir}/log/%{tom_name}
+%global cachedir %{_localstatedir}/cache/%{tom_name}
+%define tempdir %{cachedir}/temp
+%define workdir %{cachedir}/work
+%define javahome /usr/lib/jvm/java
+%define version_build %(echo %version | cut -d. -f 3-)
+
+Name: apache-tomcat
+Version: 7.0.20
+Release: 1mamba
+Summary: Apache Servlet/JSP Engine, RI for Servlet %{servlet_api_version}/JSP %{jsp_api_version} API
+Group: System/Servers
+Vendor: openmamba
+Distribution: openmamba
+Packager: gil
+URL: http://tomcat.apache.org
+Source0: http://apache.fis.uniroma2.it/tomcat/tomcat-7/v%{version}/src/apache-tomcat-%{version}-src.tar.gz
+# svn export http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_9/ apache-tomcat-7.0.9-src
+#Source0: apache-tomcat-%{version}-src-svn.tar.gz
+Source1: apache-tomcat-7.0.conf
+Source2: apache-tomcat-7.0.init
+Source3: apache-tomcat-7.0.sysconfig
+Source4: apache-tomcat-7.0.wrapper
+Source5: apache-tomcat-7.0.logrotate
+Source6: apache-tomcat-7.0-digest.script
+Source7: apache-tomcat-7.0-tool-wrapper.script
+Source8: apache-tomcat-7.0-log4j.properties
+Source9: http://archive.apache.org/dist/commons/logging/source/commons-logging-%{logging_ver}-src.tar.gz
+Source10: apache-tomcat-7.0-build.properties
+Source11: apache-tomcat-7.0-context-host-manager.xml
+Source12: apache-tomcat-7.0-context-examples.xml
+Source13: apache-tomcat-7.0-context-docs.xml
+Source14: apache-tomcat-7.0-context-ROOT.xml
+Source15: apache-tomcat-7.0-context-manager.xml
+#Source16: http://download.dojotoolkit.org/release-%{dojo_ver}/dojo-release-%{dojo_ver}.tar.gz
+Patch0: apache-tomcat-7.0.8-build_xml.patch
+Patch1: apache-tomcat-7.0.8-bootstrap-MANIFEST.MF.patch
+Patch2: apache-tomcat-7.0.8-tomcat-users-webapp.patch
+Patch3: apache-tomcat-7.0.9-catalina_policy-javadir.patch
+Patch4: apache-tomcat-7.0.9-server_xml-userdir.patch
+Patch5: apache-tomcat-7.0.9-server_xml-URIEncoding-utf8.patch
+Patch6: apache-tomcat-7.0.9-tomcat-users_xml-admin.patch
+Patch7: apache-tomcat-7.0.9-LDAPUserDatabase.patch
+License: Apache Software License Version 2.0
+BuildRequires: apache-ant
+BuildRequires: apache-ant-trax
+BuildRequires: apache-log4j
+BuildRequires: apache-commons-dbcp
+BuildRequires: apache-geronimo-1.2-specs
+BuildRequires: coreutils
+BuildRequires: eclipse-ecj
+BuildRequires: findutils
+BuildRequires: jakarta-commons-collections
+BuildRequires: jakarta-commons-collections-tomcat5
+BuildRequires: apache-commons-daemon
+BuildRequires: apache-commons-pool
+BuildRequires: apache-tomcat-dbcp == %{version}
+BuildRequires: jakarta-taglibs-standard
+BuildRequires: java-checkstyle == 5.1
+BuildRequires: java-excalibur-avalon-framework
+BuildRequires: java-excalibur-avalon-logkit
+BuildRequires: java-json
+BuildRequires: java-junit3
+BuildRequires: java-mysql-connector
+BuildRequires: java-openjdk
+BuildRequires: java-wsdl4j
+BuildRequires: jpackage-utils
+Requires: apache-geronimo-1.2-specs
+Requires: apache-commons-daemon
+Requires: apache-commons-daemon-jsvc
+Requires: eclipse-ecj
+Requires: jakarta-commons-logging == %{logging_ver}
+Requires: java-checkstyle == 5.1
+Requires: java-mysql-connector
+Requires: java-openjdk-runtime
+Requires: java-wsdl4j
+Requires: libtomcat-native == %{native_ver}
+Requires: lib%{tom_name} = %{?epoch:%epoch:}%{version}-%{release}
+Requires: procps
+Requires: shadow-common
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+Tomcat is developed in an open and participatory environment and released under the Apache Software License 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world.
+We invite you to participate in this open development project.
+
+%package admin
+Group: System/Servers
+Summary: The host-manager and manager web applications for Apache Tomcat
+Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
+
+%description admin
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+The host-manager and manager web applications for Apache Tomcat.
+
+%package webapps
+Group: System/Servers
+Summary: The ROOT and examples web applications for Apache Tomcat
+Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
+Requires: jakarta-taglibs-standard
+Obsoletes: %{name}-devel
+Provides: %{name}-devel
+
+%description webapps
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+The ROOT and examples web applications for Apache Tomcat.
+
+%package el-%{el_api_version}-api
+Group: Development/Libraries/Java
+Summary: Expression Language v1.0 API
+Provides: elapi7
+
+%description el-%{el_api_version}-api
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains the implementation classes of the Apache Tomcat Expression Language v1.0 API.
+
+%package servlet-%{servlet_api_version}-api
+Group: Development/Libraries/Java
+Summary: Java API for Servlets
+Provides: servletapi7
+
+%description servlet-%{servlet_api_version}-api
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This subproject contains the source code for the implementation classes of the Java Servlet and JSP APIs (packages javax.servlet).
+
+%package jsp-%{jsp_api_version}-api
+Group: Development/Libraries/Java
+Summary: Java API for JavaServer Pages
+Requires: %{name}-servlet-%{servlet_api_version}-api = %{?epoch:%epoch:}%{version}-%{release}
+Provides: jspapi7
+
+%description jsp-%{jsp_api_version}-api
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+Contains the implementation classes of the Apache Tomcat JSP API (packages javax.servlet.jsp)
+
+%package javadoc
+Group: Documentation
+Summary: Javadoc for %{name}
+
+%description javadoc
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains documentation for %{name}.
+
+%package el-%{el_api_version}-api-javadoc
+Group: Documentation
+Summary: Javadoc for %{name}-el-%{el_api_version}-api
+
+%description el-%{el_api_version}-api-javadoc
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains documentation for %{name}-el-%{el_api_version}-api.
+
+%package jsp-%{jsp_api_version}-api-javadoc
+Group: Documentation
+Summary: Javadoc for %{name}-jsp-%{jsp_api_version}-api
+
+%description jsp-%{jsp_api_version}-api-javadoc
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains documentation for %{name}-jsp-%{jsp_api_version}-api.
+
+%package servlet-%{servlet_api_version}-api-javadoc
+Group: Documentation
+Summary: Javadoc for %{name}-servlet-%{servlet_api_version}-api
+
+%description servlet-%{servlet_api_version}-api-javadoc
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains documentation for %{name}-servlet-%{servlet_api_version}-api.
+
+%package -n lib%{tom_name}
+Group: Development/Languages
+Summary: Libraries needed to run the Tomcat Web container
+Requires: eclipse-ecj
+Requires: jakarta-commons-collections-tomcat5
+Requires: apache-commons-dbcp
+Requires: apache-commons-pool
+Requires: apache-tomcat-dbcp == %{version}
+Requires: %{name}-jsp-%{jsp_api_version}-api = %{?epoch:%epoch:}%{version}-%{release}
+Requires: %{name}-servlet-%{servlet_api_version}-api = %{?epoch:%epoch:}%{version}-%{release}
+Requires: coreutils
+
+%description -n lib%{tom_name}
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains libraries needed to run the Tomcat Web container.
+
+%package webapp-docs
+Group: Documentation
+Summary: The docs web application for Apache Tomcat
+Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
+Requires: jakarta-taglibs-standard
+
+%description webapp-docs
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+The docs web application for Apache Tomcat.
+
+%package log4j
+Group: System/Servers
+Summary: Log4j support for Apache Tomcat
+Requires: apache-log4j
+Requires: jakarta-commons-logging
+
+%description log4j
+Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.
+The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
+
+This package contains Log4j support for Apache Tomcat
+
+%prep
+%setup -q -c -T -a 0
+find . -type f \( -name "*.bat" -o -name "*.jar" -o -name "*.class" -o -name Thumbs.db -o -name "*.war" -o -name "*.gz" -o -name "*.zip" \) | xargs -t rm
+
+pushd %{pkg_dir}/
+
+%patch0 -p0
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
+%patch5 -p0
+%patch6 -p0
+%patch7 -p0
+
+ mkdir -p tomcat-native-%{native_ver}/ output/extras-src-jars
+ mkdir -p tomcat7-deps/dbcp/
+ ln -sf %{_javadir}/tomcat7/tomcat-dbcp.jar tomcat7-deps/dbcp/tomcat-dbcp.jar
+ ln -sf $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar
+ ln -sf $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar
+%if %with_embed
+ mkdir -p output/extras/logging
+ (
+ cd output/extras/logging
+ tar -xf %{SOURCE9}
+ )
+%endif
+ cp %{SOURCE10} build.properties
+popd
+
+%build
+
+export CLASSPATH=$(build-classpath wsdl4j ant/ant-trax)
+pushd apache-tomcat-%{version}-src
+ ant -Dbase.path="." \
+ -Dbuild.compiler="modern" \
+ -Dcommons-collections.jar="$(build-classpath commons-collections)" \
+ -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \
+ -Djasper-jdt.jar="$(build-classpath eclipse-ecj)" \
+ -Dcheckstyle.jar="$(build-classpath checkstyle)" \
+ -Djdt.jar="$(build-classpath eclipse-ecj)" \
+ -Djson-lib.jar="$(build-classpath json)" \
+ -Djaxrpc-lib.jar="$(build-classpath geronimo/jaxrpc-1.1-api)" \
+ -Dlogkit.jar="$(build-classpath excalibur/avalon-logkit)" \
+ -Dlog4j.jar="$(build-classpath log4j)" \
+ -Davalon-framework.jar="$(build-classpath excalibur/avalon-framework)" \
+ -Djunit.jar="$(build-classpath junit)" \
+ -Dversion="%{version}" \
+ -Dno.build.dbcp=true \
+ -Dtrydownload.run=false \
+ -Dversion.build="%{version_build}"
+
+ ant dist-prepare
+%if %with_embed
+ CLASSPATH=$CLASSPATH:$(build-classpath excalibur/avalon-framework excalibur/avalon-logkit log4j commons-logging)
+ CLASSPATH=$CLASSPATH::%{pkg_dir}/output/build/lib/jsp-api.jar:%{pkg_dir}/output/build/lib/servlet-api.jar
+ ant -Dservletapi.jar=%{pkg_dir}/output/build/lib/servlet-api.jar -Dlog4j12.present=true embed-jars embed-extras
+%endif
+ ant dist-source
+ ant javadoc
+
+ rm output/build/lib/*ecj.jar
+ rm -rf output/build/bin/tomcat-native.tar.gz output/build/bin/commons-daemon.jar
+# this file is in apache-tomcat-dbcp package
+ rm output/build/lib/tomcat-dbcp.jar
+popd
+pushd apache-tomcat-%{version}-src/output
+ pushd dist/src/webapps/docs/appdev/sample/src
+ mkdir -p ../web/WEB-INF/classes
+ javac -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java
+ pushd ../web
+ jar cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war *
+ popd
+ popd
+popd
+
+%install
+[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
+install -d -m 0755 %{buildroot}%{_bindir}
+install -d -m 0755 %{buildroot}%{_sbindir}
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{tom_name}
+install -d -m 0755 %{buildroot}%{_javadocdir}/elapi7
+install -d -m 0755 %{buildroot}%{_javadocdir}/jspapi7
+install -d -m 0755 %{buildroot}%{_javadocdir}/servletapi7
+install -d -m 0755 %{buildroot}%{_initrddir}
+install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
+install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
+install -d -m 0755 %{buildroot}%{appdir}
+install -d -m 0755 %{buildroot}%{bindir}
+install -d -m 0755 %{buildroot}%{confdir}
+install -d -m 0755 %{buildroot}%{confdir}/Catalina/localhost
+install -d -m 0755 %{buildroot}%{libdir}
+install -d -m 0755 %{buildroot}%{logdir}
+install -d -m 0755 %{buildroot}%{homedir}
+install -d -m 0755 %{buildroot}%{tempdir}
+install -d -m 0755 %{buildroot}%{workdir}
+
+cp -a %{SOURCE11} %{buildroot}%{confdir}/Catalina/localhost/host-manager.xml
+cp -a %{SOURCE12} %{buildroot}%{confdir}/Catalina/localhost/examples.xml
+cp -a %{SOURCE13} %{buildroot}%{confdir}/Catalina/localhost/docs.xml
+cp -a %{SOURCE14} %{buildroot}%{confdir}/Catalina/localhost/ROOT.xml
+cp -a %{SOURCE15} %{buildroot}%{confdir}/Catalina/localhost/manager.xml
+
+pushd %{pkg_dir}/output/build
+ ln -sf $(build-classpath eclipse-ecj) lib/ecj.jar
+ ln -sf %{_javadir}/commons-collections-tomcat5.jar lib/commons-collections-tomcat5.jar
+ ln -sf %{_javadir}/dbcp/commons-dbcp.jar lib/apache-commons-dbcp.jar
+ ln -sf %{_javadir}/pool/commons-pool.jar lib/apache-commons-pool.jar
+ ln -sf $(build-classpath apache-commons-daemon) lib/
+ build-jar-repository -p webapps/examples/WEB-INF/lib taglibs-core.jar taglibs-standard.jar 2>&1
+ cp -a bin/*.{jar,xml} %{buildroot}%{bindir}
+ ln -sf $(build-classpath apache-commons-daemon) %{buildroot}%{bindir}/commons-daemon.jar
+ cp -a %{SOURCE8} conf/log4j.properties
+ cp -a conf/*.{policy,properties,xml} %{buildroot}%{confdir}
+ cp -a lib/*.jar %{buildroot}%{libdir}
+ cp -a webapps/* %{buildroot}%{appdir}
+popd
+
+%if %with_embed
+pushd %{pkg_dir}/output/
+ cp -a extras/catalina-jmx-remote.jar %{buildroot}%{libdir}
+ cp -a extras/catalina-ws.jar %{buildroot}%{libdir}
+ cp -a extras/tomcat-juli-adapters.jar %{buildroot}%{libdir}/tomcat-extras-juli-adapters.jar
+ cp -a extras/tomcat-juli.jar %{buildroot}%{libdir}/tomcat-extras-juli.jar
+ cp -a embed/*.jar %{buildroot}%{libdir}
+popd
+%endif
+
+pushd %{pkg_dir}/output/dist/webapps
+ cp -a docs/api/* %{buildroot}%{_javadocdir}/%{tom_name}
+ cp -a docs/elapi/* %{buildroot}%{_javadocdir}/elapi7
+ cp -a docs/jspapi/* %{buildroot}%{_javadocdir}/jspapi7
+ cp -a docs/servletapi/* %{buildroot}%{_javadocdir}/servletapi7
+popd
+ sed -e "s|\@\@\@JAVAHOME\@\@\@|%{javahome}|g" \
+ -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
+ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
+ > %{buildroot}%{confdir}/%{tom_name}.conf
+ sed -e "s|\@\@\@JAVAHOME\@\@\@|%{javahome}|g" \
+ -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
+ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \
+ > %{buildroot}%{_sysconfdir}/sysconfig/%{tom_name}
+ install -m 0644 %{SOURCE2} \
+ %{buildroot}%{_initrddir}/%{tom_name}
+ install -m 0644 %{SOURCE4} \
+ %{buildroot}%{_sbindir}/%{tom_name}
+ ln -s %{tom_name} %{buildroot}%{_sbindir}/d%{tom_name}
+ sed -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
+ > %{buildroot}%{_sysconfdir}/logrotate.d/%{tom_name}
+ sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
+ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
+ > %{buildroot}%{_bindir}/%{tom_name}-digest
+ sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
+ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
+ > %{buildroot}%{_bindir}/%{tom_name}-tool-wrapper
+
+pushd %{buildroot}%{_javadir}
+ mv %{tom_name}/jsp-api.jar %{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar
+ mv %{tom_name}/servlet-api.jar \
+ %{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar
+ mv %{tom_name}/el-api.jar %{tom_name}-el-%{el_api_version}-api-%{version}.jar
+ ln -s %{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar \
+ %{tom_name}-jsp-%{jsp_api_version}-api.jar
+ ln -s %{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar \
+ jspapi7-%{version}.jar
+ ln -s %{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar \
+ jspapi7.jar
+ ln -s %{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar \
+ %{tom_name}-servlet-%{servlet_api_version}-api.jar
+ ln -s %{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar \
+ servletapi7-%{version}.jar
+ ln -s %{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar \
+ servletapi7.jar
+ ln -s %{tom_name}-el-%{el_api_version}-api-%{version}.jar \
+ %{tom_name}-el-%{el_api_version}-api.jar
+ ln -s %{tom_name}-el-%{el_api_version}-api-%{version}.jar \
+ elapi7-%{version}.jar
+ ln -s %{tom_name}-el-%{el_api_version}-api-%{version}.jar \
+ elapi7.jar
+popd
+
+pushd %{buildroot}%{libdir}
+ for i in *.jar; do
+ j="$(echo $i | sed -e 's,\.jar$,,')"
+ mv ${j}.jar ${j}-%{version}.jar
+ ln -s ${j}-%{version}.jar ${j}.jar
+ done
+ ln -s ../%{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar .
+ ln -s ../%{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar .
+ ln -s ../%{tom_name}-el-%{el_api_version}-api-%{version}.jar .
+ cp -p $(build-classpath commons-collections) .
+ cp -p $(build-classpath log4j) .
+ ln -sf log4j.jar log4j-%{version}.jar
+ ln -sf $(build-classpath dbcp/commons-dbcp) commons-dbcp.jar
+# ln -sf $(build-classpath pool/commons-pool) commons-pool.jar
+ ln -sf $(build-classpath commons-collections-tomcat5) .
+ ln -sf $(build-classpath checkstyle-all) checkstyle.jar
+# ln -sf $(build-classpath dbcp/commons-dbcp) apache-commons-dbcp.jar
+ ln -sf $(build-classpath eclipse-ecj) eclipse-ecj.jar
+ ln -sf $(build-classpath eclipse-ecj) jasper-jdt.jar
+ ln -s ../../tomcat7/bin/tomcat-juli.jar tomcat-juli-%{version}.jar
+ ln -s ../../tomcat7/bin/tomcat-juli.jar tomcat-juli.jar
+ ln -sf $(build-classpath apache-commons-daemon) commons-daemon.jar
+%if %with_embed
+ ln -sf $(build-classpath geronimo/jaxrpc-1.1-api) jaxrpc.jar
+ ln -sf $(build-classpath wsdl4j) wsdl4j.jar
+ ln -sf $(build-classpath wsdl4j) jsr109.jar
+%endif
+popd
+
+pushd %{buildroot}%{homedir}
+ ln -s %{appdir} webapps
+ ln -s %{confdir} conf
+ ln -s %{libdir} lib
+ ln -s %{logdir} logs
+ ln -s %{tempdir} temp
+ ln -s %{workdir} work
+popd
+
+mkdir -p %{buildroot}%{appdir}/sample
+pushd %{buildroot}%{appdir}/sample
+ jar xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
+popd
+rm %{buildroot}%{appdir}/docs/appdev/sample/sample.war
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+
+# for backwards compatibility
+%add_to_maven_depmap javax.servlet servlet-api %{servlet_api_version} JPP %{tom_name}-servlet-%{servlet_api_version}-api
+%add_to_maven_depmap org.apache.tomcat tomcat-servlet-api %{version} JPP %{tom_name}-servlet-%{servlet_api_version}-api
+mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-servlet-api
+
+pushd %{pkg_dir}/output/dist/src/res/maven
+# this file is in apache-tomcat-dbcp package
+ rm -rf tomcat-dbcp.pom
+
+ for pom in *.pom; do
+ sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
+ done
+
+ for pom in tomcat-annotations-api.pom \
+ tomcat-jasper-el.pom \
+ tomcat-jasper.pom \
+ tomcat-catalina-ant.pom \
+ tomcat-catalina-ha.pom \
+ tomcat-catalina-jmx-remote.pom \
+ tomcat-catalina-ws.pom \
+ tomcat-catalina.pom; do
+ artifact=`echo $pom | sed -e s:^tomcat-::g`
+ cp -a $pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-$artifact
+ %add_to_maven_depmap org.apache.tomcat $pom %{version} JPP/%{tom_name} $artifact
+ done
+ cp -a tomcat-tribes.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-catalina-tribes.pom
+ %add_to_maven_depmap org.apache.tomcat tomcat-catalina %{version} JPP/%{tom_name} catalina-tribes
+
+ cp -a tomcat-servlet-api.pom %{buildroot}%{_mavenpomdir}/JPP-%{tom_name}-servlet-%{servlet_api_version}-api.pom
+ cp -a tomcat-jsp-api.pom %{buildroot}%{_mavenpomdir}/JPP-%{tom_name}-jsp-%{jsp_api_version}-api.pom
+ %add_to_maven_depmap javax.servlet.jsp jsp-api %{jsp_api_version} JPP %{tom_name}-jsp-%{jsp_api_version}-api
+ %add_to_maven_depmap org.apache.tomcat jsp-api %{jsp_api_version} JPP %{tom_name}-jsp-%{jsp_api_version}-api
+ %add_to_maven_depmap org.apache.tomcat tomcat-jsp-api %{version} JPP %{tom_name}-jsp-%{jsp_api_version}-api
+ cp -a tomcat-el-api.pom %{buildroot}%{_mavenpomdir}/JPP-%{tom_name}-el-%{el_api_version}-api.pom
+ %add_to_maven_depmap javax.el el-api %{el_api_version} JPP %{tom_name}-el-%{el_api_version}-api
+ %add_to_maven_depmap org.apache.tomcat el-api %{el_api_version} JPP %{tom_name}-el-%{el_api_version}-api
+ %add_to_maven_depmap org.apache.tomcat tomcat-el-api %{version} JPP %{tom_name}-el-%{el_api_version}-api
+
+ for pom in tomcat-api.pom \
+ tomcat-coyote.pom \
+ tomcat-i18n-es.pom \
+ tomcat-i18n-fr.pom \
+ tomcat-i18n-ja.pom \
+ tomcat-juli.pom \
+ tomcat-util.pom; do
+ cp -a $pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-$pom
+ artifact=`basename $pom .pom`
+ %add_to_maven_depmap org.apache.tomcat $artifact %{version} JPP/%{tom_name} $artifact
+ done
+
+ cp -a tomcat-tribes.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-catalina-tribes.pom
+ %add_to_maven_depmap org.apache.tomcat tribes %{version} JPP/%{tom_name} catalina-tribes
+ %add_to_maven_depmap org.apache.tomcat tomcat-tribes %{version} JPP/%{tom_name} catalina-tribes
+%if %with_embed
+ cp -a tomcat-embed-logging-log4j.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-logging-log4j.pom
+ %add_to_maven_depmap org.apache.tomcat.embed tomcat-embed-logging-log4j %{version} JPP/%{tom_name} tomcat-embed-logging-log4j
+ cp -a tomcat-embed-core.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-core.pom
+ %add_to_maven_depmap org.apache.tomcat.embed tomcat-embed-core %{version} JPP/%{tom_name} tomcat-embed-core
+ cp -a tomcat-embed-jasper.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-jasper.pom
+ %add_to_maven_depmap org.apache.tomcat.embed tomcat-embed-jasper %{version} JPP/%{tom_name} tomcat-embed-jasper
+ cp -a tomcat-embed-logging-juli.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-logging-juli.pom
+ %add_to_maven_depmap org.apache.tomcat.embed tomcat-embed-logging-juli %{version} JPP/%{tom_name} tomcat-embed-logging-juli
+ cp -a tomcat-extras-juli-adapters.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-tomcat-extras-juli-adapters.pom
+ %add_to_maven_depmap org.apache.tomcat.extras tomcat-extras-juli-adapters %{version} JPP%{tom_name} tomcat-extras-juli-adapters
+ cp -a tomcat-extras-juli.pom %{buildroot}%{_mavenpomdir}/JPP.%{tom_name}-tomcat-extras-juli.pom
+ %add_to_maven_depmap org.apache.tomcat.extras tomcat-extras-juli %{version} JPP/%{tom_name} tomcat-extras-juli
+%endif
+popd
+
+%clean
+[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
+
+%pre
+%{_sbindir}/groupadd -g 91 -r tomcat 2>/dev/null || :
+%{_sbindir}/useradd -c "Apache Tomcat" -u 91 -g tomcat -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || :
+
+%post
+/sbin/chkconfig --add %{tom_name}
+%update_maven_depmap
+
+%post jsp-%{jsp_api_version}-api
+%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp %{_javadir}/%{tom_name}-jsp-%{jsp_api_version}-api.jar 20700
+
+%post servlet-%{servlet_api_version}-api
+%{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet %{_javadir}/%{tom_name}-servlet-%{servlet_api_version}-api.jar 20700
+
+%post el-%{el_api_version}-api
+%{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec %{_javadir}/%{tom_name}-el-%{el_api_version}-api.jar 20700
+
+%preun
+%{__rm} -rf %{workdir}/* %{tempdir}/*
+if [ "$1" = "0" ]; then
+ %{_initrddir}/%{tom_name} stop >/dev/null 2>&1
+ /sbin/chkconfig --del %{tom_name}
+fi
+
+%postun
+%update_maven_depmap
+
+%postun jsp-%{jsp_api_version}-api
+if [ "$1" = "0" ]; then
+ %{_sbindir}/update-alternatives --remove jsp %{_javadir}/%{tom_name}-jsp-%{jsp_api_version}-api.jar
+fi
+
+%postun servlet-%{servlet_api_version}-api
+if [ "$1" = "0" ]; then
+ %{_sbindir}/update-alternatives --remove servlet %{_javadir}/%{tom_name}-servlet-%{servlet_api_version}-api.jar
+fi
+
+%postun el-%{el_api_version}-api
+if [ "$1" = "0" ]; then
+ %{_sbindir}/update-alternatives --remove elspec %{_javadir}/%{tom_name}-el-%{el_api_version}-api.jar
+fi
+
+%files
+%defattr(-,root,root)
+%attr(0755,root,root) %{_initrddir}/tomcat7
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/tomcat7
+%config(noreplace) %{_sysconfdir}/sysconfig/tomcat7
+%attr(0775,root,tomcat) %dir %{logdir}
+%attr(0775,root,tomcat) %dir %{confdir}
+%attr(0775,root,tomcat) %dir %{confdir}/Catalina/
+%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/catalina.policy
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/catalina.properties
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/context.xml
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/logging.properties
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/server.xml
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/tomcat-users.xml
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/tomcat7.conf
+%config(noreplace) %attr(660,root,tomcat) %verify(not md5 mtime size) %{confdir}/web.xml
+%attr(0775,root,tomcat) %dir %{cachedir}
+%attr(0775,root,tomcat) %dir %{tempdir}
+%attr(0775,root,tomcat) %dir %{workdir}
+%attr(0755,root,root) %{_bindir}/tomcat7-digest
+%attr(0755,root,root) %{_bindir}/tomcat7-tool-wrapper
+%attr(0755,root,root) %{_sbindir}/dtomcat7
+%attr(0755,root,root) %{_sbindir}/tomcat7
+%{bindir}/bootstrap.jar
+%{bindir}/commons-daemon.jar
+%{bindir}/catalina-tasks.xml
+%{bindir}/tomcat-juli.jar
+%{libdir}/tomcat-juli-%{version}.jar
+%{libdir}/tomcat-juli.jar
+%{homedir}/conf
+%{homedir}/lib
+%{homedir}/logs
+%{homedir}/temp
+%{homedir}/webapps
+%{homedir}/work
+%{_mavendepmapfragdir}/*
+%doc apache-tomcat-%{version}-src/{LICENSE,NOTICE,RELEASE*}
+
+%files admin
+%defattr(-,root,root)
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{confdir}/Catalina/localhost/*manager.xml
+%{appdir}/host-manager
+%{appdir}/manager
+
+%files webapps
+%defattr(-,root,root)
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{confdir}/Catalina/localhost/examples.xml
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{confdir}/Catalina/localhost/ROOT.xml
+%{appdir}/ROOT
+%{appdir}/examples
+%{appdir}/sample
+
+%files el-%{el_api_version}-api
+%defattr(-,root,root)
+%{libdir}/%{tom_name}-el-%{el_api_version}-api-%{version}.jar
+%{_javadir}/%{tom_name}-el-%{el_api_version}-api-%{version}.jar
+%{_javadir}/%{tom_name}-el-%{el_api_version}-api.jar
+%{_javadir}/elapi7-%{version}.jar
+%{_javadir}/elapi7.jar
+%{_mavenpomdir}/JPP-tomcat7-el-%{el_api_version}-api.pom
+
+%files servlet-%{servlet_api_version}-api
+%defattr(-,root,root)
+%{libdir}/%{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar
+%{_javadir}/%{tom_name}-servlet-%{servlet_api_version}-api-%{version}.jar
+%{_javadir}/%{tom_name}-servlet-%{servlet_api_version}-api.jar
+%{_javadir}/servletapi7-%{version}.jar
+%{_javadir}/servletapi7.jar
+%{_mavenpomdir}/JPP-tomcat7-servlet-%{servlet_api_version}-api.pom
+
+%files jsp-%{jsp_api_version}-api
+%defattr(-,root,root)
+%{libdir}/%{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar
+%{_javadir}/%{tom_name}-jsp-%{jsp_api_version}-api-%{version}.jar
+%{_javadir}/%{tom_name}-jsp-%{jsp_api_version}-api.jar
+%{_javadir}/jspapi7-%{version}.jar
+%{_javadir}/jspapi7.jar
+%{_mavenpomdir}/JPP-tomcat7-jsp-%{jsp_api_version}-api.pom
+
+%files javadoc
+%defattr(-,root,root)
+%{_javadocdir}/%{tom_name}
+
+%files el-%{el_api_version}-api-javadoc
+%defattr(-,root,root)
+%{_javadocdir}/elapi7
+
+%files jsp-%{jsp_api_version}-api-javadoc
+%defattr(-,root,root)
+%{_javadocdir}/jspapi7
+
+%files servlet-%{servlet_api_version}-api-javadoc
+%defattr(-,root,root)
+%{_javadocdir}/servletapi7
+
+%files -n lib%{tom_name}
+%defattr(-,root,root)
+%{libdir}/annotations-api-%{version}.jar
+%{libdir}/annotations-api.jar
+%{libdir}/catalina-%{version}.jar
+%{libdir}/catalina-ant-%{version}.jar
+%{libdir}/catalina-ant.jar
+%{libdir}/catalina-ha-%{version}.jar
+%{libdir}/catalina-ha.jar
+%{libdir}/catalina-tribes-%{version}.jar
+%{libdir}/catalina-tribes.jar
+%{libdir}/catalina.jar
+%{libdir}/catalina-jmx-remote-%{version}.jar
+%{libdir}/catalina-jmx-remote.jar
+%{libdir}/catalina-ws-%{version}.jar
+%{libdir}/catalina-ws.jar
+%{libdir}/tomcat-api-%{version}.jar
+%{libdir}/tomcat-api.jar
+%{libdir}/tomcat-util-%{version}.jar
+%{libdir}/tomcat-util.jar
+%{libdir}/jasper-%{version}.jar
+%{libdir}/jasper.jar
+%{libdir}/jasper-el-%{version}.jar
+%{libdir}/jasper-el.jar
+%{libdir}/tomcat-coyote-%{version}.jar
+%{libdir}/tomcat-coyote.jar
+%{libdir}/tomcat-i18n-es-%{version}.jar
+%{libdir}/tomcat-i18n-es.jar
+%{libdir}/tomcat-i18n-fr-%{version}.jar
+%{libdir}/tomcat-i18n-fr.jar
+%{libdir}/tomcat-i18n-ja-%{version}.jar
+%{libdir}/tomcat-i18n-ja.jar
+%{libdir}/checkstyle.jar
+%{libdir}/apache-commons-daemon-%{version}.jar
+%{libdir}/apache-commons-daemon.jar
+%{libdir}/apache-commons-dbcp-%{version}.jar
+%{libdir}/apache-commons-dbcp.jar
+%{libdir}/apache-commons-pool-%{version}.jar
+%{libdir}/apache-commons-pool.jar
+%{libdir}/commons-collections-tomcat5-%{version}.jar
+%{libdir}/commons-collections-tomcat5.jar
+%{libdir}/commons-collections.jar
+%{libdir}/commons-daemon.jar
+%{libdir}/commons-dbcp.jar
+%{libdir}/ecj-%{version}.jar
+%{libdir}/ecj.jar
+%{libdir}/eclipse-ecj-%{version}.jar
+%{libdir}/eclipse-ecj.jar
+%{libdir}/jasper-jdt.jar
+%{_datadir}/java/%{tom_name}/tomcat-jdbc-%{version}.jar
+%{_datadir}/java/%{tom_name}/tomcat-jdbc.jar
+%{_mavenpomdir}/JPP.%{tom_name}-annotations-api.pom
+%{_mavenpomdir}/JPP.%{tom_name}-catalina-ant.pom
+%{_mavenpomdir}/JPP.%{tom_name}-catalina-ha.pom
+%{_mavenpomdir}/JPP.%{tom_name}-catalina-jmx-remote.pom
+%{_mavenpomdir}/JPP.%{tom_name}-catalina-tribes.pom
+%{_mavenpomdir}/JPP.%{tom_name}-catalina-ws.pom
+%{_mavenpomdir}/JPP.%{tom_name}-catalina.pom
+%{_mavenpomdir}/JPP.%{tom_name}-jasper-el.pom
+%{_mavenpomdir}/JPP.%{tom_name}-jasper.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-api.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-coyote.pom
+%if %with_embed
+%{libdir}/tomcat-embed-core-%{version}.jar
+%{libdir}/tomcat-embed-core.jar
+%{libdir}/tomcat-embed-jasper-%{version}.jar
+%{libdir}/tomcat-embed-jasper.jar
+%{libdir}/tomcat-embed-logging-juli-%{version}.jar
+%{libdir}/tomcat-embed-logging-juli.jar
+%{libdir}/tomcat-embed-logging-log4j-%{version}.jar
+%{libdir}/tomcat-embed-logging-log4j.jar
+%{libdir}/tomcat-extras-juli-%{version}.jar
+%{libdir}/tomcat-extras-juli.jar
+%{libdir}/tomcat-extras-juli-adapters-%{version}.jar
+%{libdir}/tomcat-extras-juli-adapters.jar
+%{libdir}/jaxrpc.jar
+%{libdir}/jsr109.jar
+%{libdir}/wsdl4j.jar
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-core.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-jasper.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-logging-juli.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-embed-logging-log4j.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-extras-juli-adapters.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-extras-juli.pom
+%endif
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-i18n-es.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-i18n-fr.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-i18n-ja.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-juli.pom
+%{_mavenpomdir}/JPP.%{tom_name}-tomcat-util.pom
+
+%files webapp-docs
+%defattr(0644,root,root,0755)
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{confdir}/Catalina/localhost/docs.xml
+%{appdir}/docs
+
+%files log4j
+%defattr(0644,root,tomcat,0775)
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{confdir}/log4j.properties
+%{libdir}/log4j-%{version}.jar
+%{libdir}/log4j.jar
+
+%changelog
+* Fri Aug 26 2011 Automatic Build System 7.0.20-1mamba
+- update to 7.0.20
+
+* Tue Mar 01 2011 gil 7.0.9-1mamba
+- update to 7.0.9
+
+* Sun Feb 27 2011 gil 7.0.8-1mamba
+- update to 7.0.8