79 lines
2.3 KiB
Bash
79 lines
2.3 KiB
Bash
# Template file for 'apache-tomcat'
|
|
pkgname=apache-tomcat
|
|
version=9.0.38
|
|
revision=2
|
|
wrksrc="${pkgname}-${version}-src"
|
|
hostmakedepends="openjdk8 apache-ant"
|
|
depends="virtual?java-runtime"
|
|
short_desc="Open source implementation of the Java Servlet"
|
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
|
license="Apache-2.0"
|
|
homepage="https://tomcat.apache.org"
|
|
distfiles="http://mirrors.gigenet.com/apache/tomcat/tomcat-9/v${version}/src/${pkgname}-${version}-src.tar.gz"
|
|
checksum=72de3de15d6ddced50c6c78958e6369c393c8500dfa819207d64662c26e0c9c2
|
|
|
|
system_accounts="tomcat"
|
|
make_dirs="/usr/share/${pkgname}/webapps 0755 tomcat tomcat
|
|
/usr/share/${pkgname}/conf 0755 tomcat tomcat
|
|
/usr/share/${pkgname}/logs 0755 tomcat tomcat
|
|
/usr/share/${pkgname}/temp 0755 tomcat tomcat"
|
|
|
|
do_build() {
|
|
# Meanwhile commons-daemon was updated to 1.2.3
|
|
local _cd_version="1.2.3"
|
|
local _cd_mirror="http://mirrors.ocf.berkeley.edu/apache/commons/daemon/binaries/"
|
|
local _cd_sha512="0d7ced8f5d6fd3e8781146ee47c37046c6ccd2f364138f89d137eea5f0255e1b2afae5faf7005164c077087cb08203fd44478d5c14c57c7df449feb324443447"
|
|
vsed -i build.properties.default \
|
|
-e "s;\(commons-daemon.version\)=1.2.2;\1=${_cd_version};" \
|
|
-e "s;\(base-apache.loc.1\)=.*;\1=${_cd_mirror};" \
|
|
-e "s;\(commons-daemon.bin.checksum.value\)=.*;\1=${_cd_sha512};"
|
|
ant
|
|
}
|
|
|
|
post_build() {
|
|
rm output/build/bin/*.bat
|
|
rm output/build/bin/{startup.sh,shutdown.sh}
|
|
}
|
|
|
|
do_install() {
|
|
mkdir -p ${DESTDIR}/usr/share/${pkgname}
|
|
cp -r output/build/* ${DESTDIR}/usr/share/${pkgname}
|
|
|
|
vsv apache-tomcat
|
|
}
|
|
|
|
post_install() {
|
|
rm -r ${DESTDIR}/usr/share/${pkgname}/webapps/ROOT
|
|
}
|
|
|
|
apache-tomcat-doc_package() {
|
|
short_desc+=" - Documentation"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/share/${sourcepkg}/webapps/docs
|
|
}
|
|
}
|
|
|
|
apache-tomcat-examples_package() {
|
|
short_desc+=" - Examples"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/share/${sourcepkg}/webapps/examples
|
|
}
|
|
}
|
|
|
|
apache-tomcat-manager_package() {
|
|
short_desc+=" - Manager"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/share/${sourcepkg}/webapps/manager
|
|
}
|
|
}
|
|
|
|
apache-tomcat-host-manager_package() {
|
|
short_desc+=" - Host Manager"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/share/${sourcepkg}/webapps/host-manager
|
|
}
|
|
}
|