summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Werkmeister2019-11-25 00:54:23 +0100
committerLucas Werkmeister2019-11-25 00:54:23 +0100
commit2569414d6ac53a44b640567c5468a76a346785de (patch)
tree20acd6164a3b5ececee33619c39000b7a0193284
downloadaur-2569414d6ac53a44b640567c5468a76a346785de.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 TruffleRuby, so the former truffleruby-bin package is split in two: truffleruby-jdk8-bin and truffleruby-jdk11-bin (this package). 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 truffleruby-jdk8-bin and truffleruby-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 R/Rscript/etc. without specifying its full path. And finally, a .gitignore file never hurts.
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD54
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9d049e3d6c43
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = truffleruby-jdk11-bin
+ pkgdesc = GraalVM-based, high-performance implementation of the Ruby language (Java 11 version)
+ pkgver = 19.3.0
+ pkgrel = 1
+ url = https://github.com/oracle/truffleruby
+ arch = x86_64
+ license = EPL
+ license = GPL2
+ license = LGPL2.1
+ depends = jdk11-graalvm-bin
+ source = https://github.com/oracle/truffleruby/releases/download/vm-19.3.0/ruby-installable-svm-java11-linux-amd64-19.3.0.jar
+ sha256sums = 593feefd10f06743b4768e1b37242b2364b5b72cb335ce1c7bcddc900b8846fd
+
+pkgname = truffleruby-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..6b87d56126fb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+
+java_=11
+pkgname_=truffleruby
+pkgname="${pkgname_}-jdk${java_}-bin"
+pkgver=19.3.0
+pkgrel=1
+pkgdesc="GraalVM-based, high-performance implementation of the Ruby language (Java ${java_} version)"
+arch=('x86_64')
+url='https://github.com/oracle/truffleruby'
+license=('EPL' 'GPL2' 'LGPL2.1')
+depends=("jdk${java_}-graalvm-bin")
+source=("https://github.com/oracle/$pkgname_/releases/download/vm-${pkgver}/ruby-installable-svm-java${java_}-linux-amd64-${pkgver}.jar")
+sha256sums=('593feefd10f06743b4768e1b37242b2364b5b72cb335ce1c7bcddc900b8846fd')
+
+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/" languages/ lib/ LICENSE_TRUFFLERUBY.txt 3rd_party_licenses_truffleruby.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_TRUFFLERUBY.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}