[arch-commits] Commit in tomcat7/trunk (PKGBUILD)
Maxime Gauduin
alucryd at archlinux.org
Sun Sep 20 15:38:53 UTC 2020
Date: Sunday, September 20, 2020 @ 15:38:53
Author: alucryd
Revision: 396355
upgpkg: tomcat7 7.0.106-1
Modified:
tomcat7/trunk/PKGBUILD
----------+
PKGBUILD | 78 +++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 55 insertions(+), 23 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-09-20 15:17:56 UTC (rev 396354)
+++ PKGBUILD 2020-09-20 15:38:53 UTC (rev 396355)
@@ -2,7 +2,7 @@
# Contributor: Guillaume Alaux <guillaume at archlinux.org>
pkgname=tomcat7
-pkgver=7.0.105
+pkgver=7.0.106
pkgrel=1
pkgdesc='Open source implementation of the Java Servlet 3.0 and JavaServer Pages 2.2 technologies'
arch=(any)
@@ -14,6 +14,11 @@
java-commons-daemon
eclipse-ecj
)
+makedepends=(
+ ant
+ git
+ 'java-environment=8'
+)
optdepends=('tomcat-native: to allow optimal performance in production environments')
backup=(
etc/tomcat7/catalina.policy
@@ -25,38 +30,64 @@
etc/tomcat7/web.xml
)
install=tomcat7.install
+_tag=c5d9010a75e99a69f59ba11cc1116d039a113979
source=(
- https://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/bin/apache-tomcat-${pkgver}.tar.gz{,.asc}
+ git+https://github.com/apache/tomcat.git#tag=${_tag}
tomcat7.service
tomcat7.sysusers
tomcat7.tmpfiles
)
-validpgpkeys=(
- DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 # Mark E D Thomas
- 713DA88BE50911535FE716F5208B0AB1D63011C7 # Violeta Georgieva Georgieva
-)
+b2sums=('SKIP'
+ 'e8931e1b6ef796617eaad93c3a32e996fe9887ae07ac0459fd5a13342704289c4ff77149d12f273254de72567f0334b77b4cd435e47c795567184ac21579d44d'
+ 'a84b82434c1ca47fca30fd67a4af07260ee0b1f16450420317750587dd2ca54cc3e3c20e3475ffcee9e4302cce54fdd53f2d27cab25c80b42256f6816437c3a2'
+ 'c014d435c9903e0b5d66c45ffcc2c3bbb46a087958e9281042031fd6a41595b9be6fc07fc9be388911d5b4832fa99c4d13b768ba526adbef9087b28d13347189')
-sha256sums=('1a36882b5e25fff4f5d8c10e4029f29e43b1db96e0df03bdbed1fa913038392f'
- 'SKIP'
- '51f599e519095ec146f5eba1a0d471117070f5b3089715bc9e392d537deb38ce'
- '4c0e12c45b406d2e8f0081de3d60dbf34c31f4da36296cedce6af5d6e03c8708'
- 'bc8ce84b3b2c938f55980cbe9bc1c2a5f371e23b34cf11c1b56d2c49836761d6')
-
_gid_log=19
_gid_tomcat=71
_uid_tomcat=71
+pkgver() {
+ cd tomcat
+
+ _pkgver=$(git describe --tags)
+
+ if [[ ${_pkgver} != 7.* ]]; then
+ exit 1
+ fi
+
+ echo ${_pkgver}
+}
+
+prepare() {
+ cd tomcat
+
+ cp build.properties.default build.properties
+ sed "/^base\.path=/c\base\.path=${srcdir}" -i build.properties
+ sed "/^compile.debug=/c\compile.debug=false" -i build.properties
+ sed "/^trydownload.httpusecaches=/c\trydownload.httpusecaches=false" -i build.properties
+ sed "/^#java.7.home=/c\java.7.home=/usr/lib/jvm/java-8-openjdk" -i build.properties
+}
+
+build() {
+ cd tomcat
+
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
+
+ ant
+}
+
package() {
- cd apache-tomcat-${pkgver}
+ cd tomcat/output/build
# Tomcat general files
- install -dm 755 "${pkgdir}"/usr/share/{,java/}tomcat7
- cp -dr --no-preserve=ownership bin "${pkgdir}"/usr/share/tomcat7
- # commons-daemon and tomcat-natives are packaged on their own
- rm "${pkgdir}"/usr/share/tomcat7/bin/{*.bat,commons-daemon*,tomcat-native.tar.gz}
+ install -dm 755 "${pkgdir}"/usr/share/tomcat7/bin
+ install -m 755 bin/* -t "${pkgdir}"/usr/share/tomcat7/bin/
+ # commons-daemon is packaged on its own
+ rm "${pkgdir}"/usr/share/tomcat7/bin/{*.bat,commons-daemon*}
ln -s /usr/share/java/commons-daemon.jar "${pkgdir}"/usr/share/tomcat7/bin/commons-daemon.jar
- install -m 644 lib/* "${pkgdir}"/usr/share/java/tomcat7
+ install -dm 755 "${pkgdir}"/usr/share/java/tomcat7
+ install -m 644 lib/* -t "${pkgdir}"/usr/share/java/tomcat7/
# eclipse-ecj is packaged on its own
rm "${pkgdir}"/usr/share/java/tomcat7/ecj-*.jar
ln -s ../eclipse-ecj.jar "${pkgdir}"/usr/share/java/tomcat7/ecj.jar
@@ -70,12 +101,13 @@
chgrp ${_gid_log} "${pkgdir}"/var/log/tomcat7/catalina.{out,err}
install -dm 775 "${pkgdir}"/etc/tomcat7
- install -m 640 -g ${_gid_tomcat} conf/* "${pkgdir}"/etc/tomcat7
+ install -m 640 -g ${_gid_tomcat} conf/* -t "${pkgdir}"/etc/tomcat7/
+
install -dm 775 -g ${_gid_tomcat} "${pkgdir}"/etc/tomcat7/Catalina
ln -s /etc/tomcat7 "${pkgdir}"/usr/share/tomcat7/conf
install -dm 775 "${pkgdir}"/var/lib/tomcat7
- cp -r webapps "${pkgdir}"/var/lib/tomcat7
+ cp -dr --no-preserve=ownership webapps "${pkgdir}"/var/lib/tomcat7/
chown -R ${_uid_tomcat}:${_gid_tomcat} "${pkgdir}"/var/lib/tomcat7
chmod 775 "${pkgdir}"/var/lib/tomcat7/webapps
ln -s /var/lib/tomcat7/webapps "${pkgdir}"/usr/share/tomcat7/webapps
@@ -85,9 +117,9 @@
ln -s /var/tmp/tomcat7/temp "${pkgdir}"/usr/share/tomcat7/temp
ln -s /var/tmp/tomcat7/work "${pkgdir}"/usr/share/tomcat7/work
- install -Dm 644 ../tomcat7.service "${pkgdir}"/usr/lib/systemd/system/tomcat7.service
- install -Dm 644 ../tomcat7.sysusers "${pkgdir}"/usr/lib/sysusers.d/tomcat7.conf
- install -Dm 644 ../tomcat7.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/tomcat7.conf
+ install -Dm 644 ../../../tomcat7.service "${pkgdir}"/usr/lib/systemd/system/tomcat7.service
+ install -Dm 644 ../../../tomcat7.sysusers "${pkgdir}"/usr/lib/sysusers.d/tomcat7.conf
+ install -Dm 644 ../../../tomcat7.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/tomcat7.conf
}
# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list