From 55da4db7a3da8b449184dabb263572756b1c5dd2 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Mon, 18 Jul 2016 00:26:48 -0500 Subject: [PATCH] New package: apache-tomcat-8.5.4 --- srcpkgs/apache-tomcat-doc | 1 + srcpkgs/apache-tomcat-examples | 1 + srcpkgs/apache-tomcat-host-manager | 1 + srcpkgs/apache-tomcat-manager | 1 + srcpkgs/apache-tomcat/files/apache-tomcat/run | 7 ++ srcpkgs/apache-tomcat/template | 71 +++++++++++++++++++ 6 files changed, 82 insertions(+) create mode 120000 srcpkgs/apache-tomcat-doc create mode 120000 srcpkgs/apache-tomcat-examples create mode 120000 srcpkgs/apache-tomcat-host-manager create mode 120000 srcpkgs/apache-tomcat-manager create mode 100644 srcpkgs/apache-tomcat/files/apache-tomcat/run create mode 100644 srcpkgs/apache-tomcat/template diff --git a/srcpkgs/apache-tomcat-doc b/srcpkgs/apache-tomcat-doc new file mode 120000 index 00000000000..10175e17795 --- /dev/null +++ b/srcpkgs/apache-tomcat-doc @@ -0,0 +1 @@ +apache-tomcat \ No newline at end of file diff --git a/srcpkgs/apache-tomcat-examples b/srcpkgs/apache-tomcat-examples new file mode 120000 index 00000000000..10175e17795 --- /dev/null +++ b/srcpkgs/apache-tomcat-examples @@ -0,0 +1 @@ +apache-tomcat \ No newline at end of file diff --git a/srcpkgs/apache-tomcat-host-manager b/srcpkgs/apache-tomcat-host-manager new file mode 120000 index 00000000000..10175e17795 --- /dev/null +++ b/srcpkgs/apache-tomcat-host-manager @@ -0,0 +1 @@ +apache-tomcat \ No newline at end of file diff --git a/srcpkgs/apache-tomcat-manager b/srcpkgs/apache-tomcat-manager new file mode 120000 index 00000000000..10175e17795 --- /dev/null +++ b/srcpkgs/apache-tomcat-manager @@ -0,0 +1 @@ +apache-tomcat \ No newline at end of file diff --git a/srcpkgs/apache-tomcat/files/apache-tomcat/run b/srcpkgs/apache-tomcat/files/apache-tomcat/run new file mode 100644 index 00000000000..03f3c94067e --- /dev/null +++ b/srcpkgs/apache-tomcat/files/apache-tomcat/run @@ -0,0 +1,7 @@ +#!/bin/sh + + +export CATALINA_BASE=/usr/share/apache-tomcat +export CATALINA_TMPDIR=/tmp + +exec chpst -u tomcat:tomcat /usr/share/apache-tomcat/bin/catalina.sh run diff --git a/srcpkgs/apache-tomcat/template b/srcpkgs/apache-tomcat/template new file mode 100644 index 00000000000..a8a64d64747 --- /dev/null +++ b/srcpkgs/apache-tomcat/template @@ -0,0 +1,71 @@ +# Template file for 'apache-tomcat' +pkgname=apache-tomcat +version=8.5.4 +revision=1 +wrksrc=${pkgname}-${version}-src +hostmakedepends="openjdk apache-ant" +depends="virtual?java-runtime" +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" +system_accounts="tomcat" +short_desc="An open source implementation of the Java Servlet" +maintainer="Michael Aldridge " +license="Apache-2.0" +homepage="https://tomcat.apache.org" +distfiles="http://mirrors.advancedhosters.com/apache/tomcat/tomcat-8/v${version}/src/apache-tomcat-${version}-src.tar.gz" +checksum=bb35d2b37e2ff237e09e389dbfb0a99fa8a71f11c947c20f5bbea375f6f3449d + +do_build() { + ant +} + +post_build() { + rm output/build/bin/*.bat + rm output/build/bin/{startup.sh,shutdown.sh} +} + +do_install() { + vlicense LICENSE + 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 + } +}