summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ee3cfbc79d06a552d5dd445e2d3de2b41057295 (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
36
37
38
39
40
41
# Maintainer: Mathias Walters <waltersm@protonmail.com>

pkgname=tokentool
_pkgname=TokenTool
pkgver=2.2.1
pkgrel=2
pkgdesc="A free tool written in Java for building digital avatars, focussed around Virtual Tabletops."
arch=('x86_64')
url="https://rptools.net/toolbox/token-tool"
license=('AGPL3')
makedepends=('git' 'gradle' 'dpkg' 'jdk10')
provides=('tokentool')
conflicts=('tokentool')
source=("git+https://github.com/RPTools/tokentool.git#tag=${pkgver}")
sha256sums=('SKIP')

build() {

    ORIG_JAVA="$(archlinux-java get)"
    sudo archlinux-java set java-10-jdk

    cd ${pkgname}
    gradle deploy

    if [ -n "$ORIG_JAVA" ]; then
        sudo archlinux-java set $ORIG_JAVA
    else
        sudo archlinux-java unset
    fi
}

package() {

    cd "${srcdir}/${pkgname}/releases/release-${pkgver}"
    ar vx "${pkgname}-${pkgver}.deb"
    tar -C "${pkgdir}" -xf data.tar.xz

    install -Dm644 "${pkgdir}/opt/${_pkgname}/app/COPYING.AFFERO" -t "${pkgdir}/usr/share/licenses/${pkgname}"
    install -Dm644 "${pkgdir}/opt/${_pkgname}/app/COPYING.LESSER" -t "${pkgdir}/usr/share/licenses/${pkgname}"
    install -Dm644 "${pkgdir}/opt/${_pkgname}/${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"
}