From 679e2f91b162deb6a1e0263a8a230ff036f9d64b Mon Sep 17 00:00:00 2001 From: NullBite Date: Sat, 17 Jun 2023 18:35:42 -0400 Subject: [PATCH] Initial commit --- .SRCINFO | 18 ++++++++++++ PKGBUILD | 51 ++++++++++++++++++++++++++++++++++ packwiz-installer-bootstrap.sh | 2 ++ packwiz-installer.sh | 2 ++ 4 files changed, 73 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100755 packwiz-installer-bootstrap.sh create mode 100755 packwiz-installer.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..bad7371 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = packwiz-installer + pkgdesc = An installer for packwiz modpacks. + pkgver = 0.5.10 + pkgrel = 1 + url = https://github.com/packwiz/packwiz-installer + arch = any + license = MIT + makedepends = git + makedepends = java-environment-openjdk<=11 + depends = java-environment + source = packwiz-installer::git+https://github.com/packwiz/packwiz-installer.git#tag=v0.5.10 + source = packwiz-installer-bootstrap::git+https://github.com/packwiz/packwiz-installer-bootstrap.git#tag=v0.0.3 + source = packwiz-installer.sh + sha256sums = SKIP + sha256sums = SKIP + sha256sums = 924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d + +pkgname = packwiz-installer diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..a6facbc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: NullBite +pkgname=packwiz-installer +pkgver=0.5.10 +pkgrel=1 +pkgdesc="An installer for packwiz modpacks." +arch=("any") +url="https://github.com/packwiz/packwiz-installer" +license=("MIT") +depends=('java-environment') +makedepends=('git' +'java-environment-openjdk<=11') +source=("$pkgname::git+https://github.com/packwiz/$pkgname.git#tag=v$pkgver" +"$pkgname-bootstrap::git+https://github.com/packwiz/$pkgname-bootstrap.git#tag=v0.0.3" +"packwiz-installer.sh" +"packwiz-installer-bootstrap.sh") +sha256sums=('SKIP' + 'SKIP' + '924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d' + '783990641e80a1b6603264d420ccf0ab6ad5a5c519e05a27162472c1746630cd') + +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-11-openjdk/bin:/usr/lib/jvm/java-8-openjdk/bin${PATH:+:${PATH}}" + export PATH + cd "$srcdir/$pkgname" + ./gradlew buildNeeded + + cd "$srcdir/$pkgname-bootstrap" + ./gradlew buildNeeded + ) +} + +package() { + cd "$srcdir/$pkgname" + install -Dm644 build/dist/packwiz-installer.jar "${pkgdir}/usr/share/java/packwiz/packwiz-installer.jar" + + cd "$srcdir/$pkgname-bootstrap" + install -Dm644 build/libs/packwiz-installer-bootstrap-all.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-bootstrap.sh "${pkgdir}/usr/bin/packwiz-installer-bootstrap" +} diff --git a/packwiz-installer-bootstrap.sh b/packwiz-installer-bootstrap.sh new file mode 100755 index 0000000..b90d1ea --- /dev/null +++ b/packwiz-installer-bootstrap.sh @@ -0,0 +1,2 @@ +#!/bin/bash +java -jar /usr/share/java/packwiz/packwiz-installer-bootstrap.jar "$@" diff --git a/packwiz-installer.sh b/packwiz-installer.sh new file mode 100755 index 0000000..db1b466 --- /dev/null +++ b/packwiz-installer.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec java -jar /usr/share/java/packwiz/packwiz-installer-bootstrap.jar --bootstrap-no-update --bootstrap-main-jar /usr/share/java/packwiz/packwiz-installer.jar "$@"