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

_pkgname=fabric-carpet
pkgname=mc-fabric-carpet-git
pkgver=1.16.4.1.4.21.r2049.35715c93
pkgrel=1
pkgdesc="A mod for vanilla Minecraft that allows you to take full control of what matters"
arch=('any')
url="https://github.com/gnembon/fabric-carpet"
license=('LGPL')
makedepends=('gradle')
source=("git+https://github.com/gnembon/${_pkgname}.git")
md5sums=('SKIP') 

pkgver() {
  cd "$_pkgname"
  echo $(cat gradle.properties | grep 'minecraft_version' | cut -d'=' -f2 ).$(cat gradle.properties | grep 'mod_version' | cut -d'=' -f2 | sed 's/ //g').$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
}

build() {
  cd "$_pkgname"

  gradle build
}

package() {
  cd "$_pkgname"

  mkdir -p "${pkgdir}/usr/share/minecraft/"
  
  # please for the love of anything do not read the next 2 lines
  cp $(find build/libs -type f \( ! -iname '*dev*' ! -iname '*sources*' \)) \
     "${pkgdir}/usr/share/minecraft/${_pkgname}-$(cat gradle.properties | grep 'minecraft_version' | cut -d'=' -f2)-$(cat gradle.properties | grep 'mod_version' | cut -d'=' -f2 | sed 's/ //g').jar"
}