blob: 9bf286cd0f8d9610a24ef875fc0cc74367ec71a0 (
plain)
1 # Description: Java Servlet container (binary version)
2 # URL: http://jakarta.apache.org/tomcat/index.html
3 # Maintainer: Simone Rota, sip at crux dot nu
4 # Packager: Simone Rota, sip at crux dot nu
5 # Depends on: jdk
6
7 name=apache-tomcat
8 version=5.5.20
9 release=1
10 source=(http://www.eu.apache.org/dist/tomcat/tomcat-5/v$version/bin/$name-$version.tar.gz \
11 tomcat)
12
13 build() {
14
15 mkdir -p $PKG/usr/lib/tomcat
16 cp -r $name-$version/* $PKG/usr/lib/tomcat
17 rm -r $PKG/usr/lib/tomcat/webapps/jsp-examples
18 rm -r $PKG/usr/lib/tomcat/webapps/servlets-examples/
19 rm -r $PKG/usr/lib/tomcat/webapps/tomcat-docs
20 rm $PKG/usr/lib/tomcat/{RUNNING.txt,LICENSE,RELEASE-NOTES}
21 find $PKG -name *.bat|xargs rm -f
22 find $PKG -name *.exe|xargs rm -f
23 mkdir -p $PKG/etc/rc.d
24 install -m 755 tomcat $PKG/etc/rc.d
25
26 # Adjust for non-root setup
27 chown tomcat.tomcat $PKG/usr/lib/tomcat/logs
28 chown tomcat.tomcat $PKG/usr/lib/tomcat/temp
29
30 for f in $PKG/usr/lib/tomcat/conf/*.* $PKG/usr/lib/tomcat/conf/Catalina/localhost/*; do
31 chown root.tomcat $f
32 chmod 640 $f
33 done
34
35 cat << EOF > $PKG/usr/lib/tomcat/bin/setenv.sh
36 #!/bin/sh
37 # Setup envirnoment variables for tomcat
38 export JAVA_HOME=/usr/lib/java
39 EOF
40
41 chmod 755 $PKG/usr/lib/tomcat/bin/setenv.sh
42 }
|