summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Werkmeister2019-11-25 01:03:28 +0100
committerLucas Werkmeister2019-11-25 01:03:28 +0100
commit67ad40ff69afc542a00a29534b2a315169d075a6 (patch)
treeabd879055ed68ba108b70b49b6a7cbe5a354a051
downloadaur-67ad40ff69afc542a00a29534b2a315169d075a6.tar.gz
Initial commit
With the 19.3.0 release, GraalVM supports two Java versions: Java 8 and Java 11. This also affects all sibling packages, including GraalPython, so the former graalpython-bin package is split in two: graalpython-jdk8-bin (this package) and graalpython-jdk11-bin. We use this opportunity to make several other adjustments as well. We no longer provide a version of the package name without the “-bin” suffix. It doesn’t seem likely that a built-from-source version will be added to the AUR soon, and other packages like jdk8-openj9-bin or jdk8-j9-bin don’t provide non-bin versions either. To make it possible to install graalpython-jdk8-bin and graalpython-jdk11-bin in parallel, the symlink in /usr/bin is removed (as it would otherwise conflict between the two packages). Users can add /usr/lib/jvm/default/bin/ or a similar directory to their $PATH, or otherwise ensure that they can still run the right graalpython without specifying its full path. And finally, a .gitignore file never hurts.
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD54
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a626a1216ec9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = graalpython-jdk8-bin
+ pkgdesc = GraalVM-based, high-performance implementation of the Python language (early development), Java 8 version
+ pkgver = 19.3.0
+ pkgrel = 1
+ url = https://github.com/graalvm/graalpython
+ arch = x86_64
+ license = custom
+ depends = jdk8-graalvm-bin
+ source = https://github.com/graalvm/graalpython/releases/download/vm-19.3.0/python-installable-svm-java8-linux-amd64-19.3.0.jar
+ sha256sums = ddeefafef85548529e6160fa5c4942e354aaa4077762fe6f4c29ede62ab52562
+
+pkgname = graalpython-jdk8-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..88c136076055
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+# source
+/*.jar
+
+# build
+/src/
+/pkg/
+
+# package
+/*.pkg.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0ca6e9bb4962
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+
+java_=8
+pkgname_=graalpython
+pkgname="${pkgname_}-jdk${java_}-bin"
+pkgver=19.3.0
+pkgrel=1
+pkgdesc="GraalVM-based, high-performance implementation of the Python language (early development), Java ${java_} version"
+arch=('x86_64')
+url='https://github.com/graalvm/graalpython'
+license=('custom')
+depends=("jdk${java_}-graalvm-bin")
+source=("https://github.com/graalvm/$pkgname_/releases/download/vm-${pkgver}/python-installable-svm-java${java_}-linux-amd64-${pkgver}.jar")
+sha256sums=('ddeefafef85548529e6160fa5c4942e354aaa4077762fe6f4c29ede62ab52562')
+
+package() {
+ local file eq permissions mode name target
+
+ mkdir -p "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/"
+ cp -a -t "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/" jre/ LICENSE_GRAALPYTHON.txt 3rd_party_licenses_graalpython.txt
+
+ printf '\n' >> META-INF/permissions
+ while read -r file eq permissions; do
+ if [[ $eq != '=' ]]; then
+ printf >&2 'second word should be "=": %s %s %s\n' "$file" "$eq" "$permissions"
+ return 1
+ fi
+ case $permissions in
+ 'rw-------') mode=600;;
+ 'rw-r--r--') mode=644;;
+ 'rw-rw-r--') mode=664;;
+ 'rwxr-xr-x') mode=755;;
+ 'rwxrwxr-x') mode=775;;
+ 'rwxrwxrwx') continue;; # symbolic link
+ *)
+ printf >&2 'unknown permissions: %s\n' "$permissions"
+ return 1
+ ;;
+ esac
+ chmod "$mode" -- "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/$file"
+ done < META-INF/permissions
+
+ printf '\n' >> META-INF/symlinks
+ while read -r name eq target; do
+ if [[ $eq != '=' ]]; then
+ printf >&2 'second word should be "=": %s %s %s\n' "$name" "$eq" "$target"
+ return 1
+ fi
+ mkdir -p -- "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/$(dirname -- "$name")"
+ ln -s -- "$target" "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/$name"
+ done < META-INF/symlinks
+
+ install -DTm644 LICENSE_GRAALPYTHON.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}