Skip to content

Commit

Permalink
replace easybuild templates with f-strings on Java 21 easyconfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
lexming committed Dec 24, 2024
1 parent c125854 commit 5fa154d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions easybuild/easyconfigs/j/Java/Java-21.0.2.eb
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name = 'Java'
version = '21.0.2'
local_build = '13'
_java_version = '21'
_patch_version = '2'
_build_version = '13'
version = f'{_java_version}.0.{_patch_version}'

homepage = 'https://openjdk.org'
description = """Java Platform, Standard Edition (Java SE) lets you develop and deploy
Java applications on desktops and servers."""

toolchain = SYSTEM

local_tarball_tmpl = 'OpenJDK%%(version_major)sU-jdk_%s_linux_hotspot_%%(version)s_%s.tar.gz'
_tarball_tmpl = f'OpenJDK{_java_version}U-jdk_{{}}_linux_hotspot_{version}_{_build_version}.tar.gz'

# Using the Adoptium Eclipse Temurin builds, recommended by https://whichjdk.com/#distributions

source_urls = ['https://github.com/adoptium/temurin%%(version_major)s-binaries/releases/download/jdk-%%(version)s+%s/'
% local_build]
sources = [local_tarball_tmpl % ('%(jdkarch)s', local_build)]

source_urls = [f'https://github.com/adoptium/temurin{_java_version}-binaries/releases/download/'
f'jdk-{version}+{_build_version}/']
sources = [_tarball_tmpl.format('%(jdkarch)s')]
checksums = [
{
local_tarball_tmpl % ('x64', local_build):
_tarball_tmpl.format('x64'):
'454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5',
local_tarball_tmpl % ('aarch64', local_build):
_tarball_tmpl.format('aarch64'):
'3ce6a2b357e2ef45fd6b53d6587aa05bfec7771e7fb982f2c964f6b771b7526a',
local_tarball_tmpl % ('ppc64le', local_build):
_tarball_tmpl.format('ppc64le'):
'd08de863499d8851811c893e8915828f2cd8eb67ed9e29432a6b4e222d80a12f',
local_tarball_tmpl % ('riscv64', local_build):
_tarball_tmpl.format('riscv64'):
'791a37ddb040e1a02bbfc61abfbc7e7321431a28054c9ac59ba1738fd5320b02',
}
]
Expand Down
24 changes: 12 additions & 12 deletions easybuild/easyconfigs/j/Java/Java-21.0.5.eb
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name = 'Java'
version = '21.0.5'
local_build = '11'
_java_version = '21'
_patch_version = '5'
_build_version = '11'
version = f'{_java_version}.0.{_patch_version}'

homepage = 'https://openjdk.org'
description = """Java Platform, Standard Edition (Java SE) lets you develop and deploy
Java applications on desktops and servers."""

toolchain = SYSTEM

local_tarball_tmpl = 'OpenJDK%%(version_major)sU-jdk_%s_linux_hotspot_%%(version)s_%s.tar.gz'
_tarball_tmpl = f'OpenJDK{_java_version}U-jdk_{{}}_linux_hotspot_{version}_{_build_version}.tar.gz'

# Using the Adoptium Eclipse Temurin builds, recommended by https://whichjdk.com/#distributions

source_urls = ['https://github.com/adoptium/temurin%%(version_major)s-binaries/releases/download/jdk-%%(version)s+%s/'
% local_build]
sources = [local_tarball_tmpl % ('%(jdkarch)s', local_build)]

source_urls = [f'https://github.com/adoptium/temurin{_java_version}-binaries/releases/download/'
f'jdk-{version}+{_build_version}/']
sources = [_tarball_tmpl.format('%(jdkarch)s')]
checksums = [
{
local_tarball_tmpl % ('x64', local_build):
_tarball_tmpl.format('x64'):
'3c654d98404c073b8a7e66bffb27f4ae3e7ede47d13284c132d40a83144bfd8c',
local_tarball_tmpl % ('aarch64', local_build):
_tarball_tmpl.format('aarch64'):
'6482639ed9fd22aa2e704cc366848b1b3e1586d2bf1213869c43e80bca58fe5c',
local_tarball_tmpl % ('ppc64le', local_build):
_tarball_tmpl.format('ppc64le'):
'3c6f4c358facfb6c19d90faf02bfe0fc7512d6b0e80ac18146bbd7e0d01deeef',
local_tarball_tmpl % ('riscv64', local_build):
_tarball_tmpl.format('riscv64'):
'2f1b3e401e36de803398dfb9818861f9f14ca8ae7db650ea0946ab048fefe3b9',
}
]
Expand Down

0 comments on commit 5fa154d

Please sign in to comment.