Browse Source

New package: tomcat very crude package, experimental version. Some thing still open like relocation of "work" directory to something like %{l_prefix}/var/tomcat3.2/run

Ralf S. Engelschall 24 years ago
parent
commit
3fc4d2b5ea
3 changed files with 161 additions and 0 deletions
  1. 15 0
      tomcat/rc.tomcat
  2. 51 0
      tomcat/tomcat.patch
  3. 95 0
      tomcat/tomcat.spec

+ 15 - 0
tomcat/rc.tomcat

@@ -0,0 +1,15 @@
+#!@l_prefix@/lib/rpm/bash @l_prefix@/etc/rc
+##
+##  rc.tomcat3.2 -- Run-Commands for Tomcat 3.2
+##
+
+%env
+    TOMCAT_HOME="@l_prefix@/libexec/tomcat3.2"
+    export TOMCAT_HOME
+
+%start -u root
+    @l_prefix@/libexec/tomcat3.2/bin/tomcat.sh start
+
+%stop -u root
+    @l_prefix@/libexec/tomcat3.2/bin/tomcat.sh stop
+

+ 51 - 0
tomcat/tomcat.patch

@@ -0,0 +1,51 @@
+--- conf/server.xml	Fri Dec 21 15:20:07 2001
++++ conf/server.xml	Fri Dec 21 15:22:08 2001
+@@ -68,14 +68,15 @@
+     -->
+     <Logger name="tc_log" 
+             verbosityLevel = "INFORMATION" 
++            path="/cw/var/tomcat3.2/log/tomcat.log"
+     />
+ 
+     <Logger name="servlet_log" 
+-            path="logs/servlet.log"
++            path="/cw/var/tomcat3.2/log/servlet.log"
+     />
+ 
+     <Logger name="JASPER_LOG" 
+-	    path="logs/jasper.log"
++	    path="/cw/var/tomcat3.2/log/jasper.log"
+             verbosityLevel = "INFORMATION" />
+ 
+     <!-- You can add a "home" attribute to represent the "base" for 
+@@ -281,12 +282,14 @@
+              in the webapps dir and read/write in the workdir.
+          -->
+ 
++        <!-- FIXME -->
+         <Context path="/examples" 
+                  docBase="webapps/examples" 
+                  crossContext="false"
+                  debug="0" 
+                  reloadable="true" > 
+         </Context>
++        <!-- FIXME -->
+ 
+         <!-- Admin context will use tomcat.core to add/remove/get info about
+              the webapplications and tomcat internals. 
+@@ -295,7 +298,6 @@
+              servlets are visible.
+ 
+              If you change this to true, make sure you set a password.
+-          -->
+         <Context path="/admin" 
+                  docBase="webapps/admin" 
+                  crossContext="true"
+@@ -303,6 +305,7 @@
+                  reloadable="true" 
+                  trusted="false" > 
+         </Context>
++          -->
+ 
+         <!-- Virtual host example - 
+              In "127.0.0.1" virtual host we'll reverse "/" and 

+ 95 - 0
tomcat/tomcat.spec

@@ -0,0 +1,95 @@
+##
+##  tomcat3.2.spec -- OpenPKG RPM Specification
+##  Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
+##  Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
+##
+##  Permission to use, copy, modify, and distribute this software for
+##  any purpose with or without fee is hereby granted, provided that
+##  the above copyright notice and this permission notice appear in all
+##  copies.
+##
+##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+##  SUCH DAMAGE. 
+##  
+
+#   package information
+Name:         tomcat3.2
+Summary:      Apache Jakarta Tomcat
+URL:          http://jakarta.apache.org/
+Vendor:       Apache Software Foundation
+Packager:     The OpenPKG Project
+Distribution: OpenPKG [EXP]
+Group:        Web
+License:      Apache Software License 1.1
+Version:      3.2.4
+Release:      20011220
+
+#   list of sources
+Source0:      http://jakarta.apache.org/builds/jakarta-tomcat/release/v%{version}/bin/jakarta-tomcat-%{version}.tar.gz
+Source1:      rc.tomcat3.2
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20011107, tar, patch
+PreReq:       OpenPKG, openpkg >= 20011107, JDK
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    Apache Jakarta Tomcat %{version} is a complete rewrite of Jserv and
+    supplies the functionality of both a Servlet API 2.2 and a JSP 1.1
+    compliant container.
+
+%prep
+    %setup -q -n jakarta-tomcat-%{version}
+
+%build
+
+%install
+    rm -rf $RPM_BUILD_ROOT
+
+    #   create installation tree
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat3.2 \
+        $RPM_BUILD_ROOT%{l_prefix}/share/tomcat3.2/doc \
+        $RPM_BUILD_ROOT%{l_prefix}/var/tomcat3.2/log
+
+    #   unpack vendor distribution and relocate to final location
+    %{l_prefix}/bin/tar -cf - --exclude lib/test \
+        bin/*.sh bin/ant bin/antRun conf lib src webapps \
+        | ( umask 022; cd $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat3.2/; \
+        %{l_prefix}/bin/tar -xf - )
+
+    #   patch vendor distribution
+    (   cd $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat3.2
+        %{l_rpmtool} subst 's;@l_prefix@;%{l_prefix};g' \
+            -- %{SOURCE tomcat3.2.patch}
+        %{l_prefix}/bin/patch -p0 < %{SOURCE tomcat3.2.patch}
+    )
+
+    #   make scripts executable
+    chmod 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat3.2/bin/*
+
+    #   install run-command script
+    %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
+        %{SOURCE rc.tomcat3.2} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+