summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3230bb1a05dc694bdf1f3b7b71205a73f00d0645 (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
# Maintainer: Yakov Till <yakov.till at gmail dot com>
# Contributor: Maciej Dems <macdems@gmail.com>
pkgname=unmined-gui
pkgver=0.19.46
pkgrel=2
pkgdesc="An easy to use and fast Minecraft world viewer and mapper tool"
arch=('x86_64')
url="https://unmined.net/"
depends=()
makedepends=('zstd' 'curl')
license=('custom')
source=("unmined-gui_${pkgver}-dev_amd64.deb::https://unmined.net/download/unmined-gui-linuxdeb-x64-dev/")
sha256sums=('SKIP')

pkgver() {
    curl -fsSL "https://unmined.net/downloads/" | \
    grep -oP 'title="uNmINeD CLI.*\([0-9]+\.[0-9]+\.[0-9]+\)"' | \
    head -n1 | sed -E 's/.*\(([0-9]+\.[0-9]+\.[0-9]+)\).*/\1/'
}

prepare() {
    mkdir -p "$srcdir/unmined-gui_${pkgver}-dev"
    cd "$srcdir/unmined-gui_${pkgver}-dev"
    tar --use-compress-program=unzstd -xf "$srcdir/data.tar.zst"
}

package() {
    cd "$srcdir/unmined-gui_${pkgver}-dev"
    cp -a usr opt "$pkgdir/"
    chmod +x "$pkgdir/opt/unmined/unmined"
    install -D -m644 opt/unmined/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}