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:
parent
fb0b5a0512
commit
5a0f5a44a9
10
.SRCINFO
10
.SRCINFO
@ -5,14 +5,12 @@ pkgbase = packwiz-installer
|
||||
url = https://github.com/packwiz/packwiz-installer
|
||||
arch = any
|
||||
license = MIT
|
||||
makedepends = git
|
||||
makedepends = java-environment<=11
|
||||
depends = java-runtime
|
||||
source = packwiz-installer::git+https://github.com/packwiz/packwiz-installer.git#tag=1ebb28c3ccea4bdd9df38615182826f564d7966e
|
||||
source = packwiz-installer-bootstrap::git+https://github.com/packwiz/packwiz-installer-bootstrap.git#tag=fc4cd603d04d08c09fcd83cadb9ceedf776831e7
|
||||
source = packwiz-installer.jar::https://github.com/packwiz/packwiz-installer/releases/download/v0.5.13/packwiz-installer.jar
|
||||
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
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = 3cc3ebd57f1ec54a8ceaccc76e193201f8c957c563c9461253d112c5b087d744
|
||||
sha256sums = a8fbb24dc604278e97f4688e82d3d91a318b98efc08d5dbfcbcbcab6443d116c
|
||||
sha256sums = 924aff17bf4ad5fd745c5378d39ec883f685a9b0f4f754828cd99bc83c71df6d
|
||||
|
||||
pkgname = packwiz-installer
|
||||
|
48
PKGBUILD
48
PKGBUILD
@ -7,53 +7,21 @@ arch=("any")
|
||||
url="https://github.com/packwiz/packwiz-installer"
|
||||
license=("MIT")
|
||||
depends=('java-runtime')
|
||||
makedepends=('git'
|
||||
'java-environment<=11')
|
||||
_tag=1ebb28c3ccea4bdd9df38615182826f564d7966e # git rev-parse v${pkgver}
|
||||
_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"
|
||||
_version_bootstrap=0.0.3
|
||||
source=("packwiz-installer.jar::$url/releases/download/v$pkgver/packwiz-installer.jar"
|
||||
"packwiz-installer-bootstrap.jar::$url-bootstrap/releases/download/v$_version_bootstrap/packwiz-installer-bootstrap.jar"
|
||||
"packwiz-installer.sh")
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
sha256sums=('3cc3ebd57f1ec54a8ceaccc76e193201f8c957c563c9461253d112c5b087d744'
|
||||
'a8fbb24dc604278e97f4688e82d3d91a318b98efc08d5dbfcbcbcab6443d116c'
|
||||
'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() {
|
||||
cd "$srcdir/$pkgname"
|
||||
install -Dm644 build/dist/packwiz-installer.jar \
|
||||
cd "$srcdir"
|
||||
install -Dm644 packwiz-installer.jar \
|
||||
"${pkgdir}/usr/share/java/packwiz/packwiz-installer.jar"
|
||||
|
||||
cd "$srcdir/$pkgname-bootstrap"
|
||||
install -Dm644 build/libs/packwiz-installer-bootstrap-all.jar \
|
||||
install -Dm644 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"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user