From 9360968a2a5c0429bc8524bc8207ee25807f3d7d Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 3 Nov 2020 11:45:17 +0100 Subject: initial commit --- PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 PKGBUILD (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..44bb51c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maitainer: Loek Le Blansch + +pkgname=go-serversdat-git +pkgver=1.0.0 +pkgrel=1 +epoch=1 +pkgdesc="Minecraft servers.dat tool" +arch=('any') +makedepends=('git' 'go') +url="https://github.com/Jake-E/go-serversdat" +license=('MIT') +source=(git+https://github.com/Jake-E/go-serversdat) +sha256sums=('SKIP') +provides=('serversdat') +conflicts=('serversdat') + +pkgver() { + cd ${pkgname%-git} + git describe --tags | sed "s+-+.r+" | tr - . +} + +prepare() { + msg2 'Installing dependencies...' + go get github.com/jedib0t/go-pretty/table github.com/seebs/nbt +} + +build() { + cd ${pkgname%-git} + + msg2 'Building...' + go build -o serversdat . +} + +package() { + cd ${pkgname%-git} + + msg2 'Installing executables...' + install -Dm 755 serversdat -t "$pkgdir"/usr/bin + + msg2 'Cleaning up pkgdir...' + find "$pkgdir" -type d -name .git -exec rm -r '{}' + +} -- cgit v1.2.3