PKGBUILDs/extra/tomcat/PKGBUILD

44 lines
1.5 KiB
Bash
Raw Normal View History

2009-10-10 02:23:22 +00:00
# $Id: PKGBUILD 19131 2008-11-15 00:29:22Z hugo $
# Maintainer: Hugo Doria <hugo@archlinux.org>
pkgname=tomcat
pkgver=5.5.27
pkgrel=2
arch=('i686' 'x86_64')
pkgdesc="Servlet container for Java Servlet and JavaServer Pages"
url="http://tomcat.apache.org/"
license=('Apache')
depends=('java-environment')
makedepends=('java-environment')
backup=(opt/tomcat/conf/server.xml opt/tomcat/conf/tomcat-users.xml \
etc/conf.d/tomcat)
install=tomcat.install
source=(http://archive.apache.org/dist/tomcat/tomcat-5/v${pkgver}/bin/apache-tomcat-${pkgver}.tar.gz \
tomcat tomcat.conf.d)
md5sums=('e576fed8ce66c32ee5295d5f7727b138' '4f171d32c2beb89bf988b7b4555e6cab'
'4da263803378b208144183c9f7df66a7')
build() {
# build jsvc
cd ${srcdir}/apache-tomcat-${pkgver}/bin
tar xzf jsvc.tar.gz
cd jsvc-src
sh configure --with-java=/usr/lib/jvm/java-1.6.0-openjdk
make || return 1
cp jsvc ..
# get rid of some cruft
cd ${srcdir}/apache-tomcat-${pkgver}
rm -f LICENSE NOTICE RELEASE-NOTES RUNNING.txt
rm -fr bin/*.exe bin/*.bat bin/*.tar.gz bin/jsvc-src
# install everything
mkdir -p ${pkgdir}/opt/tomcat
cp -R * ${pkgdir}/opt/tomcat
install -D -m755 ${srcdir}/tomcat ${pkgdir}/etc/rc.d/tomcat
install -D -m755 ${srcdir}/tomcat.conf.d ${pkgdir}/etc/conf.d/tomcat
chgrp -R 66 ${pkgdir}/opt/tomcat/conf ${pkgdir}/opt/tomcat/work
chmod 0660 ${pkgdir}/opt/tomcat/conf/{*.xml,*.policy,*.properties,/Catalina/localhost/*.xml}
chmod 775 ${pkgdir}/opt/tomcat/conf ${pkgdir}/opt/tomcat/work
}