Date: Thursday, March 31, 2022 @ 11:19:06
  Author: diabonas
Revision: 1177920

upgpkg: bcprov 1.71-1: upstream release, build from source, change JAR location

According to the Java package guidelines JARs should be placed in
/usr/share/java/$pkgname/ instead of directly under /usr/share/java/.

Modified:
  bcprov/trunk/PKGBUILD
Deleted:
  bcprov/trunk/LICENSE.html

--------------+
 LICENSE.html |   22 ----------------------
 PKGBUILD     |   51 ++++++++++++++++++++++++++++++++++-----------------
 2 files changed, 34 insertions(+), 39 deletions(-)

Deleted: LICENSE.html
===================================================================
--- LICENSE.html        2022-03-31 09:52:57 UTC (rev 1177919)
+++ LICENSE.html        2022-03-31 11:19:06 UTC (rev 1177920)
@@ -1,22 +0,0 @@
-<html>
-<body bgcolor=#ffffff>
-
-Copyright (c) 2000-2016 The Legion of the Bouncy Castle Inc. 
(http://www.bouncycastle.org)
-<p>
-Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software 
-and associated documentation files (the "Software"), to deal in the Software 
without restriction, 
-including without limitation the rights to use, copy, modify, merge, publish, 
distribute, sublicense, 
-and/or sell copies of the Software, and to permit persons to whom the Software 
is furnished to do so,
-subject to the following conditions:
-<p>
-The above copyright notice and this permission notice shall be included in all 
copies or substantial
-portions of the Software.
-<p>
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 
OR OTHER
-DEALINGS IN THE SOFTWARE.
-</body>
-</html>

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-03-31 09:52:57 UTC (rev 1177919)
+++ PKGBUILD    2022-03-31 11:19:06 UTC (rev 1177920)
@@ -1,23 +1,40 @@
-# Maintainer: Jan de Groot <j...@archlinux.org>
-
+# Maintainer: Jonas Witschel <diabo...@archlinux.org>
+# Contributor: Jan de Groot <j...@archlinux.org>
 pkgname=bcprov
-pkgver=1.70
+pkgver=1.71
+_tag=1dcbde6d8761df7d88fc7432cb128533418adeca # git rev-parse "r${pkgver/./rv}"
 pkgrel=1
-pkgdesc="Java cryptography APIs (Bouncy Castle)"
+pkgdesc='Bouncy Castle Crypto APIs for Java'
 arch=('any')
-url="https://www.bouncycastle.org/java.html";
-license=('custom')
-source=(https://www.bouncycastle.org/download/bcprov-jdk15on-${pkgver/./}.jar
-        LICENSE.html)
-noextract=(bcprov-jdk15on-${pkgver/./}.jar)
-sha256sums=('8f3c20e3e2d565d26f33e8d4857a37d0d7f8ac39b62a7026496fcab1bdac30d4'
-            'e9bb81d9c9486a5de0d1facd674e761b46cc421ddd31bbd2b100871a8bea2ed6')
+url='https://www.bouncycastle.org/java.html'
+license=('MIT')
+depends=('java-runtime-headless')
+makedepends=('git' 'ant' 'strip-nondeterminism')
+source=("git+https://github.com/bcgit/bc-java.git#tag=$_tag";)
+sha512sums=('SKIP')
 
+pkgver() {
+       cd bc-java
+       git describe --tags | sed 's/^r//;s/rv/./;s/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
+build() {
+       cd bc-java
+       ant -f ant/jdk18+.xml clean build-provider build
+
+       # Timestamps in JAR files generated by Ant do not honour 
SOURCE_DATE_EPOCH
+       # (https://bz.apache.org/bugzilla/show_bug.cgi?id=61269)
+       strip-nondeterminism --timestamp "$SOURCE_DATE_EPOCH" 
"build/artifacts/jdk1.8/jars/bcprov-jdk18on-${pkgver/./}.jar"
+}
+
+check() {
+       cd bc-java
+       ant -f ant/jdk18+.xml test
+}
+
 package() {
-  depends=('java-runtime')
-  cd "${srcdir}"
-  install -m755 -d "${pkgdir}/usr/share/java"
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 bcprov-jdk15on-${pkgver/./}.jar 
"${pkgdir}/usr/share/java/bcprov.jar"
-  install -m644 LICENSE.html "${pkgdir}/usr/share/licenses/${pkgname}/"
+       cd bc-java
+       install -Dm644 
"build/artifacts/jdk1.8/jars/bcprov-jdk18on-${pkgver/./}.jar" -t 
"$pkgdir/usr/share/java/$pkgname"
+       ln -s "bcprov-jdk18on-${pkgver/./}.jar" 
"$pkgdir/usr/share/java/$pkgname/bcprov.jar"
+       install -Dm644 LICENSE.html -t "$pkgdir/usr/share/licenses/$pkgname"
 }

Reply via email to