summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Werkmeister2021-04-20 22:36:17 +0200
committerLucas Werkmeister2021-04-20 22:39:07 +0200
commite92151734582583dca2a795e1c125fa8da1527e1 (patch)
tree8b421816b5eb74a3d0b395a096493cd5a9e4ceed
downloadaur-e92151734582583dca2a795e1c125fa8da1527e1.tar.gz
Initial commit
With GraalVM 21.1.0, the Node.js component is no longer included in the base GraalVM download, but should be installed separately. Consequently, we expose it as a separate AUR package as well. The release artifact does not include a license file, so we download one from GitHub. (It matches the GraalJS/Node.js section of the GraalVM 21.0.0.2 LICENSE.txt, at least.)
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore10
-rw-r--r--PKGBUILD61
3 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7fbb203883e7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = graal-nodejs-jdk11-bin
+ pkgdesc = GraalVM-based, ployglot-enabled implementation of Node.js, Java 11 version
+ pkgver = 21.1.0
+ pkgrel = 1
+ url = https://github.com/oracle/graaljs
+ arch = x86_64
+ arch = aarch64
+ license = custom
+ depends = jdk11-graalvm-bin
+ source_x86_64 = https://github.com/oracle/graaljs/releases/download/vm-21.1.0/nodejs-installable-java11-linux-amd64-21.1.0.jar
+ source_x86_64 = https://github.com/oracle/graaljs/raw/vm-21.1.0/LICENSE
+ sha256sums_x86_64 = 0488d86152e45d0424c5401f62c6b6f92c46ee171cf2874337c0797ae542b02f
+ sha256sums_x86_64 = 2c0950e91e3b7cf3671ca3c5d68b21ce72960b81f9ba09659f61cc2ebed67ecd
+ source_aarch64 = https://github.com/oracle/graaljs/releases/download/vm-21.1.0/nodejs-installable-java11-linux-aarch64-21.1.0.jar
+ source_aarch64 = https://github.com/oracle/graaljs/raw/vm-21.1.0/LICENSE
+ sha256sums_aarch64 = 6ed0b0ccf6cb13d7d6cbad3834f21311f84c01cca7dac496f64a4e3b3b0348e5
+ sha256sums_aarch64 = 2c0950e91e3b7cf3671ca3c5d68b21ce72960b81f9ba09659f61cc2ebed67ecd
+
+pkgname = graal-nodejs-jdk11-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..091c137899ed
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+# source
+/*.jar
+/LICENSE
+
+# build
+/src/
+/pkg/
+
+# package
+/*.pkg.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..032f3dd7b943
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+
+java_=11
+pkgname_=graal-nodejs
+pkgname="${pkgname_}-jdk${java_}-bin"
+pkgver=21.1.0
+pkgrel=1
+pkgdesc="GraalVM-based, ployglot-enabled implementation of Node.js, Java ${java_} version"
+arch=('x86_64'
+ 'aarch64')
+url='https://github.com/oracle/graaljs'
+license=('custom')
+depends=("jdk${java_}-graalvm-bin")
+source_x86_64=("https://github.com/oracle/graaljs/releases/download/vm-${pkgver}/nodejs-installable-java${java_}-linux-amd64-${pkgver}.jar"
+ "https://github.com/oracle/graaljs/raw/vm-${pkgver}/LICENSE")
+source_aarch64=("https://github.com/oracle/graaljs/releases/download/vm-${pkgver}/nodejs-installable-java${java_}-linux-aarch64-${pkgver}.jar"
+ "https://github.com/oracle/graaljs/raw/vm-${pkgver}/LICENSE")
+sha256sums_x86_64=('0488d86152e45d0424c5401f62c6b6f92c46ee171cf2874337c0797ae542b02f'
+ '2c0950e91e3b7cf3671ca3c5d68b21ce72960b81f9ba09659f61cc2ebed67ecd')
+sha256sums_aarch64=('6ed0b0ccf6cb13d7d6cbad3834f21311f84c01cca7dac496f64a4e3b3b0348e5'
+ '2c0950e91e3b7cf3671ca3c5d68b21ce72960b81f9ba09659f61cc2ebed67ecd')
+
+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
+
+ 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 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}