blob: c2f3e4b0417c8ebb0bcd16493998cd0638771294 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: su226 <thesu226@outlook.com>
pkgname=r2modman
pkgver=3.1.55
pkgrel=1
epoch=
pkgdesc="A simple and easy to use mod manager for several games using Thunderstore."
arch=(any)
url="https://github.com/ebkr/r2modmanPlus"
license=("MIT")
groups=()
_electron=electron24
depends=("$_electron")
makedepends=(yarn)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("r2modmanPlus-$pkgver.tar.gz::https://github.com/ebkr/r2modmanPlus/archive/refs/tags/v$pkgver.tar.gz"
"r2modman.desktop")
noextract=()
sha256sums=(2954aae37c12c6d27df932a73f08ea1a503171a85138c5625b3a0047b44c78e9
6cd96385f1ad7bf6fec0f9a70b429305e6f20153528e415d3c943ff19a45fd0f)
validpgpkeys=()
prepare() {
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() {
cd "r2modmanPlus-$pkgver"
yarn build-linux
}
check() {
cd "r2modmanPlus-$pkgver"
node test/folder-structure-testing/populator.mjs
yarn test:unit
}
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"
}
|