summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Werkmeister2021-04-20 21:21:00 +0200
committerLucas Werkmeister2021-04-20 21:21:19 +0200
commitbf1bd75410edc465807dde1b6ee0bcf87559f871 (patch)
tree04d340382d2580ecdb5a0d5cde2c503984748d4e
downloadaur-bf1bd75410edc465807dde1b6ee0bcf87559f871.tar.gz
Initial commit
Mostly based on fastr-jdk11-bin.
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD55
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f9ffa54cdf0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = fastr-jdk16-bin
+ pkgdesc = GraalVM-based, high-performance implementation of the R language (Java 16 version)
+ pkgver = 21.1.0
+ pkgrel = 1
+ url = https://github.com/oracle/fastr
+ arch = x86_64
+ license = GPL3
+ depends = jdk16-graalvm-bin
+ source = https://github.com/oracle/fastr/releases/download/vm-21.1.0/r-installable-java16-linux-amd64-21.1.0.jar
+ sha256sums = 8b67329d060c94481a4c14d545052fa5008546bc01362aa017ceef9ea761cece
+
+pkgname = fastr-jdk16-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..88c13607605
--- /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 00000000000..54d9782fa6e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+
+java_=16
+pkgname_=fastr
+pkgname="${pkgname_}-jdk${java_}-bin"
+pkgver=21.1.0
+pkgrel=1
+pkgdesc="GraalVM-based, high-performance implementation of the R language (Java ${java_} version)"
+arch=('x86_64')
+url='https://github.com/oracle/fastr'
+license=('GPL3')
+depends=("jdk${java_}-graalvm-bin")
+source=("https://github.com/oracle/$pkgname_/releases/download/vm-${pkgver}/r-installable-java${java_}-linux-amd64-${pkgver}.jar")
+sha256sums=('8b67329d060c94481a4c14d545052fa5008546bc01362aa017ceef9ea761cece')
+
+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_FASTR 3rd_party_licenses_fastr.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--r--') mode=744;; # oracle/fastr#119
+ '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_FASTR "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}