From 19f3c5a5883535058de741c49e8709a10e0370d9 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 12 Jul 2024 01:26:57 +0800 Subject: [PATCH 1/3] fix: gradle Signed-off-by: madomado --- anda/tools/buildsys/gradle/gradle.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anda/tools/buildsys/gradle/gradle.spec b/anda/tools/buildsys/gradle/gradle.spec index 6e1fc78db9..e9637a02ed 100644 --- a/anda/tools/buildsys/gradle/gradle.spec +++ b/anda/tools/buildsys/gradle/gradle.spec @@ -3,8 +3,8 @@ Version: 8.9.0 Release: 1%?dist Summary: Powerful build system for the JVM URL: https://gradle.org/ -Source0: https://services.gradle.org/distributions/%{name}-%{version}-src.zip -Source1: https://services.gradle.org/distributions/%{name}-%{version}-all.zip +Source0: https://services.gradle.org/distributions/%{name}-8.9-src.zip +Source1: https://services.gradle.org/distributions/%{name}-8.9-all.zip License: Apache-2.0 Requires: java-latest-openjdk coreutils findutils sed which bash BuildRequires: java-11-openjdk-devel asciidoc xmlto groovy unzip git From ec5f2b54db7c062ca143cd4fc6abd5b0a3f479c6 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 12 Jul 2024 14:05:45 +0800 Subject: [PATCH 2/3] Update gradle.spec Signed-off-by: madomado --- anda/tools/buildsys/gradle/gradle.spec | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/anda/tools/buildsys/gradle/gradle.spec b/anda/tools/buildsys/gradle/gradle.spec index e9637a02ed..3455f4fbd1 100644 --- a/anda/tools/buildsys/gradle/gradle.spec +++ b/anda/tools/buildsys/gradle/gradle.spec @@ -1,10 +1,12 @@ +%global _ver 8.9 + Name: gradle Version: 8.9.0 Release: 1%?dist Summary: Powerful build system for the JVM URL: https://gradle.org/ -Source0: https://services.gradle.org/distributions/%{name}-8.9-src.zip -Source1: https://services.gradle.org/distributions/%{name}-8.9-all.zip +Source0: https://services.gradle.org/distributions/%{name}-%_ver-src.zip +Source1: https://services.gradle.org/distributions/%{name}-%_ver-all.zip License: Apache-2.0 Requires: java-latest-openjdk coreutils findutils sed which bash BuildRequires: java-11-openjdk-devel asciidoc xmlto groovy unzip git @@ -29,12 +31,12 @@ Sources for gradle, a powerful build system for the JVM. # See PKGBUILD on Arch Linux %prep -unzip %{SOURCE1} %{name}-%{version}/{README,LICENSE} -mv %{name}-%{version}/README . -mv %{name}-%{version}/LICENSE . -rmdir %{name}-%{version} +unzip %{SOURCE1} %{name}-%_ver/{README,LICENSE} +mv %{name}-%_ver/README . +mv %{name}-%_ver/LICENSE . +rmdir %{name}-%_ver unzip %{SOURCE0} -cd %{name}-%{version} +cd %{name}-%_ver cat < dist/gradle.sh #!/bin/sh @@ -53,7 +55,7 @@ sed -i "s#distributionUrl=.*#distributionUrl=file\:%{SOURCE1}#" \ %build -cd %{name}-%{version} +cd %{name}-%_ver export PATH="/usr/lib/jvm/java-11-openjdk/bin:${PATH}" ./gradlew installAll \ -Porg.gradle.java.installations.auto-download=false \ @@ -63,7 +65,7 @@ export PATH="/usr/lib/jvm/java-11-openjdk/bin:${PATH}" %install -cd %{name}-%{version}/dist +cd %{name}-%_ver/dist # install profile.d script install -Dm755 gradle.sh %{buildroot}/etc/profile.d/ From dd124b0b3eb5d0af42ce6873578ec6029cbdc4e4 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 12 Jul 2024 14:18:21 +0800 Subject: [PATCH 3/3] Update gradle.spec Signed-off-by: madomado --- anda/tools/buildsys/gradle/gradle.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/anda/tools/buildsys/gradle/gradle.spec b/anda/tools/buildsys/gradle/gradle.spec index 3455f4fbd1..21f4f25444 100644 --- a/anda/tools/buildsys/gradle/gradle.spec +++ b/anda/tools/buildsys/gradle/gradle.spec @@ -36,9 +36,8 @@ mv %{name}-%_ver/README . mv %{name}-%_ver/LICENSE . rmdir %{name}-%_ver unzip %{SOURCE0} -cd %{name}-%_ver -cat < dist/gradle.sh +cat < gradle.sh #!/bin/sh export GRADLE_HOME=/usr/share/java/gradle EOF @@ -68,7 +67,7 @@ export PATH="/usr/lib/jvm/java-11-openjdk/bin:${PATH}" cd %{name}-%_ver/dist # install profile.d script -install -Dm755 gradle.sh %{buildroot}/etc/profile.d/ +install -Dm755 ../../gradle.sh %{buildroot}/etc/profile.d/ # create the necessary directory structure install -d "%{buildroot}/usr/share/java/%{name}/bin"