feat: add liberica-jdk-21-lite-bin
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
nyyu 2023-12-27 13:46:57 +01:00
parent 3f260bb652
commit 0ab5d9a447
3 changed files with 187 additions and 0 deletions

View file

@ -0,0 +1,48 @@
pkgbase = liberica-jdk-21-lite-bin
pkgdesc = BellSoft builds of OpenJDK are fully certified and 100% open source Java Development Kits (JDKs) for all Java development and production workloads. Lite version has compressed modules.
pkgver = 21.0.1+12
pkgrel = 1
url = https://bell-sw.com/
install = liberica-jdk-21-lite.install
arch = aarch64
arch = armv7h
arch = armv8h
arch = i686
arch = x86_64
license = custom
depends = java-runtime-common>=3
depends = ca-certificates-utils
provides = java-environment=21
provides = java-environment-openjdk=21
provides = java-runtime-headless=21
provides = java-runtime-headless-openjdk=21
provides = java-runtime=21
provides = java-runtime-openjdk=21
provides = liberica-jdk-21-bin=21.0.1+12
provides = liberica-jre-21-bin=21.0.1+12
backup = etc/liberica-jdk-21-lite/logging.properties
backup = etc/liberica-jdk-21-lite/management/jmxremote.access
backup = etc/liberica-jdk-21-lite/management/jmxremote.password.template
backup = etc/liberica-jdk-21-lite/management/management.properties
backup = etc/liberica-jdk-21-lite/net.properties
backup = etc/liberica-jdk-21-lite/security/java.policy
backup = etc/liberica-jdk-21-lite/security/java.security
backup = etc/liberica-jdk-21-lite/security/policy/README.txt
backup = etc/liberica-jdk-21-lite/security/policy/limited/default_US_export.policy
backup = etc/liberica-jdk-21-lite/security/policy/limited/default_local.policy
backup = etc/liberica-jdk-21-lite/security/policy/limited/exempt_local.policy
backup = etc/liberica-jdk-21-lite/security/policy/unlimited/default_US_export.policy
backup = etc/liberica-jdk-21-lite/security/policy/unlimited/default_local.policy
backup = etc/liberica-jdk-21-lite/sound.properties
source_aarch64 = https://download.bell-sw.com/java/21.0.1+12/bellsoft-jdk21.0.1+12-linux-aarch64-lite.tar.gz
sha1sums_aarch64 = 8544d5e9a0a04feda436491cfa4314bc3091a915
source_armv7h = https://download.bell-sw.com/java/21.0.1+12/bellsoft-jdk21.0.1+12-linux-arm32-vfp-hflt-lite.tar.gz
sha1sums_armv7h = 770be994d645e6c15d0efaa80be7ddd47f16d2f7
source_armv8h = https://download.bell-sw.com/java/21.0.1+12/bellsoft-jdk21.0.1+12-linux-arm32-vfp-hflt-lite.tar.gz
sha1sums_armv8h = 770be994d645e6c15d0efaa80be7ddd47f16d2f7
source_i686 = https://download.bell-sw.com/java/21.0.1+12/bellsoft-jdk21.0.1+12-linux-i586-lite.tar.gz
sha1sums_i686 = c7c0ee300f2cbdd34ba1b2b16facdfa98aac7064
source_x86_64 = https://download.bell-sw.com/java/21.0.1+12/bellsoft-jdk21.0.1+12-linux-amd64-lite.tar.gz
sha1sums_x86_64 = f548443f05f423947225a41c2f37198113059d16
pkgname = liberica-jdk-21-lite-bin

View file

