Use prebuilt packwiz builds

There's no need to build these from source. Normally, prebuilt packages
should be suffixed with -bin; but Java packages are an exception to
this. This also makes maintenance slightly easier.

From https://wiki.archlinux.org/title/AUR_submission_guidelines#Rules_of_submission:
    Packages that use prebuilt deliverables, when the sources are
    available, must use the -bin suffix. An exception to this is with
    Java.
This commit is contained in:
NullBite 2023-12-18 21:03:56 -05:00
parent fb0b5a0512
commit 5a0f5a44a9
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 12 additions and 46 deletions

View File

@ -5,14 +5,12 @@ pkgbase = packwiz-installer
url = https://github.com/packwiz/packwiz-installer url = https://github.com/packwiz/packwiz-installer
arch = any arch = any
license = MIT license = MIT
makedepends = git
makedepends = java-environment<=11
depends = java-runtime depends = java-runtime
source = packwiz-installer::git+https://github.com/packwiz/packwiz-installer.git#tag=1ebb28c3ccea4bdd9df38615182826f564d7966e source = packwiz-installer.jar::https://github.com/packwiz/packwiz-installer/releases/download/v0.5.13/packwiz-installer.jar
source = packwiz-installer-bootstrap::git+https://github.com/packwiz/packwiz-installer-bootstrap.git#tag=fc4cd603d04d08c09fcd83cadb9ceedf776831e7 source = packwiz-installer-bootstrap.jar::https://github.com/packwiz/packwiz-installer-bootstrap/releases/download/v0.0.3/packwiz-installer-bootstrap.jar
source = packwiz-installer.sh source = packwiz-installer.sh
sha256sums = SKIP sha256sums = 3cc3ebd57f1ec54a8ceaccc76e193201f8c957c563c9461253d112c5b087d744
sha256sums = SKIP sha256sums = a8fbb24dc604278e97f4688e82d3d91a318b98efc08d5dbfcbcbcab6443d116c
sha256sums = 924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d sha256sums = 924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d
pkgname = packwiz-installer pkgname = packwiz-installer

View File

@ -7,53 +7,21 @@ arch=("any")
url="https://github.com/packwiz/packwiz-installer" url="https://github.com/packwiz/packwiz-installer"
license=("MIT") license=("MIT")
depends=('java-runtime') depends=('java-runtime')
makedepends=('git' _version_bootstrap=0.0.3
'java-environment<=11') source=("packwiz-installer.jar::$url/releases/download/v$pkgver/packwiz-installer.jar"
_tag=1ebb28c3ccea4bdd9df38615182826f564d7966e # git rev-parse v${pkgver} "packwiz-installer-bootstrap.jar::$url-bootstrap/releases/download/v$_version_bootstrap/packwiz-installer-bootstrap.jar"
_tag_bootstrap=fc4cd603d04d08c09fcd83cadb9ceedf776831e7
source=("$pkgname::git+https://github.com/packwiz/$pkgname.git#tag=$_tag"
"$pkgname-bootstrap::git+https://github.com/packwiz/$pkgname-bootstrap.git#tag=$_tag_bootstrap"
"packwiz-installer.sh") "packwiz-installer.sh")
sha256sums=('SKIP' sha256sums=('3cc3ebd57f1ec54a8ceaccc76e193201f8c957c563c9461253d112c5b087d744'
'SKIP' 'a8fbb24dc604278e97f4688e82d3d91a318b98efc08d5dbfcbcbcab6443d116c'
'924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d') '924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d')
pkgver() {
cd ${pkgname}
git describe --tags | sed 's/^v//'
}
prepare() {
cd "$srcdir/$pkgname-bootstrap"
chmod +x gradlew
}
build() {
# subshell for isolated environment, as to not alter PATH for the rest
# of the build
(
# attempt to locate compatible JDK version for building, then
# fall back to default JDK
PATH="/usr/lib/jvm/java-8-openjdk/bin${PATH:+:${PATH}}"
PATH="/usr/lib/jvm/java-11-openjdk/bin${PATH:+:${PATH}}"
export PATH
cd "$srcdir/$pkgname"
./gradlew buildNeeded
cd "$srcdir/$pkgname-bootstrap"
./gradlew buildNeeded
)
}
package() { package() {
cd "$srcdir/$pkgname" cd "$srcdir"
install -Dm644 build/dist/packwiz-installer.jar \ install -Dm644 packwiz-installer.jar \
"${pkgdir}/usr/share/java/packwiz/packwiz-installer.jar" "${pkgdir}/usr/share/java/packwiz/packwiz-installer.jar"
cd "$srcdir/$pkgname-bootstrap" install -Dm644 packwiz-installer-bootstrap.jar \
install -Dm644 build/libs/packwiz-installer-bootstrap-all.jar \
"${pkgdir}/usr/share/java/packwiz/packwiz-installer-bootstrap.jar" "${pkgdir}/usr/share/java/packwiz/packwiz-installer-bootstrap.jar"
cd "$srcdir"
install -Dm755 packwiz-installer.sh "${pkgdir}/usr/bin/packwiz-installer" install -Dm755 packwiz-installer.sh "${pkgdir}/usr/bin/packwiz-installer"
} }