void-packages/srcpkgs/MultiMC/template

47 lines
1.9 KiB
Bash

# Template file for 'MultiMC'
pkgname=MultiMC
version=0.6.5
revision=3
wrksrc="${pkgname}5-${version}"
_commithashnbt="4b305bbd2ac0e7a26987baf7949a484a87b474d4"
_nbtversion="multimc-0.5.0"
_quazipversion="multimc-2"
build_style=cmake
hostmakedepends="openjdk xxd git-all"
makedepends="qt5-devel qt5-x11extras-devel qt5-svg-devel gtk+-devel"
depends="virtual?java-environment"
short_desc="Instanced Minecraft client"
maintainer="Spencer H <spencernh77@gmail.com>"
license="Apache-2.0"
homepage="http://multimc.org"
distfiles="https://github.com/${pkgname}/${pkgname}5/archive/${version}.tar.gz
https://github.com/${pkgname}/libnbtplusplus/archive/${_nbtversion}.tar.gz
https://github.com/${pkgname}/quazip/archive/${_quazipversion}.tar.gz"
checksum="98e8db7c0fda5e5a1917dc3f7cdbfd4b337c45aa47d1e7dbd45c380576bd7716
bcefbdd905f10a04605cf9e8f768d0f60c972e9e219c800512a5fd9c5f7a8498
25e1b74f0edef5e09647f7b5344c08fad4eaebbc386b1f288b59286ecdfe07fa"
skip_extraction="${_nbtversion}.tar.gz ${_quazipversion}.tar.gz"
pre_configure() {
export JAVA_HOME=/usr/lib/jvm/openjdk
export PATH=$PATH:$JAVA_HOME/bin
tar zxvf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_nbtversion}.tar.gz" -C "${wrksrc}/libraries/libnbtplusplus" --strip-components 1
tar zxvf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_quazipversion}.tar.gz" -C "${wrksrc}/libraries/quazip" --strip-components 1
}
do_install() {
vmkdir usr/bin
vmkdir usr/libexec/multimc
vmkdir usr/share/multimc/jars
vcopy build/MultiMC usr/libexec/multimc
vcopy build/jars/*.jar usr/share/multimc/jars
vinstall build/libMultiMC_gui.so 755 /usr/lib
vinstall build/libMultiMC_rainbow.so 755 /usr/lib
vinstall build/libMultiMC_logic.so 755 /usr/lib
vinstall build/libMultiMC_nbt++.so 755 /usr/lib
vinstall build/libMultiMC_unpack200.so 755 /usr/lib
vinstall build/libMultiMC_quazip.so 755 /usr/lib
vinstall build/libMultiMC_iconfix.so 755 /usr/lib
vbin ${FILESDIR}/MultiMC.sh MultiMC
}