From 9b125857e4753033edcef205b7913a976a03ed43 Mon Sep 17 00:00:00 2001 From: Cyber Anonymous Date: Fri, 12 Jan 2024 00:29:15 -0300 Subject: [PATCH] first commit --- .gitignore | 1 + Makefile | 6 ++++++ Readme.md | 9 +++++++++ minetest.Dockerfile | 6 ++++++ 4 files changed, 22 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 Readme.md create mode 100644 minetest.Dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97a36d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +minetest.AppImage diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0d4df8d --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +all: + podman build -t minetest -f minetest.Dockerfile + podman run -d --name minetest minetest + podman cp minetest:/minetest/minetest.AppImage . + podman container rm minetest + podman rmi minetest diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..3edfe3b --- /dev/null +++ b/Readme.md @@ -0,0 +1,9 @@ +### AppImage Minetest Podman + +This script was created so that you can generate your own appimage without cluttering your system with minetest compilation dependencies, without having to blindly trust the appimage created by a third party. + +The dependencies for this project are: +make +podman + +The script will compile the most recent source code provided by the minetest repository itself, download the program responsible for generating the appimage and create the executable, all within a podman container, after which, as informed in the Makefile, it will copy the appimage to the project folder, at the end of creating the appimage, the Makefile will also remove the container and the image, after all, you will no longer need this after having the appimage \ No newline at end of file diff --git a/minetest.Dockerfile b/minetest.Dockerfile new file mode 100644 index 0000000..42122ea --- /dev/null +++ b/minetest.Dockerfile @@ -0,0 +1,6 @@ +FROM debian +ENV VERSION=5.9.0 + +RUN apt update; apt install file wget squashfs-tools git g++ make libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext -y ; git clone --depth 1 https://github.com/minetest/minetest.git ; cd minetest ; git clone --depth 1 --branch "$(cat misc/irrlichtmt_tag.txt)" https://github.com/minetest/irrlicht.git lib/irrlichtmt ; mkdir -p minetest.AppDir/usr/ ; cmake -DCMAKE_INSTALL_PREFIX=minetest.AppDir/usr/ . ; make -j$(nproc) ; make install + +RUN cd /minetest/minetest.AppDir/ ; echo "[Desktop Entry]\nName=Minetest\nExec=minetest\nIcon=minetest\nType=Application\nCategories=Utility" > minetest.desktop ; wget https://www.minetest.net/media/icon.svg -O minetest.svg ; wget https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 -O AppRun ; chmod +x AppRun ; cd .. ; wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage ; chmod +x appimagetool-x86_64.AppImage ; ./appimagetool-x86_64.AppImage --appimage-extract-and-run minetest.AppDir/ minetest.AppImage