Minetest-For-Mobile/build-minetest.sh

50 lines
998 B
Bash
Raw Normal View History

2020-12-21 15:58:10 +00:00
#!/bin/sh
set -e
git clone https://github.com/TheBrokenRail/minetest.git -b desktop-touch
cd minetest
DEB_VERSION="$(git describe --tags --dirty)"
git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
mkdir build-dir
cd build-dir
# Prepare Build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
-DENABLE_GLES=TRUE \
-DGLES_VERSION=1 \
-DENABLE_TOUCH=ON \
-DRUN_IN_PLACE=FALSE \
-DBUILD_UNITTESTS=FALSE \
-DIRRLICHT_LIBRARY=../../irrlicht/lib/Linux/libIrrlicht.a \
-DIRRLICHT_INCLUDE_DIR=../../irrlicht/include \
..
# Build
make -j$(nproc)
# Clean Up
rm -rf tmp
mkdir tmp
rm -rf /out/*
# Install Files
make install DESTDIR="$(pwd)/tmp"
# Prepare Debian
cp -r ../../DEBIAN tmp/DEBIAN
sed -i 's/${VERSION}/'"${DEB_VERSION}"'/g' tmp/DEBIAN/control
# Make DEB
dpkg -b tmp /out
# Clean Up
rm -rf tmp