diff options
author | Lucas Werkmeister | 2019-11-25 01:14:01 +0100 |
---|---|---|
committer | Lucas Werkmeister | 2019-11-25 01:14:01 +0100 |
commit | d02c44b662c24eb9c6243f73fd73de1b5cd2032a (patch) | |
tree | edab156e371bfc19747db9c942421d792df046f8 | |
download | aur-d02c44b662c24eb9c6243f73fd73de1b5cd2032a.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 native-image,
so the former graal-native-image-bin package is split in two:
native-image-jdk8-bin and native-image-jdk11-bin (this package). We use
this opportunity to make several other adjustments as well.
We remove “graal” from the package name, to balance out the addition of
the Java version (avoiding an overlong package name) and for consistency
with FastR, TruffleRuby and GraalPython, which don’t include “graal” as
a separate component either.
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 native-image-jdk8-bin and
native-image-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 native-image without
specifying its full path.
And finally, a .gitignore file never hurts.
Sadly, this version is not yet functional – native-image complains that
it “requires static JDK libraries”. I have not yet been able to fix this
issue, but I want to get the GraalVM 19.3.0 update finished this
weekend, so for now I’m pushing this broken version (sorry). I hope to
fix it soon, but if anyone else can figure it out, that’s also great.
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 54 |
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7fecb941ca86 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = native-image-jdk11-bin + pkgdesc = Plugin to turn GraalVM-based applications into native binary images (Java 11 version) + pkgver = 19.3.0 + pkgrel = 1 + url = https://github.com/oracle/graal + arch = x86_64 + license = custom + depends = jdk11-graalvm-bin + source = https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-19.3.0/native-image-installable-svm-java11-linux-amd64-19.3.0.jar + sha256sums = ed8a281df66a438e116fff2dec71c201594fd39c82c7152d67a1dbb4dd58992d + +pkgname = native-image-jdk11-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..d7dc740fe963 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de> + +java_=11 +pkgname_=native-image +pkgname="${pkgname_}-jdk${java_}-bin" +pkgver=19.3.0 +pkgrel=1 +pkgdesc="Plugin to turn GraalVM-based applications into native binary images (Java ${java_} version)" +arch=('x86_64') +url='https://github.com/oracle/graal' +license=('custom') +depends=("jdk${java_}-graalvm-bin") +source=("https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${pkgver}/${pkgname_}-installable-svm-java${java_}-linux-amd64-${pkgver}.jar") +sha256sums=('ed8a281df66a438e116fff2dec71c201594fd39c82c7152d67a1dbb4dd58992d') + +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/" lib/ LICENSE_NATIVEIMAGE.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_NATIVEIMAGE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |