# Contributor: # Maintainer: Sascha Paunovic pkgname=minetest pkgver=5.0.1 pkgrel=1 pkgdesc="An infinite-world block sandbox game and a game engine" url="http://www.minetest.net/" # luajit is not available for disabled arches arch="all !s390x" license="LGPL-2.1-or-later AND CC-BY-SA-3.0" pkgusers="minetest" pkggroups="minetest" install="$pkgname-server.pre-install" depends="$pkgname-common" makedepends="bzip2-dev cmake curl-dev freetype-dev gettext-dev hiredis-dev irrlicht-dev libjpeg-turbo-dev libogg-dev libpng-dev libvorbis-dev luajit-dev mesa-dev openal-soft-dev openssl-dev sqlite-dev " subpackages="$pkgname-doc $pkgname-common::noarch $pkgname-server $pkgname-server-openrc:openrc" source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/minetest/$pkgname/tar.gz/$pkgver minetest-server.confd minetest-server.initd 0001-CMake-link-with-Intl-when-necessary.patch " build() { mkdir "$builddir"/.build_client cd "$builddir"/.build_client cmake -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 \ .. make mkdir "$builddir"/.build_server cd "$builddir"/.build_server cmake -DCUSTOM_BINDIR=/usr/bin \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCUSTOM_DOCDIR="/usr/share/doc/minetest" \ -DCUSTOM_SHAREDIR="/usr/share/minetest" \ -DBUILD_CLIENT=0 \ -DBUILD_SERVER=1 \ -DENABLE_REDIS=1 \ -DENABLE_CURL=1 \ -DRUN_IN_PLACE=0 \ .. make } common() { depends= install -o minetest -g minetest -d "$subpkgdir"/var/lib/minetest mkdir -p "$subpkgdir/usr/share/minetest" mv "$pkgdir/usr/share/minetest/builtin" \ "$subpkgdir/usr/share/minetest" mv "$pkgdir/usr/share/minetest/games" \ "$subpkgdir/usr/share/minetest" } package() { cd "$builddir"/.build_client make DESTDIR="$pkgdir" install } server() { pkgdesc="Minetest server" depends="$pkgname-common" mkdir -p "$subpkgdir/usr/bin" cd "$builddir" install -m644 -D $pkgname.conf.example \ "$subpkgdir"/etc/$pkgname/$pkgname.conf cp bin/minetestserver $subpkgdir/usr/bin } openrc() { pkgdesc="Minetest server (OpenRC init scripts)" install_if="$pkgname-server openrc" install -D -m755 "$srcdir"/minetest-server.initd \ "$subpkgdir"/etc/init.d/minetest-server install -D -m644 "$srcdir"/minetest-server.confd \ "$subpkgdir"/etc/conf.d/minetest-server } sha512sums="00f0c77c19eb9619387285e5dad690c8aa9969ff11c4de0bdae99ee6e9a4508a8c2f977837fc2e01aebc5d4c1a5191d4f56acb131182d73c8f50da1458695607 minetest-5.0.1.tar.gz 7bca17dc0bd59db9c07c160677498aa09297026104e922bf93b7629c274d0aebd226af60c5e82f49ffe3cc5c1e4448e3798b6c2a44144fc6eca4d3aaed3384bb minetest-server.confd c27aea87468538b48b5e0a66fa5cdde4fc67f3c00a0e57f359a2f044a31c5617d1b5f3dec72e015537ee3bf126bd1073878c0f4447de67db9be2c4cf21416dd7 minetest-server.initd 6e35a39f079f0c1b280dbc3deb46eb789a7620d64b226b5f867c5d954ae8881659b6f15e3e2204a24ccd4ed7b9de50f2fbacc4c80534290fc4c049df24ddc5ff 0001-CMake-link-with-Intl-when-necessary.patch"