aur/nexus-oss/PKGBUILD

97 lines
5.6 KiB
Bash
Raw Normal View History

_version=3.67.1
_patch=01
2020-09-06 14:16:54 +02:00
pkgname=nexus-oss
pkgver=${_version}.${_patch}
pkgrel=1
2020-09-06 14:16:54 +02:00
pkgdesc='Nexus 3 Repository OSS'
arch=('any')
url='http://nexus.sonatype.org'
license=("custom:$pkgname")
2024-03-30 08:38:54 +01:00
depends=('java-runtime>=17')
2023-12-29 12:13:41 +01:00
makedepends=('zip')
2020-09-06 14:16:54 +02:00
replaces=('nexus3')
2022-01-02 10:37:09 +01:00
provides=('nexus3')
2020-09-06 14:16:54 +02:00
backup=("var/lib/$pkgname/etc/nexus.properties"
2021-08-15 21:37:32 +02:00
"usr/lib/$pkgname/bin/nexus.vmoptions"
)
2020-09-06 14:16:54 +02:00
source=("https://download.sonatype.com/nexus/3/nexus-$_version-$_patch-unix.tar.gz"
2021-08-15 21:37:32 +02:00
"$pkgname"
"$pkgname.properties"
"$pkgname.service"
"$pkgname.sysusers"
"$pkgname.tmpfiles"
"$pkgname.vmoptions"
"pref_jre.cfg"
2023-12-29 12:13:41 +01:00
"DefaultProductLicenseManager.class"
2024-04-06 11:11:17 +02:00
"https://repo1.maven.org/maven2/org/apache/aries/spifly/org.apache.aries.spifly.dynamic.framework.extension/1.3.7/org.apache.aries.spifly.dynamic.framework.extension-1.3.7.jar"
2021-08-15 21:37:32 +02:00
)
2024-04-07 11:28:21 +02:00
noextract=('org.apache.aries.spifly.dynamic.framework.extension-1.3.7.jar')
sha256sums=('23a4145bbe0edb1670a596c7019a74ac373ad6fd0a9c5c699c9568b62150d40b'
2023-08-03 09:18:28 +02:00
'3f34cf42929303219398c1e9f4e690579dcf0a7e176cf031e0f5173203eb802d'
2020-09-06 14:16:54 +02:00
'dcdef5614db12f38b3da0b9de1b52fb7fa402af6621a825981c6168a34a6ad9b'
'f74f500f93767afae47fffe3d2300628435cb2469a89e53c58f62fa60c730e8e'
2022-01-02 10:37:09 +01:00
'29567e274ffacb06e03580d94685b04aeb7197cd84a14108a347ad5307931be6'
2020-09-06 14:16:54 +02:00
'939994095f0c5de005a1e36a295bea791a70dadfa32af23b400cbd87be57af9c'
2022-01-02 10:37:09 +01:00
'176c02ba4299ad818eed75cdaeb42a2d9ffa7332fc74ff30b7c37965e7095df4'
2023-12-29 12:13:41 +01:00
'08a372b6601a4a3bce832f5d73f9d35e5b700984b9947b34bb679c39902e8804'
2024-04-06 11:11:17 +02:00
'4b5d4b116102cdc8b54e5921b1970195789a51750344aee4f070077d96cabd7d'
'944611d53f85dec763298a92fbdedba63937ec87f591d44f122d502dbe30fdeb')
2023-08-02 20:31:14 +02:00
prepare() {
2024-03-30 08:38:54 +01:00
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
2023-10-07 17:53:21 +02:00
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="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
2023-08-02 20:31:14 +02:00
sed -i '/eecap-16/i eecap-17 = 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", \\\
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", \\\
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
2024-03-30 08:38:54 +01:00
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
2023-10-07 17:53:21 +02:00
2023-12-29 12:13:41 +01:00
folder=org/sonatype/licensing/product/internal
mkdir -p $folder && cp DefaultProductLicenseManager.class $folder
zip -ur $srcdir/nexus-$_version-$_patch/system/com/sonatype/licensing/license-bundle/1.6.0/license-bundle-1.6.0.jar $folder/DefaultProductLicenseManager.class
2024-04-06 11:11:17 +02:00
rm -f $srcdir/nexus-$_version-$_patch/system/org/apache/aries/spifly/org.apache.aries.spifly.dynamic.framework.extension/1.3.6/*.jar
cp $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.6/org.apache.aries.spifly.dynamic.framework.extension-1.3.6.jar
2023-08-02 20:31:14 +02:00
}
2020-09-06 14:16:54 +02:00
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
}