aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorYth - Arnaud <yth@ythogtha.org>2023-06-09 22:27:10 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-06-10 14:01:22 +0700
commitf2548efd8fe806b0e6ad6486d01c910ad27a9b2f (patch)
treefad430a7be95f6fd0ab8741d2bb11ba67b09122b /games
parent2e9f216317fcda4e7dcca6a1ba2b9d2210b8ef4b (diff)
games/Mindustry: Added (hybrid tower-defense sandbox factory game)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/Mindustry/Mindustry.SlackBuild142
-rw-r--r--games/Mindustry/Mindustry.info10
-rw-r--r--games/Mindustry/README10
-rw-r--r--games/Mindustry/doinst.sh9
-rw-r--r--games/Mindustry/slack-desc19
5 files changed, 190 insertions, 0 deletions
diff --git a/games/Mindustry/Mindustry.SlackBuild b/games/Mindustry/Mindustry.SlackBuild
new file mode 100644
index 0000000000000..a3b2c10852e94
--- /dev/null
+++ b/games/Mindustry/Mindustry.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Slackware build script for Mindustry
+
+# Copyright 2023 Yth | Pont-en-Royans, France | yth@ythogtha.org
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=Mindustry
+VERSION=${VERSION:-144.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+SERVER=${SERVER:-yes}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION 2>/dev/null
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+./gradlew --no-daemon dist -Pbuildversion=144.3 desktop:dist
+
+mkdir -p $PKG/usr/share/{$PRGNAM,applications} \
+ $PKG/usr/games
+cp -a desktop/build/libs/$PRGNAM.jar \
+ $PKG/usr/share/$PRGNAM
+cp -a core/assets/icons/icon_64.png \
+ $PKG/usr/share/$PRGNAM/$PRGNAM.png
+
+# Create destop entry
+cat > $PKG/usr/share/applications/$PRGNAM.desktop <<EOF
+[Desktop Entry]
+Name=Mindustry
+Comment=The automation tower defense RTS, written in Java
+Exec=$PRGNAM
+Icon=/usr/share/$PRGNAM/$PRGNAM.png
+Type=Application
+Path=/usr/share/$PRGNAM
+Categories=Game;StrategyGame;
+EOF
+
+# Create launcher
+cat > $PKG/usr/games/$PRGNAM << EOF
+#!/bin/sh
+
+java -jar /usr/share/$PRGNAM/$PRGNAM.jar
+
+EOF
+chmod 755 $PKG/usr/games/$PRGNAM
+
+if [ "$SERVER" = "yes" ]; then
+ ./gradlew --no-daemon dist -Pbuildversion=144.3 server:dist
+ cp -a server/build/libs/server-release.jar \
+ $PKG/usr/share/$PRGNAM/$PRGNAM-server.jar
+ # Create destop entry
+ cat > $PKG/usr/share/applications/$PRGNAM-server.desktop <<EOF
+[Desktop Entry]
+Name=Mindustry Server
+Comment=Server for the automation tower defense RTS
+Exec=$PRGNAM-server
+Icon=/usr/share/$PRGNAM/$PRGNAM.png
+Type=Application
+Path=/usr/share/$PRGNAM
+Categories=Game;StrategyGame;
+EOF
+
+ # Create launcher
+ cat > $PKG/usr/games/$PRGNAM-server << EOF
+#!/bin/sh
+
+java -jar /usr/share/$PRGNAM/$PRGNAM-server.jar
+
+EOF
+ chmod 755 $PKG/usr/games/$PRGNAM-server
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.md LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/Mindustry/Mindustry.info b/games/Mindustry/Mindustry.info
new file mode 100644
index 0000000000000..e1e52a60190a7
--- /dev/null
+++ b/games/Mindustry/Mindustry.info
@@ -0,0 +1,10 @@
+PRGNAM="Mindustry"
+VERSION="144.3"
+HOMEPAGE="https://mindustrygame.github.io/"
+DOWNLOAD="https://github.com/Anuken/Mindustry/archive/v144.3/Mindustry-144.3.tar.gz"
+MD5SUM="f5698ee6caedcd4983de1ac717ca753d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="zulu-openjdk17"
+MAINTAINER="Yth - Arnaud"
+EMAIL="yth@ythogtha.org"
diff --git a/games/Mindustry/README b/games/Mindustry/README
new file mode 100644
index 0000000000000..bea29d8016937
--- /dev/null
+++ b/games/Mindustry/README
@@ -0,0 +1,10 @@
+Mindustry is a hybrid tower-defense sandbox factory game.
+Create elaborate supply chains of conveyor belts to feed ammo into
+your turrets, produce materials to use for building, and defend your
+structures from waves of enemies.
+
+Features include a map editor, 24 built-in maps, cross-platform
+multiplayer and large-scale PvP unit battles.
+
+Java 17 minimum is required to build.
+This does *not* build offline.
diff --git a/games/Mindustry/doinst.sh b/games/Mindustry/doinst.sh
new file mode 100644
index 0000000000000..65c7e2eeb9aa5
--- /dev/null
+++ b/games/Mindustry/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/Mindustry/slack-desc b/games/Mindustry/slack-desc
new file mode 100644
index 0000000000000..0f32a34817edd
--- /dev/null
+++ b/games/Mindustry/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+Mindustry: Mindustry (hybrid tower-defense sandbox factory game)
+Mindustry:
+Mindustry: Create elaborate supply chains of conveyor belts to feed ammo into
+Mindustry: your turrets, produce materials to use for building, and defend your
+Mindustry: structures from waves of enemies.
+Mindustry:
+Mindustry: Features include a map editor, 24 built-in maps, cross-platform
+Mindustry: multiplayer and large-scale PvP unit battles.
+Mindustry:
+Mindustry: https://anuke.itch.io/mindustry
+Mindustry: