# Maintainer: Sony Stinks # Contributor: Sefa Eyeoglu # Contributor: Lenny McLennington # Contributor: Yellow # Contributor: Elijah Gregg # Contributor: Miko # Contributor: Cheru Berhanu # Contributor: dada513 _pkgname=polymc pkgname=${_pkgname}-git pkgver=6.1.0.ffcb0c3 pkgrel=1 pkgdesc="Minecraft launcher with ability to manage multiple instances." arch=('amd64') url="https://github.com/PolyMC/PolyMC" license=('GPL3') depends=('libqt5xml5' 'libqt5core5a' 'libqt5network5' 'libqt5gui5') provides=('polymc') conflicts=('polymc') makedepends=('extra-cmake-modules' 'g++' 'gcc' 'cmake' 'git' 'openjdk-17-jdk' 'zlib1g-dev' 'libgl1-mesa-dev' 'qtbase5-dev' 'qtchooser' 'qt5-qmake' 'qtbase5-dev-tools') optdepends=('java-runtime=8: support for Minecraft versions < 1.17' 'java-runtime=17: support for Minecraft versions >= 1.17') source=("git+https://github.com/PolyMC/PolyMC" "git+https://github.com/MultiMC/libnbtplusplus" "git+https://github.com/stachenov/quazip") sha256sums=('SKIP' 'SKIP' 'SKIP') pkgver() { cd "${srcdir}/PolyMC" _tag="$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/openmw-//')" _numcommits="$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)" _hash="$(git rev-parse --short HEAD)" printf "%s.r%s.g%s" "$_tag" "$_numcommits" "$_hash" } prepare() { cd "${srcdir}/PolyMC" git submodule init git config submodule.libnbtplusplus.url "${srcdir}/libnbtplusplus" git config submodule.quazip.url "${srcdir}/quazip" git submodule update } build() { cd "${srcdir}/PolyMC" mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DLauncher_BUILD_PLATFORM="debian" \ -DLauncher_APP_BINARY_NAME="${_pkgname}" \ .. cmake --build . } check() { cd "${srcdir}/PolyMC/build" ctest . } package() { cd "${srcdir}/PolyMC/build" DESTDIR="$pkgdir" cmake --install . }