summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 829a1dac4e17524436c0c93a7b25e000cf9df2e2 (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
# Maintainer: EatMyVenom <eat.my.venomm@gmail.com>

_modname=minihud
_mcver="1.17-snapshot-21w05a"
_modloader="fabric"
pkgname=mc-minihud-117-fabric
pkgver="0.19.0.dev.20201218.025957"
pkgrel=1
pkgdesc="A client-side mod that allows displaying various info lines on the screen "
arch=('any')
url="https://masa.dy.fi/mcmods/client_mods/"
license=('LGPL')
makedepends=('wget' 'jq')
source=("manifest.json::https://masa.dy.fi/api/games/mods/minecraft/latest/client/")
sha1sums=('3b3c19c94ad38288f78222b4c72847f44df81b34')

pkgver() {
  cd $srcdir
  cat manifest.json | jq ".[\"mods\"][\"${_mcver}\"][\"${_modloader}\"][\"${_modname}\"][\"version\"]" | sed 's/-/./g;s/+/./g'
}

build() {
  wget $(cat manifest.json | jq -r ".[\"mods\"][\"${_mcver}\"][\"${_modloader}\"][\"${_modname}\"][\"url\"]")
}

package() {
  install -d -m 755 "${pkgdir}/usr/share/minecraft"

  cp $(cat manifest.json | jq -r ".[\"mods\"][\"${_mcver}\"][\"${_modloader}\"][\"${_modname}\"][\"filename\"]") \
     "${pkgdir}/usr/share/minecraft/${_modname}-${_mcver}.jar"
}