makedeb


polymc-git 6.1.0.ffcb0c3-1


Minecraft launcher with ability to manage multiple instances.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for polymc-git.

# Maintainer: Sony Stinks <sonystinks@protonmail.com>
# Contributor: Sefa Eyeoglu <contact@scrumplex.net>
# Contributor: Lenny McLennington <lennymclennington@protonmail.com>
# Contributor: Yellow <yellow@example.com>
# Contributor: Elijah Gregg <lovetocode999@tilde.team>
# Contributor: Miko <mikoxyzzz@gmail.com>
# Contributor: Cheru Berhanu <aur attt cheru doot dev>
# Contributor: dada513 <dada513@protonmail.com>

_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 .
}