Package Details: modsman 0.32.1-4

Git Clone URL: https://aur.archlinux.org/modsman.git (read-only, click to copy)
Package Base: modsman
Description: Minecraft mod manager and updater for the CLI
Upstream URL: https://github.com/sargunv/modsman
Licenses: GPL3
Submitter: Nayla
Maintainer: Nayla (cobaltspace)
Last Packager: cobaltspace
Votes: 1
Popularity: 0.000000
First Submitted: 2020-10-25 20:14 (UTC)
Last Updated: 2020-12-04 21:30 (UTC)

Dependencies (4)

Required by (0)

Sources (1)

Latest Comments

Nayla commented on 2020-12-01 21:48 (UTC)

+cobaltspace

  1. I agree their was too many steps.
  2. Fair enough
  3. Also fair point I did forget jdk
  4. I’ll maintain them all bad irs what I always have done.
  5. Fair.
  6. Also fair.

I’ll merge it later

cobaltspace commented on 2020-12-01 21:41 (UTC) (edited on 2020-12-01 22:09 (UTC) by cobaltspace)

There are way too many steps in this pkgbuild. You can specify the tag directly in the sources. You don't need to use distZip, installDist creates the same files without zipping them. A java environment is needed to build this. You don't need to conflict with -bin and -git. It is their responsibility to provide and conflict with this. The startup script should just be provided as a file in this repo and listed as a source, but it can be entirely replaced with a symbolic link. Gradle already sets the correct permissions. Fixing all this results in this PKGBUILD:

# Maintainer: Cranky Supertoon <crankysupertoon at gmail dot com>
# Contributer: Cobalt Space <cobaltspace at protonmail dot com>
pkgname=modsman
pkgver=0.32.1
pkgrel=4
arch=('x86_64')
pkgdesc="Minecraft mod manager and updater for the CLI"
url='https://github.com/sargunv/modsman'
license=('GPL3')
makedepends=('gendesk' 'git' 'java-environment=8')
depends=('java-runtime=8')
source=("$pkgname::git+$url.git#tag=$pkgver")
md5sums=('SKIP')

build() {
    cd "$srcdir/$pkgname"
    JAVA_HOME=/usr/lib/jvm/java-8-openjdk ./gradlew :$pkgname-cli:installDist --info --stacktrace
}

package() {
    rm "$srcdir/$pkgname/$pkgname-cli/build/install/$pkgname-cli/bin/$pkgname-cli.bat"
    mkdir -p $pkgdir/opt/
    cp -r "$srcdir/$pkgname/$pkgname-cli/build/install/$pkgname-cli/" $pkgdir/opt/$pkgname
    mkdir -p $pkgdir/usr/bin/
    ln -s ../../opt/$pkgname/bin/$pkgname-cli $pkgdir/usr/bin/$pkgname
}