[arch-commits] Commit in tomcat8/trunk (PKGBUILD)

Maxime Gauduin alucryd at archlinux.org
Sun Sep 20 15:16:12 UTC 2020


    Date: Sunday, September 20, 2020 @ 15:16:12
  Author: alucryd
Revision: 396351

upgpkg: tomcat8 8.5.58-1

Modified:
  tomcat8/trunk/PKGBUILD

----------+
 PKGBUILD |   74 ++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 52 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-20 15:04:43 UTC (rev 396350)
+++ PKGBUILD	2020-09-20 15:16:12 UTC (rev 396351)
@@ -2,7 +2,7 @@
 # Contributor: Guillaume Alaux <guillaume at archlinux.org>
 
 pkgname=tomcat8
-pkgver=8.5.57
+pkgver=8.5.58
 pkgrel=1
 pkgdesc='Open source implementation of the Java Servlet 3.1 and JavaServer Pages 2.3 technologies'
 arch=(any)
@@ -14,6 +14,11 @@
   java-commons-daemon
   eclipse-ecj
 )
+makedepends=(
+  ant
+  git
+  java-environment
+)
 optdepends=('tomcat-native: to allow optimal performance in production environments')
 backup=(
   etc/tomcat8/catalina.policy
@@ -25,37 +30,61 @@
   etc/tomcat8/web.xml
 )
 install=tomcat8.install
+_tag=2fe65bc24e48ee5ea079937e6a73576339f871ce
 source=(
-  https://archive.apache.org/dist/tomcat/tomcat-8/v${pkgver}/bin/apache-tomcat-${pkgver}.tar.gz{,.asc}
+  git+https://github.com/apache/tomcat.git#tag=${_tag}
   tomcat8.service
   tomcat8.sysusers
   tomcat8.tmpfiles
 )
-validpgpkeys=(
-  A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 # Mark E D Thomas
-  713DA88BE50911535FE716F5208B0AB1D63011C7 # Violeta Georgieva Georgieva
-)
-sha512sums=('720de36bb3e40a4c67bdf0137b12ae0fd733aef772d81a4b8dab00f29924ddd17ecb2a7217b9551fc0ca51bd81d1da13ad63b6694c445e5c0e42dfa7f279ede1'
-            'SKIP'
-            '114c62af0adf4243d210b2f3d7a9a51ca448a7105d38ef4a6587903eac716ad552989bfee76af933cf0022bad374a8dcb1b932abb8e902a93f72dec0aadd7ab7'
-            '7b505c79e495c35f787f300cd786e9f474ba2df61f8a50e21d2480de6a4c27a409b627447d1e4cb2fb543f81c107cbb30adbbc31a29754d0fe8e6908ea61cd7a'
-            'f5d819afa9b01adbe1f09267a64d1d35f994db48c7af9c49b1731305e82e0306561a24d6b6d4a33116dcd4990989d8a7a9c52532b003d480c0522e63b976c815')
+b2sums=('SKIP'
+        'b573a5c2d081539c57c35655c612108ae5ece6e362d887170fa52888272480f17f4e6637f378e9fbdf9cb992d91ce63f4fb45d2fca62b31fa1c817ae4465e94c'
+        'e2b63275530ce7e57756ccf6f3934506245888dbc41005275e039e25712c13d37c2f28fd3af0c1dcace1dabe7a1e33d7f056f4c3c8f4a336f952fd7de46345ef'
+        'a0e3052408ad8c64c88fcc7d4c3a883c16e7fd0d89a22fd6e89480b2021fc7fb4acf6f9b2ded78e64ebe9c2afb8bf85742da0299666b22f5cf6f63166ce1b141')
 
 _gid_log=19
 _gid_tomcat=57
 _uid_tomcat=57
 
+pkgver() {
+  cd tomcat
+
+  _pkgver=$(git describe --tags)
+
+  if [[ ${_pkgver} != 8.* ]]; 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
+}
+
+build() {
+  cd tomcat
+
+  ant
+}
+
 package() {
-  cd apache-tomcat-${pkgver}
+  cd tomcat/output/build
 
   # Tomcat general files
-  install -dm 755 "${pkgdir}"/usr/share/{,java/}tomcat8
-  cp -dr --no-preserve=ownership bin "${pkgdir}"/usr/share/tomcat8
-  # commons-daemon and tomcat-natives are packaged on their own
-  rm "${pkgdir}"/usr/share/tomcat8/bin/{*.bat,commons-daemon*,tomcat-native.tar.gz}
+  install -dm 755 "${pkgdir}"/usr/share/tomcat8/bin
+  install -m 755  bin/* -t "${pkgdir}"/usr/share/tomcat8/bin/
+  # commons-daemon is packaged on its own
+  rm "${pkgdir}"/usr/share/tomcat8/bin/{*.bat,commons-daemon*}
   ln -s /usr/share/java/commons-daemon.jar "${pkgdir}"/usr/share/tomcat8/bin/commons-daemon.jar
 
-  install -m 644 lib/* "${pkgdir}"/usr/share/java/tomcat8
+  install -dm 755 "${pkgdir}"/usr/share/java/tomcat8
+  install -m 644 lib/* -t "${pkgdir}"/usr/share/java/tomcat8/
   # eclipse-ecj is packaged on its own
   rm "${pkgdir}"/usr/share/java/tomcat8/ecj-*.jar
   ln -s ../eclipse-ecj.jar "${pkgdir}"/usr/share/java/tomcat8/ecj.jar
@@ -69,12 +98,13 @@
   chgrp ${_gid_log} "${pkgdir}"/var/log/tomcat8/catalina.{out,err}
 
   install -dm 775 "${pkgdir}"/etc/tomcat8
-  install -m 640 -g ${_gid_tomcat} conf/* "${pkgdir}"/etc/tomcat8
+  install -m 640 -g ${_gid_tomcat} conf/* -t "${pkgdir}"/etc/tomcat8/
+
   install -dm 775 -g ${_gid_tomcat} "${pkgdir}"/etc/tomcat8/Catalina
   ln -s /etc/tomcat8 "${pkgdir}"/usr/share/tomcat8/conf
 
   install -dm 775 "${pkgdir}"/var/lib/tomcat8
-  cp -r webapps "${pkgdir}"/var/lib/tomcat8
+  cp -dr --no-preserve=ownership webapps "${pkgdir}"/var/lib/tomcat8/
   chown -R ${_uid_tomcat}:${_gid_tomcat} "${pkgdir}"/var/lib/tomcat8
   chmod 775 "${pkgdir}"/var/lib/tomcat8/webapps
   ln -s /var/lib/tomcat8/webapps "${pkgdir}"/usr/share/tomcat8/webapps
@@ -84,9 +114,9 @@
   ln -s /var/tmp/tomcat8/temp "${pkgdir}"/usr/share/tomcat8/temp
   ln -s /var/tmp/tomcat8/work "${pkgdir}"/usr/share/tomcat8/work
 
-  install -Dm 644 ../tomcat8.service "${pkgdir}"/usr/lib/systemd/system/tomcat8.service
-  install -Dm 644 ../tomcat8.sysusers "${pkgdir}"/usr/lib/sysusers.d/tomcat8.conf
-  install -Dm 644 ../tomcat8.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/tomcat8.conf
+  install -Dm 644 ../../../tomcat8.service "${pkgdir}"/usr/lib/systemd/system/tomcat8.service
+  install -Dm 644 ../../../tomcat8.sysusers "${pkgdir}"/usr/lib/sysusers.d/tomcat8.conf
+  install -Dm 644 ../../../tomcat8.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/tomcat8.conf
 }
 
 # vim: ts=2 sw=2 et:


More information about the arch-commits mailing list