Minetest-For-Mobile/build/build-minetest.sh
TheBrokenRail 833552c639
Some checks failed
Minetest-For-Mobile/pipeline/head There was a failure building this commit
Add Optional Dependencies
2020-12-23 15:38:13 -05:00

53 lines
1.1 KiB
Bash
Executable File

#!/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_BUILD_TYPE=Release \
-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=TRUE \
-DRUN_IN_PLACE=FALSE \
-DBUILD_UNITTESTS=FALSE \
-DIRRLICHT_LIBRARY=../../irrlicht/lib/Linux/libIrrlicht.a \
-DIRRLICHT_INCLUDE_DIR=../../irrlicht/include \
-DVERSION_EXTRA=mobile \
..
# Build
make -j$(nproc)
# Clean Up
rm -rf tmp
mkdir tmp
rm -rf /out/*
mkdir -p /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