Minetest-For-Mobile/build/build-minetest.sh

54 lines
1.1 KiB
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 \
2020-12-23 20:38:13 +00:00
-DCMAKE_BUILD_TYPE=Release \
2020-12-21 15:58:10 +00:00
-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 \
2020-12-24 23:05:24 +00:00
-DDISPLAY_DENSITY_FACTOR=0.7 \
2020-12-21 15:58:10 +00:00
-DGLES_VERSION=1 \
2020-12-23 20:38:13 +00:00
-DENABLE_TOUCH=TRUE \
2020-12-21 15:58:10 +00:00
-DRUN_IN_PLACE=FALSE \
-DBUILD_UNITTESTS=FALSE \
-DIRRLICHT_LIBRARY=../../irrlicht/lib/Linux/libIrrlicht.a \
-DIRRLICHT_INCLUDE_DIR=../../irrlicht/include \
2020-12-23 20:38:13 +00:00
-DVERSION_EXTRA=mobile \
2020-12-21 15:58:10 +00:00
..
# Build
make -j$(nproc)
# Clean Up
rm -rf tmp
mkdir tmp
rm -rf /out/*
2020-12-22 00:04:38 +00:00
mkdir -p /out
2020-12-21 15:58:10 +00:00
# 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