extra/java-openjdk to 21.u35-7

This commit is contained in:
Kevin Mihelich 2023-11-04 18:06:53 +00:00
parent b6ad01c290
commit 4309ebead0
2 changed files with 285 additions and 45 deletions

197
extra/java-openjdk/.SRCINFO Normal file
View file

@ -0,0 +1,197 @@
pkgbase = java-openjdk
pkgver = 21.u35
pkgrel = 7
url = https://openjdk.java.net/
arch = x86_64
license = custom
makedepends = java-environment>=17
makedepends = cpio
makedepends = unzip
makedepends = zip
makedepends = libelf
makedepends = libcups
makedepends = libx11
makedepends = libxrender
makedepends = libxtst
makedepends = libxt
makedepends = libxext
makedepends = libxrandr
makedepends = alsa-lib
makedepends = pandoc
makedepends = graphviz
makedepends = freetype2
makedepends = libjpeg-turbo
makedepends = giflib
makedepends = libpng
makedepends = lcms2
makedepends = libnet
makedepends = bash
makedepends = harfbuzz
makedepends = gcc-libs
makedepends = glibc
options = !lto
source = https://github.com/openjdk/jdk21u/archive/jdk-21+35.tar.gz
source = freedesktop-java.desktop
source = freedesktop-jconsole.desktop
source = freedesktop-jshell.desktop
sha256sums = b798ebc2e899a98edf2be99e786bb0fbad144e2270925dffe624fbe052f07ade
sha256sums = 72111743ab6ab36854b0c85a504172983715d0798fce10bc4e35689b7d15fd93
sha256sums = 8ecdf5c1605bafa58b3f7da615e6d8d3d943e3a2d3831930d6efa7815aacce07
sha256sums = 50fc0d677489b73d549df2f08d759d5f057f200adbbab83ea5e87456152ee03e
pkgname = jre-openjdk-headless
pkgdesc = OpenJDK Java 21 headless runtime environment
install = install_jre-openjdk-headless.sh
depends = java-runtime-common>=3
depends = ca-certificates-utils
depends = nss
depends = libjpeg-turbo
depends = libjpeg.so
depends = lcms2
depends = liblcms2.so
depends = libnet
depends = freetype2
depends = libfreetype.so
depends = harfbuzz
depends = libharfbuzz.so
depends = glibc
depends = gcc-libs
optdepends = java-rhino: for some JavaScript support
provides = java-runtime-headless=21
provides = java-runtime-headless-openjdk=21
provides = jre21-openjdk-headless=21.u35-7
conflicts = jdk-openjdk
conflicts = jre-openjdk
backup = etc/java-openjdk/logging.properties
backup = etc/java-openjdk/management/jmxremote.access
backup = etc/java-openjdk/management/jmxremote.password.template
backup = etc/java-openjdk/management/management.properties
backup = etc/java-openjdk/net.properties
backup = etc/java-openjdk/security/java.policy
backup = etc/java-openjdk/security/java.security
backup = etc/java-openjdk/security/policy/README.txt
backup = etc/java-openjdk/security/policy/limited/default_US_export.policy
backup = etc/java-openjdk/security/policy/limited/default_local.policy
backup = etc/java-openjdk/security/policy/limited/exempt_local.policy
backup = etc/java-openjdk/security/policy/unlimited/default_US_export.policy
backup = etc/java-openjdk/security/policy/unlimited/default_local.policy
backup = etc/java-openjdk/sound.properties
pkgname = jre-openjdk
pkgdesc = OpenJDK Java 21 full runtime environment
install = install_jre-openjdk.sh
depends = java-runtime-common>=3
depends = ca-certificates-utils
depends = nss
depends = libjpeg-turbo
depends = libjpeg.so
depends = lcms2
depends = liblcms2.so
depends = libnet
depends = freetype2
depends = libfreetype.so
depends = harfbuzz
depends = libharfbuzz.so
depends = glibc
depends = gcc-libs
depends = giflib
depends = libgif.so
depends = libpng
optdepends = alsa-lib: for basic sound support
optdepends = gtk2: for the Gtk+ 2 look and feel - desktop usage
optdepends = gtk3: for the Gtk+ 3 look and feel - desktop usage
provides = java-runtime=21
provides = java-runtime-openjdk=21
provides = jre21-openjdk=21.u35-7
provides = java-runtime-headless=21
provides = java-runtime-headless-openjdk=21
provides = jre21-openjdk-headless=21.u35-7
conflicts = jdk-openjdk
conflicts = jre-openjdk-headless
backup = etc/java-openjdk/logging.properties
backup = etc/java-openjdk/management/jmxremote.access
backup = etc/java-openjdk/management/jmxremote.password.template
backup = etc/java-openjdk/management/management.properties
backup = etc/java-openjdk/net.properties
backup = etc/java-openjdk/security/java.policy
backup = etc/java-openjdk/security/java.security
backup = etc/java-openjdk/security/policy/README.txt
backup = etc/java-openjdk/security/policy/limited/default_US_export.policy
backup = etc/java-openjdk/security/policy/limited/default_local.policy
backup = etc/java-openjdk/security/policy/limited/exempt_local.policy
backup = etc/java-openjdk/security/policy/unlimited/default_US_export.policy
backup = etc/java-openjdk/security/policy/unlimited/default_local.policy
backup = etc/java-openjdk/sound.properties
pkgname = jdk-openjdk
pkgdesc = OpenJDK Java 21 development kit
install = install_jdk-openjdk.sh
depends = java-runtime-common>=3
depends = ca-certificates-utils
depends = nss
depends = libjpeg-turbo
depends = libjpeg.so
depends = lcms2
depends = liblcms2.so
depends = libnet
depends = freetype2
depends = libfreetype.so
depends = harfbuzz
depends = libharfbuzz.so
depends = glibc
depends = gcc-libs
depends = java-environment-common=3
depends = hicolor-icon-theme
depends = libelf
depends = libgif.so
depends = libpng
depends = ca-certificates-utils
depends = nss
depends = libjpeg-turbo
depends = libjpeg.so
depends = lcms2
depends = liblcms2.so
depends = libnet
depends = freetype2
depends = libfreetype.so
depends = harfbuzz
depends = libharfbuzz.so
optdepends = java-rhino: for some JavaScript support
optdepends = alsa-lib: for basic sound support
optdepends = gtk2: for the Gtk+ 2 look and feel - desktop usage
optdepends = gtk3: for the Gtk+ 3 look and feel - desktop usage
provides = java-environment=21
provides = java-environment-openjdk=21
provides = jdk21-openjdk=21.u35-7
provides = java-runtime=21
provides = java-runtime-openjdk=21
provides = jre21-openjdk=21.u35-7
provides = java-runtime-headless=21
provides = java-runtime-headless-openjdk=21
provides = jre21-openjdk-headless=21.u35-7
conflicts = jre-openjdk
conflicts = jre-openjdk-headless
backup = etc/java-openjdk/logging.properties
backup = etc/java-openjdk/management/jmxremote.access
backup = etc/java-openjdk/management/jmxremote.password.template
backup = etc/java-openjdk/management/management.properties
backup = etc/java-openjdk/net.properties
backup = etc/java-openjdk/security/java.policy
backup = etc/java-openjdk/security/java.security
backup = etc/java-openjdk/security/policy/README.txt
backup = etc/java-openjdk/security/policy/limited/default_US_export.policy
backup = etc/java-openjdk/security/policy/limited/default_local.policy
backup = etc/java-openjdk/security/policy/limited/exempt_local.policy
backup = etc/java-openjdk/security/policy/unlimited/default_US_export.policy
backup = etc/java-openjdk/security/policy/unlimited/default_local.policy
backup = etc/java-openjdk/sound.properties
pkgname = openjdk-src
pkgdesc = OpenJDK Java 21 sources
depends = jdk21-openjdk=21.u35-7
provides = openjdk21-src=21.u35-7
pkgname = openjdk-doc
pkgdesc = OpenJDK Java 21 documentation
depends = jdk21-openjdk=21.u35-7
provides = openjdk21-doc=21.u35-7

