Browse Source

minetestserver multi distro considerations

master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
1777a051d9
  1. 1
      etc/game-install-ENLIVEN
  2. 48
      etc/minetestserver-install-git-all-backends.sh

1
etc/game-install-ENLIVEN

@ -9,6 +9,7 @@
# Mods were found at https://forum.minetest.net/viewforum.php?f=11
# * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package)
# * Arch stable version uses /usr/share/minetest/
if [ "$1" = "version_0_5_enable" ]; then
version_0_5_enable="true"

48
etc/minetestserver-install-git-all-backends.sh

@ -1,5 +1,9 @@
#!/bin/sh
#this is the recommended script for servers
#remove non-git version first:
if [ -f "`command -v apt`" ]; then
sudo apt update
fi
echo "This script compiles AND installs minetestserver (NOT run-in-place, but rather system-wide) with leveldb, redis, and defaults postgresql, doxygen, sqlite3"
echo
echo
@ -13,19 +17,51 @@ sleep 1
echo "1..."
sleep 1
echo
sudo apt remove minetest-server
sudo apt remove minetest
sudo apt install libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev libpq-dev postgresql-server-dev-all
if [ -f "`command -v apt`" ]; then
sudo apt -y remove minetest-server
sudo apt -y remove minetest
sudo apt -y install libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev libpq-dev postgresql-server-dev-all
# added libpq-dev postgresql-server-dev-all (or specific version) are BOTH needed for PostgreSQL development as per https://stackoverflow.com/questions/13920383/findpostgresql-cmake-wont-work-on-ubuntu
# if you skip the above, the below says missing: GetText, Curses, ncurses, Redis, SpatialIndex, Doxygen
sudo apt install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev
sudo apt -y install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev
elif [ -f "`command -v pacman`" ]; then
sudo pacman -R --noconfirm minetest-server
sudo pacman -R --noconfirm minetest
echo "detected arch-based distro (tested only on antergos)..."
# NOTE: the regular packages include headers on arch-based distros:
sudo pacman -Syyu --noconfirm git spatialindex postgresql-libs doxygen postgresql-libs hiredis redis irrlicht gettext freetype2 bzip2 libpng libjpeg-turbo libxxf86vm mesa glu sqlite libogg libvorbis openal curl luajit leveldb ncurses redis hiredis gmp
#can't find equivalent to libjpeg8-dev libxxf86vm-dev mesa sqlite libogg vorbis
elif [ -f "`command -v dnf`" ]; then
sudo dnf -y remove minetest-server
sudo dnf -y remove minetest
#see expertmm post at https://forum.minetest.net/viewtopic.php?f=42&t=3837&start=125
sudo dnf -y install -y gcc-c++ freetype-devel spatialindex-devel postgresql-devel doxygen irrlicht-devel gettext freetype cmake bzip2-devel libpng libjpeg-turbo libXxf86vm mesa-libGLU libsqlite3x-devel libogg-devel libvorbis-devel openal-devel curl-devel luajit-devel lua-devel leveldb-devel ncurses-devel redis hiredis-devel gmp-devel
cd
#git clone https://github.com/minetest/minetest.git
#cd minetest/games
#git clone https://github.com/minetest/minetest_game.git
#cd ..
#cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DENABLE_POSTGRESQL=1
#make -j$(nproc)
#sudo make install
#minetest
# echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m"
fi
cd
if [ ! -d "Downloads" ]; then
mkdir Downloads
fi
cd Downloads
if [ -d minetest ]; then
echo "ERROR: Nothing done since 'minetest' already exists in `pwd`--delete it before cloning, or run the included update script to update."
echo "Ctrl C or this window will exit..."
echo "3..."
sleep 1
echo "2..."
sleep 1
echo "1..."
sleep 1
fi
git clone https://github.com/minetest/minetest.git
git pull --all # see https://forum.minetest.net/viewtopic.php?f=42&t=3837&start=125#p306449
@ -35,7 +71,7 @@ git pull --all
cd ..
# heavily modified from forum url above due to hints from AUR files obtained via git clone https://aur.archlinux.org/minetest-git-leveldb.git
echo "ENABLE_CURSES enables server-side terminal via --terminal option"
cmake . -DENABLE_GETTEXT=on -DENABLE_CURSES=on -DENABLE_FREETYPE=on -DENABLE_LEVELDB=on -DENABLE_CURL=on -DENABLE_GETTEXT=on -DENABLE_REDIS=on -DENABLE_POSTGRESQL=on -DBUILD_SERVER=on -DBUILD_CLIENT=off -DRUN_IN_PLACE=off -DCMAKE_BUILD_TYPE=Release
cmake . -DENABLE_GETTEXT=on -DENABLE_CURSES=on -DENABLE_FREETYPE=on -DENABLE_LEVELDB=on -DENABLE_CURL=on -DENABLE_GETTEXT=on -DENABLE_REDIS=on -DENABLE_POSTGRESQL=on -DRUN_IN_PLACE=off -DCMAKE_BUILD_TYPE=Release -DBUILD_SERVER=on -DBUILD_CLIENT=off
# NOTE: as long as -DRUN_IN_PLACE=off, above installs correctly without -DCMAKE_INSTALL_PREFIX=/usr which for some reason is used by https://aur.archlinux.org/minetest-git.git
# -DCMAKE_BUILD_TYPE=Release as per https://aur.archlinux.org/minetest-git.git
make -j$(nproc)

Loading…
Cancel
Save