# Maintainer: PICCORO Lenz McKAY pkgname=multicraft pkgver=2.0.3 pkgrel=0 pkgdesc="Minetest fork infinite-world block sandbox game and a game engine" url="https://www.multicraft.world/" # riscv64 blocked by luajit arch="all !riscv64" license="LGPL-3-or-later AND CC-BY-SA-3.0" pkgusers="multicraft" pkggroups="multicraft" install="$pkgname-server.pre-install" depends="$pkgname-common" makedepends=" bzip2-dev cmake curl-dev freetype-dev gettext-dev hiredis-dev libjpeg-turbo-dev libogg-dev libpng-dev libvorbis-dev libxi-dev luajit-dev mesa-dev openal-soft-dev openssl-dev>3 samurai sqlite-dev zstd-dev " subpackages="$pkgname-doc $pkgname-common::noarch $pkgname-server $pkgname-server-openrc:openrc " _irrlichtver="1.9.0mt8" source="https://github.com/multicraft/multicraft/archive/refs/tags/$pkgver/multicraft-$pkgver.tar.gz https://github.com/minetest/irrlicht/archive/refs/tags/$_irrlichtver/irrlichtmt-$_irrlichtver.tar.gz multicraft-server.confd multicraft-server.initd 0001-CMake-link-with-Intl-when-necessary.patch " prepare() { default_prepare mv "$srcdir"/irrlicht-$_irrlichtver "$srcdir"/multicraft-$pkgver/lib/irrlichtmt } build() { cmake -G Ninja -B build_client \ -DCMAKE_BUILD_TYPE=Release \ -DCUSTOM_BINDIR=/usr/bin \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCUSTOM_DOCDIR="/usr/share/doc/$pkgname" \ -DCUSTOM_SHAREDIR="/usr/share/$pkgname" \ -DBUILD_CLIENT=1 \ -DBUILD_SERVER=0 \ -DENABLE_REDIS=0 \ -DENABLE_CURL=1 \ -DRUN_IN_PLACE=0 cmake --build build_client cmake -G Ninja -B build_server \ -DCMAKE_BUILD_TYPE=Release \ -DCUSTOM_BINDIR=/usr/bin \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCUSTOM_DOCDIR="/usr/share/doc/multicraft" \ -DCUSTOM_SHAREDIR="/usr/share/multicraft" \ -DBUILD_CLIENT=0 \ -DBUILD_SERVER=1 \ -DENABLE_REDIS=1 \ -DENABLE_CURL=1 \ -DRUN_IN_PLACE=0 cmake --build build_server } package() { DESTDIR="$pkgdir" cmake --install build_client } common() { pkgdesc="Multicraft files used by both client & server" depends="" install -o multicraft -g multicraft -d "$subpkgdir"/var/lib/multicraft amove \ usr/share/multicraft/builtin \ usr/share/multicraft/games } server() { pkgdesc="Multicraft server" depends="$pkgname-common" cd "$builddir" install -Dm644 multicraft.conf.example \ "$subpkgdir"/etc/multicraft/multicraft.conf install -Dm755 bin/multicraftserver \ -t "$subpkgdir"/usr/bin } openrc() { pkgdesc="Multicraft server (OpenRC init scripts)" install_if="$pkgname-server openrc" install -Dm755 "$srcdir"/multicraft-server.initd \ "$subpkgdir"/etc/init.d/multicraft-server install -Dm644 "$srcdir"/multicraft-server.confd \ "$subpkgdir"/etc/conf.d/multicraft-server } sha512sums=" 15d2ce3b1150f077ff933a04f0ba8e02c71ee60a0edb636d1511d4e90244a34a14d7e5c4b47bee4de96cd179249a5a6963d7a092084f46c0fa54c9ff431a5265 multicraft-5.6.1.tar.gz 3a5cbcd8d13730e08f24a72b4ceb2a6d3ba1cfa4292475915da6413ab8084d0b7f0b5dc34edc152d5bf516730faf43d983433619b0a1fb15540adb5cab00ca10 irrlichtmt-1.9.0mt8.tar.gz 7bca17dc0bd59db9c07c160677498aa09297026104e922bf93b7629c274d0aebd226af60c5e82f49ffe3cc5c1e4448e3798b6c2a44144fc6eca4d3aaed3384bb multicraft-server.confd c27aea87468538b48b5e0a66fa5cdde4fc67f3c00a0e57f359a2f044a31c5617d1b5f3dec72e015537ee3bf126bd1073878c0f4447de67db9be2c4cf21416dd7 multicraft-server.initd c815e6c9c5433e4fda9b8559b662086e18b14461e4fd8626b4d5178554a2423c9b243450845d49710825b627dede91de8411655adff7a960672c639735499533 0001-CMake-link-with-Intl-when-necessary.patch "