Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gradle #1509

Open
wants to merge 3 commits into
base: frawhide
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions anda/tools/buildsys/gradle/gradle.spec
Original file line number Diff line number Diff line change
@@ -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}-%{version}-src.zip
Source1: https://services.gradle.org/distributions/%{name}-%{version}-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
Expand All @@ -29,14 +31,13 @@ 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}

cat <<EOF > dist/gradle.sh
cat <<EOF > gradle.sh
#!/bin/sh
export GRADLE_HOME=/usr/share/java/gradle
EOF
Expand All @@ -53,7 +54,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 \
Expand All @@ -63,10 +64,10 @@ 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/
install -Dm755 ../../gradle.sh %{buildroot}/etc/profile.d/

# create the necessary directory structure
install -d "%{buildroot}/usr/share/java/%{name}/bin"
Expand Down
Loading