aur/jdk21-graalvm-bin/PKGBUILD

36 lines
1.9 KiB
Bash
Raw Normal View History

2023-09-22 19:03:06 +02:00
graal_=21.0.0
jdk_=${graal_%%+*}
java_=${jdk_%%.*}
pkgname="jdk${java_}-graalvm-bin"
pkgver=21.0.0
pkgrel=1
pkgdesc="Universal virtual machine for running applications written in a variety of languages (JVM-based, LLVM-based, or other), Java ${java_} version"
arch=('x86_64'
'aarch64')
url='https://www.graalvm.org/'
license=('custom')
depends=('java-runtime-common'
'java-environment-common')
makedepends=()
optdepends=("graaljs-jdk${java_}-bin: JavaScript component (used to be bundled with this package before the 22.2.0 release)"
"graal-llvm-jdk${java_}-bin: LLVM component (used to be bundled with this package before the 22.2.0 release)"
"graal-visualvm-jdk${java_}-bin: VisualVM component (used to be bundled with this package before the 22.2.0 release)")
provides=("java-runtime=${java_}"
"java-environment=${java_}")
options=('staticlibs')
install="$pkgname.install"
source=('graalvm-rebuild-libpolyglot.hook')
sha256sums=('eae72b5a2a2826eed7e4be5710d33f82934622a390ab6a9f009ed7753359e02e')
sha256sums_x86_64=('6c422941ccc58be5b891bb6499feeb72cd2b74d6729a29bf1fb8cc1a7d58b319')
sha256sums_aarch64=('bb4e92cf7eae91e474061aeae5ae75053a65cd558dbee76947827bf54d1b30a5')
source_x86_64=("https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${jdk_}/graalvm-community-jdk-${jdk_}_linux-x64_bin.tar.gz")
source_aarch64=("https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${jdk_}/graalvm-community-jdk-${jdk_}_linux-aarch64_bin.tar.gz")
package() {
cd "graalvm-community-openjdk-21+35.1"
mkdir -p "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/"
cp -a -t "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/" *
sed "s/JAVA/${java_}/g" < "../graalvm-rebuild-libpolyglot.hook" > "graalvm-jdk${java_}-rebuild-libpolyglot.hook"
install -DTm644 "graalvm-jdk${java_}-rebuild-libpolyglot.hook" "$pkgdir/usr/share/libalpm/hooks/graalvm-jdk${java_}-rebuild-libpolyglot.hook"
}