aur/nexus-oss/PKGBUILD
nyyu 6c9cb62f5f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/cron/woodpecker Pipeline was successful
feat(nexus): java 23 support
2024-09-30 08:40:15 +02:00

90 lines
5.0 KiB
Bash

_version=3.72.0
_patch=04
pkgname=nexus-oss
pkgver=${_version}.${_patch}
pkgrel=2
pkgdesc='Nexus 3 Repository OSS'
arch=('any')
url='http://nexus.sonatype.org'
license=("custom:$pkgname")
depends=('java-runtime>=17')
makedepends=('zip')
replaces=('nexus3')
provides=('nexus3')
backup=("var/lib/$pkgname/etc/nexus.properties"
"usr/lib/$pkgname/bin/nexus.vmoptions"
)
source=("https://download.sonatype.com/nexus/3/nexus-$_version-$_patch-unix.tar.gz"
"$pkgname"
"$pkgname.properties"
"$pkgname.service"
"$pkgname.sysusers"
"$pkgname.tmpfiles"
"$pkgname.vmoptions"
"pref_jre.cfg"
"https://nexus.nyyu.dev/repository/files/jar/org.apache.aries.spifly.dynamic.framework.extension-1.3.7.jar"
)
noextract=('org.apache.aries.spifly.dynamic.framework.extension-1.3.7.jar')
sha256sums=('45148c0645ab0611f6881b782b83e9dab0dbfb1b848e9b95ebaeb274c708a1c0'
'3f34cf42929303219398c1e9f4e690579dcf0a7e176cf031e0f5173203eb802d'
'dcdef5614db12f38b3da0b9de1b52fb7fa402af6621a825981c6168a34a6ad9b'
'f74f500f93767afae47fffe3d2300628435cb2469a89e53c58f62fa60c730e8e'
'29567e274ffacb06e03580d94685b04aeb7197cd84a14108a347ad5307931be6'
'939994095f0c5de005a1e36a295bea791a70dadfa32af23b400cbd87be57af9c'
'176c02ba4299ad818eed75cdaeb42a2d9ffa7332fc74ff30b7c37965e7095df4'
'08a372b6601a4a3bce832f5d73f9d35e5b700984b9947b34bb679c39902e8804'
'1215f14761c65121f5c7360c68c4ed12ffd6b710e88e51a104c29df09924dea0')
prepare() {
sed -i '/eecap-18/i eecap-23 = 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,23.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,23.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,23.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,23.0"' $srcdir/nexus-$_version-$_patch/etc/karaf/config.properties
sed -i '/eecap-18/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-18/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="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", \\\
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", \\\
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"' $srcdir/nexus-$_version-$_patch/etc/karaf/config.properties
sed -i '/jre-19 = ${jre-18}/a jre-20 = ${jre-19}\njre-21 = ${jre-20}\njre-22 = ${jre-21}\njre-23 = ${jre-22}' $srcdir/nexus-$_version-$_patch/etc/karaf/jre.properties
cp -f $srcdir/org.apache.aries.spifly.dynamic.framework.extension-1.3.7.jar $srcdir/nexus-$_version-$_patch/system/org/apache/aries/spifly/org.apache.aries.spifly.dynamic.framework.extension/1.3.7/
}
package() {
install -dm755 $pkgdir/usr/lib
install -dm750 $pkgdir/var/lib/$pkgname
cp -a $srcdir/nexus-$_version-$_patch $pkgdir/usr/lib/$pkgname
pushd $pkgdir/usr/lib/$pkgname
rm -rf bin/nexus.rc \
bin/contrib \
LICENSE.txt
popd
install -Dm640 $srcdir/$pkgname.properties $pkgdir/var/lib/$pkgname/etc/nexus.properties
install -Dm644 $srcdir/nexus-$_version-$_patch/OSS-LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
install -Dm755 $srcdir/$pkgname $pkgdir/usr/bin/$pkgname
install -Dm644 $srcdir/$pkgname.vmoptions $pkgdir/usr/lib/$pkgname/bin/nexus.vmoptions
install -Dm644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
install -Dm644 $pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -m644 pref_jre.cfg $pkgdir/usr/lib/$pkgname/.install4j
chmod -R o-rwx $pkgdir/var/lib/$pkgname
}