summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c1a5a0bb011f2c8c1baff2cdfb547b9ff5ab99e9 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Paul Davis <paul@dangersalad.com>
pkgname=mekhq
pkgver=0.45.4
_pkgver=
pkgrel=1
epoch=
pkgdesc="MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek."

arch=('x86_64')
url="https://github.com/MegaMek/mekhq"
license=('GPL')
groups=()
depends=('jdk10-openjdk')
provides=('megamek')
conflicts=('megamek')

source=("https://github.com/MegaMek/mekhq/releases/download/v${pkgver}/${pkgname}-${pkgver}${_pkgver}.tar.gz"
        "mekhq.desktop"
        "megamek.desktop"
        "mekhq.sh"
        "megamek.sh")

sha256sums=('999b0aef3b7defe3bff32e128b3b69206bdd5d1976be88729cfbd2bb50cb1bbd'
            'a6c0cc72c6f3ad773bdcec24c8036ae7d09dcaea4908f5b6d4e5ac6091cff772'
            'caf5bf3e7294029c7b6dec974eed0253d6caf3804a6a9fcc953edc3c9be98b16'
            'fda6e9d542062041e9d9b7f6331069d8a78b9455a290286aa8d214ed66b13fd7'
            '9ad4d0251ecfe02140c46dfeb67a4ce2b0fe9f123b04a3911139b8e255ff2beb')

package() {

    install -D "${pkgname}-${pkgver}${_pkgver}/MegaMek.jar" \
            "${pkgdir}/usr/lib/${pkgname}/MegaMek.jar"

    install -D "${pkgname}-${pkgver}${_pkgver}/MegaMekLab.jar" \
            "${pkgdir}/usr/lib/${pkgname}/MegaMekLab.jar"

    install -D "${pkgname}-${pkgver}${_pkgver}/MekHQ.jar" \
            "${pkgdir}/usr/lib/${pkgname}/MekHQ.jar"

    install -Dm755 "${pkgname}-${pkgver}${_pkgver}/mm-startup" \
            "${pkgdir}/usr/lib/${pkgname}/mm-startup"
    install -Dm755 "${pkgname}-${pkgver}${_pkgver}/hq" \
            "${pkgdir}/usr/lib/${pkgname}/hq"
    install -Dm755 "${pkgname}-${pkgver}${_pkgver}/lab" \
            "${pkgdir}/usr/lib/${pkgname}/lab"

    cp -r "${pkgname}-${pkgver}${_pkgver}/campaigns" "${pkgdir}/usr/lib/${pkgname}"

    cp -r "${pkgname}-${pkgver}${_pkgver}/data" "${pkgdir}/usr/lib/${pkgname}"

    cp -r "${pkgname}-${pkgver}${_pkgver}/docs" "${pkgdir}/usr/lib/${pkgname}"

    cp -r "${pkgname}-${pkgver}${_pkgver}/lib" "${pkgdir}/usr/lib/${pkgname}"

    cp -r "${pkgname}-${pkgver}${_pkgver}/logs" "${pkgdir}/usr/lib/${pkgname}"

    cp -r "${pkgname}-${pkgver}${_pkgver}/mmconf" "${pkgdir}/usr/lib/${pkgname}"

    
    install -D mekhq.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
    install -D megamek.desktop "${pkgdir}/usr/share/applications/megamek.desktop"
    
    install -Dm755 mekhq.sh "${pkgdir}/usr/bin/${pkgname}"
    install -Dm755 megamek.sh "${pkgdir}/usr/bin/megamek"

}