summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c0d4e762e17d69ffd5acc6c8cb6d167b6a6d788 (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
# Maintainer: Nicholas Wang <me at nicho1as dot wang>

pkgname=nmcrcon-git
pkgver=r34.a34941c
pkgrel=1
pkgdesc="Yet another Minecraft RCON client that isn't against humanity and actually works."
url="https://github.com/nicholascw/nmcrcon"
arch=('any')
license=('GPL-3.0-only')
#depends=('libbestline')
makedepends=('git')
source=("nmcrcon::git+https://github.com/nicholascw/nmcrcon.git")
sha256sums=('SKIP')

pkgver () {
  cd "$srcdir/nmcrcon"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build () {
  cd "$srcdir/nmcrcon"
  make nmcrcon
}

package () {
  cd "$srcdir/nmcrcon"
  install -Dm755 nmcrcon -t "${pkgdir}/usr/bin/"
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/nmcrcon/"
  install -Dm644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/nmcrcon/"
}