aur/liberica-jdk-21-lite-bin/PKGBUILD

82 lines
2.9 KiB
Bash
Raw Normal View History

2023-12-27 13:46:57 +01:00
# 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.5+11
2023-12-27 13:46:57 +01:00
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.'
2024-01-28 10:37:31 +01:00
arch=(x86_64)
2023-12-27 13:46:57 +01:00
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_x86_64=(https://download.bell-sw.com/java/$pkgver/bellsoft-jdk$pkgver-linux-amd64-lite.tar.gz)
# Upstream-provided
sha1sums_x86_64=('3d15ad4bb518d93e0bad6c2762d6e660c4325f78')
2023-12-27 13:46:57 +01:00
_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"
}