_version=3.58.1 _patch=02 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') 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" ) sha256sums=('0a59c68b8575986dead842dd1f373b09e7fdeac549635f1bc6ac54cbe13e1391' '637527929c84904d1689c86e047925375b63f41021a6225c24555499d919ca76' 'dcdef5614db12f38b3da0b9de1b52fb7fa402af6621a825981c6168a34a6ad9b' 'f74f500f93767afae47fffe3d2300628435cb2469a89e53c58f62fa60c730e8e' '29567e274ffacb06e03580d94685b04aeb7197cd84a14108a347ad5307931be6' '939994095f0c5de005a1e36a295bea791a70dadfa32af23b400cbd87be57af9c' '176c02ba4299ad818eed75cdaeb42a2d9ffa7332fc74ff30b7c37965e7095df4' 'b57a14b2462899a8b5c03e1b721e6fcae594934dcf0c4be842692b276d6700ae') prepare() { sed -i '/eecap-16/i eecap-17 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \\\ osgi.ee; osgi.ee="JavaSE"; version:List="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", \\\ osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \\\ osgi.ee; osgi.ee="JavaSE/compact1"; version:List="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="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="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 } 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 }