# Maintainer: starfall pkgname=mekhq-bin _pkgname=mekhq pkgver=0.48.0 pkgrel=1 pkgdesc="MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map." arch=('x86_64') url="https://megamek.org/" license=('GPL') depends=('java-runtime>=11') makedepends=() provides=('megamek') conflicts=('megamek') source=("https://github.com/MegaMek/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz" "megamek.desktop" "megameklab.desktop" "mekhq.desktop") sha256sums=('4ede596fac90ac23ae9436da8f607bec028d913dcb07ce1b4b89219eef8f62aa' '2b0c7399e38d0ae5f205c80ebbc9704789b362f9584cf2547eb5541652117a1f' 'e20799a00f7e05445e0c7d1549d485c5ac2975014ecd193b8b4e76183661164d' '1293435974c34293f31f25ebb29946439896d4541da8b12aa06f709ff89564bb') package() { cd ${_pkgname}-${pkgver} dir="${pkgdir}/usr/lib/${_pkgname}" install -D MegaMek.jar "${dir}/MegaMek.jar" install -D MegaMekLab.jar "${dir}/MegaMekLab.jar" install -D MekHQ.jar "${dir}/MekHQ.jar" cp -r campaigns $dir cp -r data $dir cp -r docs $dir cp -r lib $dir cp -r logs $dir cp -r mmconf $dir cp -r plugins $dir # TODO wrapper script to run from user .config folder like the PKGBUILDs on the AUR # but until then, just make these writeable chmod a+w $dir/data/mechfiles/units.cache chmod -R a+w $dir/logs chmod -R a+w $dir/mmconf cd ${srcdir} desktopdir="${pkgdir}/usr/share/applications" install -D megamek.desktop "${desktopdir}/megamek.desktop" install -D megameklab.desktop "${desktopdir}/megameklab.desktop" install -D mekhq.desktop "${desktopdir}/mekhq.desktop" }