feat(nexus): support jdk22

This commit is contained in:
nyyu 2024-03-30 08:38:54 +01:00
parent 441e73e04f
commit 629978edac
2 changed files with 12 additions and 5 deletions

View File

@ -1,12 +1,12 @@
pkgbase = nexus-oss pkgbase = nexus-oss
pkgdesc = Nexus 3 Repository OSS pkgdesc = Nexus 3 Repository OSS
pkgver = 3.66.0.02 pkgver = 3.66.0.02
pkgrel = 1 pkgrel = 2
url = http://nexus.sonatype.org url = http://nexus.sonatype.org
arch = any arch = any
license = custom:nexus-oss license = custom:nexus-oss
makedepends = zip makedepends = zip
depends = java-runtime=21 depends = java-runtime>=17
provides = nexus3 provides = nexus3
replaces = nexus3 replaces = nexus3
backup = var/lib/nexus-oss/etc/nexus.properties backup = var/lib/nexus-oss/etc/nexus.properties

View File

@ -3,12 +3,12 @@ _patch=02
pkgname=nexus-oss pkgname=nexus-oss
pkgver=${_version}.${_patch} pkgver=${_version}.${_patch}
pkgrel=1 pkgrel=2
pkgdesc='Nexus 3 Repository OSS' pkgdesc='Nexus 3 Repository OSS'
arch=('any') arch=('any')
url='http://nexus.sonatype.org' url='http://nexus.sonatype.org'
license=("custom:$pkgname") license=("custom:$pkgname")
depends=('java-runtime=21') depends=('java-runtime>=17')
makedepends=('zip') makedepends=('zip')
replaces=('nexus3') replaces=('nexus3')
provides=('nexus3') provides=('nexus3')
@ -36,6 +36,13 @@ sha256sums=('9bfad380ce69b42537d91aedd6f3c9a62516bd458f6c088eaa51601dfc7ef31e'
'4b5d4b116102cdc8b54e5921b1970195789a51750344aee4f070077d96cabd7d') '4b5d4b116102cdc8b54e5921b1970195789a51750344aee4f070077d96cabd7d')
prepare() { prepare() {
sed -i '/eecap-16/i eecap-22 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \\\
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0", \\\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \\\
osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0", \\\
osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0", \\\
osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0"' $srcdir/nexus-$_version-$_patch/etc/karaf/config.properties
sed -i '/eecap-16/i eecap-21 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \\\ sed -i '/eecap-16/i eecap-21 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \\\
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0", \\\ osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0", \\\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \\\ osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \\\
@ -50,7 +57,7 @@ prepare() {
osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0", \\\ osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0", \\\
osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0"' $srcdir/nexus-$_version-$_patch/etc/karaf/config.properties osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0"' $srcdir/nexus-$_version-$_patch/etc/karaf/config.properties
sed -i '/jre-19 = ${jre-18}/a jre-20 = ${jre-19}\njre-21 = ${jre-20}' $srcdir/nexus-$_version-$_patch/etc/karaf/jre.properties sed -i '/jre-19 = ${jre-18}/a jre-20 = ${jre-19}\njre-21 = ${jre-20}\njre-22 = ${jre-21}' $srcdir/nexus-$_version-$_patch/etc/karaf/jre.properties
folder=org/sonatype/licensing/product/internal folder=org/sonatype/licensing/product/internal
mkdir -p $folder && cp DefaultProductLicenseManager.class $folder mkdir -p $folder && cp DefaultProductLicenseManager.class $folder