@ -0,0 +1,89 @@
# Maintainer: Bacteriostat <dev dot bacteriostat at aleeas dot com>
# Contributor: Jonathon Fernyhough <jonathon"m2x+dev>
# Contributor: Sam Guymer <sam at guymer dot me>
# This PKGBUILD adapted from zulu-11-bin
_jdkname=liberica-jdk-21-lite
pkgname="${_jdkname}-bin"
_java_ver=21
pkgver=21.0.1+12
pkgrel=1
pkgdesc='BellSoft builds of OpenJDK are fully certified and 100% open source Java Development Kits (JDKs) for all Java development and production workloads. Lite version has compressed modules.'
arch=(aarch64 armv7h armv8h i686 x86_64)
url='https://bell-sw.com/'
license=('custom')
depends=('java-runtime-common>=3' 'ca-certificates-utils')
provides=(
"java-environment=$_java_ver"
"java-environment-openjdk=$_java_ver"
"java-runtime-headless=$_java_ver"
"java-runtime-headless-openjdk=$_java_ver"
"java-runtime=$_java_ver"
"java-runtime-openjdk=$_java_ver"
"liberica-jdk-21-bin=$pkgver"
"liberica-jre-21-bin=$pkgver"
)
install=$_jdkname.install
backup=(etc/${_jdkname}/logging.properties
etc/${_jdkname}/management/jmxremote.access
etc/${_jdkname}/management/jmxremote.password.template
etc/${_jdkname}/management/management.properties
etc/${_jdkname}/net.properties
etc/${_jdkname}/security/java.policy
etc/${_jdkname}/security/java.security
etc/${_jdkname}/security/policy/README.txt
etc/${_jdkname}/security/policy/limited/default_US_export.policy
etc/${_jdkname}/security/policy/limited/default_local.policy
etc/${_jdkname}/security/policy/limited/exempt_local.policy
etc/${_jdkname}/security/policy/unlimited/default_US_export.policy
etc/${_jdkname}/security/policy/unlimited/default_local.policy
etc/${_jdkname}/sound.properties)
source_aarch64=(https://download.bell-sw.com/java/$pkgver/bellsoft-jdk$pkgver-linux-aarch64-lite.tar.gz)
source_armv7h=(https://download.bell-sw.com/java/$pkgver/bellsoft-jdk$pkgver-linux-arm32-vfp-hflt-lite.tar.gz)
source_armv8h=(${source_armv7h[@]})
source_i686=(https://download.bell-sw.com/java/$pkgver/bellsoft-jdk$pkgver-linux-i586-lite.tar.gz)
source_x86_64=(https://download.bell-sw.com/java/$pkgver/bellsoft-jdk$pkgver-linux-amd64-lite.tar.gz)
# Upstream-provided
sha1sums_aarch64=('8544d5e9a0a04feda436491cfa4314bc3091a915')
sha1sums_armv7h=('770be994d645e6c15d0efaa80be7ddd47f16d2f7')
sha1sums_armv8h=('770be994d645e6c15d0efaa80be7ddd47f16d2f7')
sha1sums_i686=('c7c0ee300f2cbdd34ba1b2b16facdfa98aac7064')
sha1sums_x86_64=('f548443f05f423947225a41c2f37198113059d16')
_jvmdir="/usr/lib/jvm/${_jdkname}"
package() {
cd jdk-${pkgver/+*/}-lite
install -dm 755 "${pkgdir}/${_jvmdir}"
cp -a . "${pkgdir}/${_jvmdir}/"
# copied from java11-openjdk
# Conf
install -dm 755 "${pkgdir}/etc"
cp -r conf "${pkgdir}/etc/${_jdkname}"
rm -rf "${pkgdir}/${_jvmdir}/conf"
ln -s "/etc/${_jdkname}" "${pkgdir}/${_jvmdir}/conf"
# Legal
install -dm 755 "${pkgdir}/usr/share/licenses"
cp -r legal "${pkgdir}/usr/share/licenses/${_jdkname}"
rm -rf "${pkgdir}/${_jvmdir}/legal"
ln -s "/usr/share/licenses/${_jdkname}" "${pkgdir}/${_jvmdir}/legal"
# Man pages
#for f in man/man1/* man/ja/man1/*; do
# install -Dm 644 "${f}" "${pkgdir}/usr/share/${f/\.1/-$_jdkname.1}"
#done
#rm -rf "${pkgdir}/${_jvmdir}/man"
#ln -s /usr/share/man "${pkgdir}/${_jvmdir}/man"
# Link JKS keystore from ca-certificates-utils
rm -f "${pkgdir}/${_jvmdir}/lib/security/cacerts"
ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}/${_jvmdir}/lib/security/cacerts"
}

View file

@ -0,0 +1,50 @@
THIS_JDK='liberica-jdk-21-lite'
fix_default() {
if [ ! -x /usr/bin/java ]; then
/usr/bin/archlinux-java unset
echo ""
else
/usr/bin/archlinux-java get
fi
}
post_install() {
default=$(fix_default)
case ${default} in
"" | ${THIS_JDK}/jre)
/usr/bin/archlinux-java set ${THIS_JDK}
;;
${THIS_JDK})
# Nothing
;;
*)
echo "Default Java environment is already set to '${default}'"
echo "See 'archlinux-java help' to change it"
;;
esac
if [ ! -f /etc/ssl/certs/java/cacerts ]; then
/usr/bin/update-ca-trust
fi
}
post_upgrade() {
default=$(fix_default)
if [ -z "${default}" -o "x${default}" = "x${THIS_JDK}/jre" ]; then
/usr/bin/archlinux-java set ${THIS_JDK}
fi
if [ ! -f /etc/ssl/certs/java/cacerts ]; then
/usr/bin/update-ca-trust
fi
}
pre_remove() {
if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then
/usr/bin/archlinux-java unset
if [ -x /usr/lib/jvm/${THIS_JDK}/jre/bin/java ]; then
/usr/bin/archlinux-java set ${THIS_JDK}/jre
fi
fi
}