summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyrozap2019-10-13 02:21:12 -0500
committercyrozap2019-10-13 03:01:48 -0500
commitdf34a9d50a00853408de7e58ce4023513e23fe6d (patch)
treed45a0b5c9bf0790007500c512c90af5cfcbf6d26
parent1c0a8b51bce23ccc9ccc8d60a23fa616bcb12bc7 (diff)
downloadaur-globalplatformpro-git.tar.gz
Correct Java version again
Also export JAVA_HOME so the package will still build when a JDK of a greater version is installed and active.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD10
2 files changed, 10 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7fdca58dd04..8dfec1a2cb7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,7 +7,7 @@ pkgbase = globalplatformpro-git
license = LGPL3
makedepends = apache-ant
makedepends = git
- makedepends = java-environment>=8
+ makedepends = java-environment=8
makedepends = maven
depends = java-runtime-headless>=8
depends = pcsclite
diff --git a/PKGBUILD b/PKGBUILD
index ac18a26a24d..bfcb49f378f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=('any')
url="https://javacard.pro/globalplatform/"
license=('LGPL3')
depends=('java-runtime-headless>=8' 'pcsclite')
-makedepends=('apache-ant' 'git' 'java-environment>=8' 'maven')
+makedepends=('apache-ant' 'git' 'java-environment=8' 'maven')
source=(
"$pkgname::git+https://github.com/martinpaljak/GlobalPlatformPro.git"
'gp-pro'
@@ -30,6 +30,14 @@ prepare() {
build() {
cd $pkgname
+
+ # Build only works on Java 8, so set JAVA_HOME to OpenJDK 8.
+ if [ -d /usr/lib/jvm/java-8-openjdk ]; then
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
+ else
+ echo "WARNING: OpenJDK 8 not found. If the build fails, select a version 8 JDK using \"archlinux-java\"."
+ fi
+
mvn package
ant
}