diff options
author | Lucas Werkmeister | 2019-11-25 00:49:28 +0100 |
---|---|---|
committer | Lucas Werkmeister | 2019-11-25 00:49:28 +0100 |
commit | 5e80e8742d8ca4c4efa9446c9c55e571fa9801c5 (patch) | |
tree | 80c91202952835d6275fe8531d618ec3ece01ec4 | |
download | aur-5e80e8742d8ca4c4efa9446c9c55e571fa9801c5.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 (this package) and truffleruby-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 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-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 54 |
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..afa0104aacde --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = truffleruby-jdk8-bin + pkgdesc = GraalVM-based, high-performance implementation of the Ruby language (Java 8 version) + pkgver = 19.3.0 + pkgrel = 1 + url = https://github.com/oracle/truffleruby + arch = x86_64 + license = EPL + license = GPL2 + license = LGPL2.1 + depends = jdk8-graalvm-bin + source = https://github.com/oracle/truffleruby/releases/download/vm-19.3.0/ruby-installable-svm-java8-linux-amd64-19.3.0.jar + sha256sums = 0423e1e6dfa00d5c5b4a88b96811aa40bbf0012cbf151a247e90fb6c8b3e117d + +pkgname = truffleruby-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..1017699ef52e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de> + +java_=8 +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=('0423e1e6dfa00d5c5b4a88b96811aa40bbf0012cbf151a247e90fb6c8b3e117d') + +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_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" +} |