View file

@ -30,7 +30,7 @@ _securityver=0
_updatever=35
# pkgver=${_majorver}.${_minorver}.${_securityver}.u${_updatever}
pkgver=${_majorver}.u${_updatever}
pkgrel=3
pkgrel=7
# _git_tag=jdk-${_majorver}.${_minorver}.${_securityver}+${_updatever}
_git_tag=jdk-${_majorver}+${_updatever}
arch=('x86_64')
@ -70,12 +70,9 @@ _nonheadless=(lib/libawt_xawt.so
lib/libjsound.so
lib/libsplashscreen.so)
_nonjre=(lib/ct.sym
lib/libattach.so
lib/libsaproc.so
lib/lible.so
lib/src.zip)
_commondeps=('java-runtime-common>=3' 'ca-certificates-utils' 'nss' 'libjpeg-turbo' 'libjpeg.so'
'lcms2' 'liblcms2.so' 'libnet' 'freetype2' 'libfreetype.so' 'harfbuzz' 'libharfbuzz.so'
'glibc' 'gcc-libs')
build() {
cd ${_jdkdir}
@ -160,11 +157,10 @@ check() {
package_jre-openjdk-headless() {
pkgdesc="OpenJDK Java ${_majorver} headless runtime environment"
depends=('java-runtime-common>=3' 'ca-certificates-utils' 'nss' 'libjpeg-turbo' 'libjpeg.so'
'lcms2' 'liblcms2.so' 'libnet' 'freetype2' 'libfreetype.so' 'harfbuzz' 'libharfbuzz.so'
'glibc' 'gcc-libs')
depends=("${_commondeps[@]}")
optdepends=('java-rhino: for some JavaScript support')
provides=("java-runtime-headless=${_majorver}" "java-runtime-headless-openjdk=${_majorver}" "jre${_majorver}-openjdk-headless=${pkgver}-${pkgrel}")
conflicts=("jdk-openjdk" "jre-openjdk")
backup=(etc/${pkgbase}/logging.properties
etc/${pkgbase}/management/jmxremote.access
etc/${pkgbase}/management/jmxremote.password.template
@ -183,25 +179,15 @@ package_jre-openjdk-headless() {
cd ${_imgdir}/jre
install -dm 755 "${pkgdir}${_jvmdir}"/bin
install -dm 755 "${pkgdir}${_jvmdir}"
for i in $(ls bin/); do
cp ../jdk/bin/$i "${pkgdir}${_jvmdir}/bin/"
done
cp -a ../jdk/lib "${pkgdir}${_jvmdir}"
for f in "${_nonjre[@]}"; do
rm "${pkgdir}${_jvmdir}/${f}"
done
cp -a bin lib \
"${pkgdir}${_jvmdir}"
for f in "${_nonheadless[@]}"; do
rm "${pkgdir}${_jvmdir}/${f}"
done
cp ../jdk/release "${pkgdir}${_jvmdir}"
cp ../jdk/lib/modules "${pkgdir}${_jvmdir}/lib"
# Conf
install -dm 755 "${pkgdir}/etc"
cp -r conf "${pkgdir}/etc/${pkgbase}"
@ -228,32 +214,93 @@ package_jre-openjdk-headless() {
package_jre-openjdk() {
pkgdesc="OpenJDK Java ${_majorver} full runtime environment"
depends=("jre${_majorver}-openjdk-headless=${pkgver}-${pkgrel}" 'giflib' 'libgif.so'
'glibc' 'gcc-libs' 'libpng')
depends=("${_commondeps[@]}" 'giflib' 'libgif.so' 'libpng')
optdepends=('alsa-lib: for basic sound support'
'gtk2: for the Gtk+ 2 look and feel - desktop usage'
'gtk3: for the Gtk+ 3 look and feel - desktop usage')
provides=("java-runtime=${_majorver}" "java-runtime-openjdk=${_majorver}" "jre${_majorver}-openjdk=${pkgver}-${pkgrel}")
provides=("java-runtime=${_majorver}" "java-runtime-openjdk=${_majorver}" "jre${_majorver}-openjdk=${pkgver}-${pkgrel}"
"java-runtime-headless=${_majorver}" "java-runtime-headless-openjdk=${_majorver}" "jre${_majorver}-openjdk-headless=${pkgver}-${pkgrel}")
conflicts=("jdk-openjdk" "jre-openjdk-headless")
backup=(etc/${pkgbase}/logging.properties
etc/${pkgbase}/management/jmxremote.access
etc/${pkgbase}/management/jmxremote.password.template
etc/${pkgbase}/management/management.properties
etc/${pkgbase}/net.properties
etc/${pkgbase}/security/java.policy
etc/${pkgbase}/security/java.security
etc/${pkgbase}/security/policy/README.txt
etc/${pkgbase}/security/policy/limited/default_US_export.policy
etc/${pkgbase}/security/policy/limited/default_local.policy
etc/${pkgbase}/security/policy/limited/exempt_local.policy
etc/${pkgbase}/security/policy/unlimited/default_US_export.policy
etc/${pkgbase}/security/policy/unlimited/default_local.policy
etc/${pkgbase}/sound.properties)
install=install_jre-openjdk.sh
cd ${_imgdir}/jre
install -dm 755 "${pkgdir}${_jvmdir}"
cp -a bin lib \
"${pkgdir}${_jvmdir}"
for f in "${_nonheadless[@]}"; do
install -Dm 644 ${f} "${pkgdir}${_jvmdir}/${f}"
done
# Licenses
# Conf
install -dm 755 "${pkgdir}/etc"
cp -r conf "${pkgdir}/etc/${pkgbase}"
ln -s /etc/${pkgbase} "${pkgdir}/${_jvmdir}/conf"
# Legal
install -dm 755 "${pkgdir}/usr/share/licenses"
cp -r legal "${pkgdir}/usr/share/licenses/${pkgbase}"
ln -s ${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s /usr/share/licenses/${pkgbase} "${pkgdir}/${_jvmdir}/legal"
# Man pages
for f in bin/*; do
f=$(basename "${f}")
_man=../jdk/man/man1/"${f}.1"
test -f "${_man}" && install -Dm 644 "${_man}" "${pkgdir}/usr/share/man/man1/${f}-openjdk${_majorver}.1"
done
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"
}
package_jdk-openjdk() {
pkgdesc="OpenJDK Java ${_majorver} development kit"
depends=("jre${_majorver}-openjdk=${pkgver}-${pkgrel}" 'java-environment-common=3'
'hicolor-icon-theme' 'libelf' 'glibc' 'gcc-libs')
provides=("java-environment=${_majorver}" "java-environment-openjdk=${_majorver}" "jdk${_majorver}-openjdk=${pkgver}-${pkgrel}")
depends=("${_commondeps[@]}" 'java-environment-common=3'
'hicolor-icon-theme' 'libelf' 'libgif.so' 'libpng'
'ca-certificates-utils' 'nss' 'libjpeg-turbo' 'libjpeg.so'
'lcms2' 'liblcms2.so' 'libnet' 'freetype2' 'libfreetype.so' 'harfbuzz'
'libharfbuzz.so')
optdepends=('java-rhino: for some JavaScript support'
'alsa-lib: for basic sound support'
'gtk2: for the Gtk+ 2 look and feel - desktop usage'
'gtk3: for the Gtk+ 3 look and feel - desktop usage')
provides=("java-environment=${_majorver}" "java-environment-openjdk=${_majorver}" "jdk${_majorver}-openjdk=${pkgver}-${pkgrel}"
"java-runtime=${_majorver}" "java-runtime-openjdk=${_majorver}" "jre${_majorver}-openjdk=${pkgver}-${pkgrel}"
"java-runtime-headless=${_majorver}" "java-runtime-headless-openjdk=${_majorver}" "jre${_majorver}-openjdk-headless=${pkgver}-${pkgrel}")
conflicts=("jre-openjdk" "jre-openjdk-headless")
backup=(etc/${pkgbase}/logging.properties
etc/${pkgbase}/management/jmxremote.access
etc/${pkgbase}/management/jmxremote.password.template
etc/${pkgbase}/management/management.properties
etc/${pkgbase}/net.properties
etc/${pkgbase}/security/java.policy
etc/${pkgbase}/security/java.security
etc/${pkgbase}/security/policy/README.txt
etc/${pkgbase}/security/policy/limited/default_US_export.policy
etc/${pkgbase}/security/policy/limited/default_local.policy
etc/${pkgbase}/security/policy/limited/exempt_local.policy
etc/${pkgbase}/security/policy/unlimited/default_US_export.policy
etc/${pkgbase}/security/policy/unlimited/default_local.policy
etc/${pkgbase}/sound.properties)
install=install_jdk-openjdk.sh
cd ${_imgdir}/jdk
@ -265,32 +312,28 @@ package_jdk-openjdk() {
rm "${pkgdir}${_jvmdir}/lib/src.zip"
# Remove files held by JRE
pushd ../jre
for d in bin lib; do
find ${d} ! -type d -exec rm "${pkgdir}${_jvmdir}/{}" \;
done
popd
find "${pkgdir}${_jvmdir}/lib" -type d -empty -delete
# Conf files all belong to JRE
# Conf
install -dm 755 "${pkgdir}/etc"
cp -r conf "${pkgdir}/etc/${pkgbase}"
ln -s /etc/${pkgbase} "${pkgdir}/${_jvmdir}/conf"
# Legal
install -dm 755 "${pkgdir}/usr/share/licenses"
cp -r legal "${pkgdir}/usr/share/licenses/${pkgbase}"
pushd ../jre/legal
find . ! -type d -exec rm "${pkgdir}/usr/share/licenses/${pkgbase}/{}" \;
popd
find "${pkgdir}/usr/share/licenses" -type d -empty -delete
ln -s ${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s /usr/share/licenses/${pkgbase} "${pkgdir}/${_jvmdir}/legal"
# Man pages
for f in bin/*; do
f=$(basename "${f}")
_man=man/man1/"${f}.1"
test -f "../jre/bin/${f}" && continue
_man=../jdk/man/man1/"${f}.1"
test -f "${_man}" && install -Dm 644 "${_man}" "${pkgdir}/usr/share/man/man1/${f}-openjdk${_majorver}.1"
done
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"
# Icons
for s in 16 24 32 48; do