From 7c3cc42f69339e08c97434df59273206b00a1474 Mon Sep 17 00:00:00 2001 From: Milan Meduna Date: Mon, 1 Jun 2020 09:03:56 +0200 Subject: [PATCH] =?UTF-8?q?P=C5=99idat=20=E2=80=9Ebuild.sh=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..8d085ee --- /dev/null +++ b/build.sh @@ -0,0 +1,40 @@ +#!/bin/bash + + git clone https://github.com/libspatialindex/libspatialindex /tmp/spatialindex && \ + cd /tmp/spatialindex && \ + cmake . \ + -DCMAKE_INSTALL_PREFIX=/usr && \ + make && \ + make install && \ + echo "**** compile minetestserver ****" && \ + mkdir -p /defaults + git clone --depth 1 --branch 0.4.17.1 https://github.com/minetest/minetest.git /tmp/minetest && \ + cp /tmp/minetest//minetest.conf.example /defaults/minetest.conf && \ + cd /tmp/minetest && \ + cmake . \ + -DBUILD_CLIENT=0 \ + -DBUILD_SERVER=1 \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCUSTOM_BINDIR=/usr/bin \ + -DCUSTOM_DOCDIR="/usr/share/doc/minetest" \ + -DCUSTOM_SHAREDIR="/usr/share/minetest" \ + -DENABLE_CURL=1 \ + -DENABLE_LEVELDB=1 \ + -DENABLE_LUAJIT=1 \ + -DENABLE_REDIS=1 \ + -DENABLE_SOUND=0 \ + -DENABLE_SYSTEM_GMP=1 \ + -DENABLE_POSTGRESQL=1 \ + -DPOSTGRESQL_CONFIG_EXECUTABLE=/usr/bin/pg_config \ + -DPOSTGRESQL_LIBRARY=/usr/lib/libpq.so \ + -DRUN_IN_PLACE=0 && \ + make && \ + make install && \ + echo "**** copy games to temporary folder ****" && \ + mkdir -p \ + /defaults/games && \ + rm /defaults/games/minetest -r && \ + echo "**** fetch additional game from git ****" && \ + git clone --depth 1 --branch 0.4.17 https://github.com/minetest/minetest_game.git /defaults/games/minetest && \ +cp -pr /defaults/games/minetest /home/minetest/.minetest/games +cp -pr /defaults/games/minetest /usr/share/minetest/games