%global major 21.0.5 %global minor b631.16 %global x64name jbr_jcef-%{major}-linux-x64-%{minor} %global aarch64name jbr_jcef-%{major}-linux-aarch64-%{minor} Name: java-jbr Version: %{major}%{minor} Release: 1%?dist Summary: JetBrains Runtime License: GPL-2.0-or-later URL: https://github.com/JetBrains/JetBrainsRuntime Source0: https://cache-redirector.jetbrains.com/intellij-jbr/%{x64name}.tar.gz Source1: https://cache-redirector.jetbrains.com/intellij-jbr/%{aarch64name}.tar.gz Source2: https://github.com/JetBrains/JetBrainsRuntime/raw/d4eef13c493c3d7180284f94201ab8686148f0c1/LICENSE BuildRequires: javapackages-filesystem Requires: javapackages-filesystem %description Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux %prep cp %{SOURCE2} . %install export QA_RPATHS=0x000c mkdir -p %{buildroot}%{_jvmdir} if [[ $(arch) == "x86_64" ]] then tar -xvf %{SOURCE0} mv %{x64name} %{buildroot}%{_jvmdir}/jdk-jbr-%{major}%{minor} else tar -xvf %{SOURCE1} mv %{aarch64name} %{buildroot}%{_jvmdir}/jdk-jbr-%{major}%{minor} fi ln -s jdk-jbr-%{major}%{minor} %{buildroot}%{_jvmdir}/jdk-jbr find %{buildroot}%{_jvmdir}/jdk-jbr-%{major}%{minor} -iname '*.so' -exec chmod +x {} \; find %{buildroot}%{_jvmdir}/jdk-jbr-%{major}%{minor}/bin -exec chmod +x {} \; %check %files %license LICENSE %{_jvmdir}/jdk-jbr-%{major}%{minor} %{_jvmdir}/jdk-jbr %changelog %autochangelog