43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
# Description: Java Servlet container (binary version)
|
|
# URL: http://jakarta.apache.org/tomcat/index.html
|
|
# Maintainer: Simone Rota, sip at crux dot nu
|
|
# Packager: Simone Rota, sip at crux dot nu
|
|
# Depends on: jdk
|
|
|
|
name=apache-tomcat
|
|
version=5.5.20
|
|
release=1
|
|
source=(http://www.eu.apache.org/dist/tomcat/tomcat-5/v$version/bin/$name-$version.tar.gz \
|
|
tomcat)
|
|
|
|
build() {
|
|
|
|
mkdir -p $PKG/usr/lib/tomcat
|
|
cp -r $name-$version/* $PKG/usr/lib/tomcat
|
|
rm -r $PKG/usr/lib/tomcat/webapps/jsp-examples
|
|
rm -r $PKG/usr/lib/tomcat/webapps/servlets-examples/
|
|
rm -r $PKG/usr/lib/tomcat/webapps/tomcat-docs
|
|
rm $PKG/usr/lib/tomcat/{RUNNING.txt,LICENSE,RELEASE-NOTES}
|
|
find $PKG -name *.bat|xargs rm -f
|
|
find $PKG -name *.exe|xargs rm -f
|
|
mkdir -p $PKG/etc/rc.d
|
|
install -m 755 tomcat $PKG/etc/rc.d
|
|
|
|
# Adjust for non-root setup
|
|
chown tomcat.tomcat $PKG/usr/lib/tomcat/logs
|
|
chown tomcat.tomcat $PKG/usr/lib/tomcat/temp
|
|
|
|
for f in $PKG/usr/lib/tomcat/conf/*.* $PKG/usr/lib/tomcat/conf/Catalina/localhost/*; do
|
|
chown root.tomcat $f
|
|
chmod 640 $f
|
|
done
|
|
|
|
cat << EOF > $PKG/usr/lib/tomcat/bin/setenv.sh
|
|
#!/bin/sh
|
|
# Setup envirnoment variables for tomcat
|
|
export JAVA_HOME=/usr/lib/java
|
|
EOF
|
|
|
|
chmod 755 $PKG/usr/lib/tomcat/bin/setenv.sh
|
|
}
|