Přidat „build.sh“

This commit is contained in:
Milan Meduna 2020-06-01 09:03:56 +02:00
parent a98fa635fb
commit 7c3cc42f69
1 changed files with 40 additions and 0 deletions

40
build.sh Normal file
View File

@ -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