Minetest-For-Mobile/build/build-minetest.sh
TheBrokenRail 1ff5787a3b
All checks were successful
Minetest-For-Mobile/pipeline/head This commit looks good
Fix Build
2020-12-21 19:04:38 -05:00

51 lines
1012 B
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_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/*
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