Package Details: r2modman 3.1.50-1

Git Clone URL: https://aur.archlinux.org/r2modman.git (read-only, click to copy)
Package Base: r2modman
Description: A simple and easy to use mod manager for several games using Thunderstore.
Upstream URL: https://github.com/ebkr/r2modmanPlus
Licenses: MIT
Submitter: su226
Maintainer: su226
Last Packager: su226
Votes: 1
Popularity: 0.45
First Submitted: 2024-04-22 13:40 (UTC)
Last Updated: 2024-10-08 08:35 (UTC)

Dependencies (4)

Required by (0)

Sources (2)

Latest Comments

murlakatamenka commented on 2024-08-20 10:13 (UTC) (edited on 2024-08-20 10:42 (UTC) by murlakatamenka)

Whatever, I guess.

My point was that you can make a better package that way, because using system's Electron has its advantages (saved space, better Wayland support with recent Electron versions etc.)


Also I've just built the package with just nvm and yarn, with electron30 and without python2

# Maintainer: su226 <thesu226@outlook.com>

pkgname=r2modman
pkgver=3.1.49
pkgrel=1
pkgdesc="A simple and easy to use mod manager for several games using Thunderstore."
arch=(any)
url="https://github.com/ebkr/r2modmanPlus"
license=("MIT")
_electron=electron30
depends=("$_electron")
makedepends=('nvm' 'yarn')
conflicts=('r2modman-bin' 'r2modman-appimage')
source=("r2modmanPlus-$pkgver.tar.gz::https://github.com/ebkr/r2modmanPlus/archive/refs/tags/v$pkgver.tar.gz"
    "r2modman.desktop")
sha256sums=(b23119297deda09793760f9962b51bbf8887c1738b9befb99b414573316bc743
    6cd96385f1ad7bf6fec0f9a70b429305e6f20153528e415d3c943ff19a45fd0f)

_ensure_local_nvm() {
    which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
    export NVM_DIR="${srcdir}/.nvm"

    source /usr/share/nvm/init-nvm.sh
}

prepare() {
    _ensure_local_nvm
    # Node 14 is required, newer versions might not build node-sass
    nvm install 14

    cd "r2modmanPlus-$pkgver"

    # Modify electron-builder config
    local _electronDist="/usr/lib/$_electron"
    local _electronVersion="$(<$_electronDist/version)"

    sed -e "s/'AppImage', 'tar.gz', 'deb', 'rpm', 'pacman'/'dir'/" \
        -e "/builder: {/a electronDist: \"$_electronDist\", electronVersion: \"$_electronVersion\"," \
        -i quasar.conf.js

    yarn install
}

build() {
    _ensure_local_nvm
    cd "r2modmanPlus-$pkgver"
    yarn build-linux
}

package() {
    cd "r2modmanPlus-$pkgver"
    install -Dm644 dist/electron/Packaged/linux-unpacked/resources/app.asar "$pkgdir/usr/share/r2modman/app.asar"

    install -d "$pkgdir/usr/bin"
    printf '#!/bin/bash\nexec %s /usr/share/r2modman/app.asar "$@"\n' "$_electron" >"$pkgdir/usr/bin/r2modman"
    chmod 755 "$pkgdir/usr/bin/r2modman"

    install -Dm644 "$srcdir/r2modman.desktop" "$pkgdir/usr/share/applications/r2modman.desktop"
    for _icon in src/assets/icon/*; do
        install -Dm644 "$_icon" "$pkgdir/usr/share/icons/hicolor/$(basename -s .png $_icon)/apps/r2modman.png"
    done

    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/r2modman/LICENSE"
}

See for yourself.

su226 commented on 2024-08-07 04:36 (UTC) (edited on 2024-08-07 04:42 (UTC) by su226)

@murlakatamenka You need python2 for building (the specific version of) node-sass, in case prebuilt binary is unavailable. Besides, I use electron11 because upstream uses it, thus working on other Electron versions is not guaranteed. If you really want it, try customizepkg.

murlakatamenka commented on 2024-08-06 18:59 (UTC)

Hi, can you check if it works with system's electron package instead of ancient electron11?


electron11 and python2 is the tech from our previous lives