summaryrefslogtreecommitdiff
path: root/games/domination
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-10-28 05:41:58 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-10-28 05:41:58 +0700
commit59e668ade236a9081f480158e8b794667c6d0667 (patch)
treec0eb48909e3a3a23ead4491b316545cdede629eb /games/domination
parentcc2254d046e9cadd8f856873f693a1a27c0e1466 (diff)
downloadslackbuilds-59e668ade236a9081f480158e8b794667c6d0667.tar.gz
games/domination: Added (clone of the board game Risk).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/domination')
-rw-r--r--games/domination/README19
-rw-r--r--games/domination/README_SBo.txt36
-rw-r--r--games/domination/doinst.sh3
-rw-r--r--games/domination/domination-swing.desktop8
-rw-r--r--games/domination/domination.SlackBuild98
-rw-r--r--games/domination/domination.desktop8
-rw-r--r--games/domination/domination.info10
-rw-r--r--games/domination/domination.pngbin0 -> 27516 bytes
-rw-r--r--games/domination/domination.sh34
-rw-r--r--games/domination/slack-desc19
10 files changed, 235 insertions, 0 deletions
diff --git a/games/domination/README b/games/domination/README
new file mode 100644
index 0000000000..93b23e8101
--- /dev/null
+++ b/games/domination/README
@@ -0,0 +1,19 @@
+domination (clone of the board game Risk)
+
+Domination is a game that is a bit like the well known board game of
+Risk or RisiKo. It has many game options and includes many maps.
+
+Domination is written in Java. It includes a map editor, single-player
+vs. AI, networked multiplayer, and many other features. It works in all
+OSes that run Java 1.4 or higher, and Android.
+
+Since Domination is a Java application, it will require a Java Virtual
+Machine to run. Any of these SBo builds will work:
+
+jdk
+openjdk
+openjdk6
+openjdk8
+
+All of the above install scripts in /etc/profile.d, meaning you must
+log out and back in to run Java applications (including Domination).
diff --git a/games/domination/README_SBo.txt b/games/domination/README_SBo.txt
new file mode 100644
index 0000000000..9b96555897
--- /dev/null
+++ b/games/domination/README_SBo.txt
@@ -0,0 +1,36 @@
+Notes on the SlackBuild. Probably only of interest to SBo packagers.
+This stuff was comments in the script, until it got too long.
+
+There's no audio in this game. That's not a bug or anything, it's designed
+that way.
+
+The source is included in the package (src.zip), but nothing like a
+Makefile or build.xml. I have no idea how to build it. If I knew how, or
+wanted to spend the time/effort (and grit my teeth & ignore my distaste
+for all things Java), I'd try to build it with gcc-java... any takers?
+
+Slackware 14.2 ships with gij, gcc-java's bytecode interpreter. I tried
+running 'gij -jar Domination.jar' and was able to start a single-player
+(vs. AI) game, but 'play online' threw a crypto exception:
+
+java.security.NoSuchAlgorithmException: Algorithm [RSA] of type [Cipher] from provider [gnu.javax.security.auth.callback.GnuCallbacks: name=GNU-CALLBACKS version=2.1] is not found
+
+Not sure if this is something that can be worked around or not. A bit
+of googling led me to something called the Bouncy Castle JCE, which
+adds crypto support and might work with gcc-java... but, that's more
+involved with Java than I want to get. If you want to check it out and
+maybe submit a build for it, see: http://www.bouncycastle.org/java.html
+
+This is a binary package, everything in one dir. move around to make
+sense. Have to have a wrapper script and symlink forest in user's
+homedir, since it expects to write to the dir it runs from. Looks
+like help/ lib/ maps/ resources/ can be symlinked. game.ini and saves/
+need to be user-writable.
+
+The various *.sh scripts run with different frontends. Unless someone
+requests any of the others, I'm only going to care about the main
+one (run.sh) and the swing one (which has the map editor). There's a
+command-line frontend, but it looks like it wouldn't be much fun to play:
+doesn't even draw ASCII art maps, not menu driven, uses long command
+names and no readline/etc. I assume the Domination maintainers use it
+for testing purposes.
diff --git a/games/domination/doinst.sh b/games/domination/doinst.sh
new file mode 100644
index 0000000000..5fb28930db
--- /dev/null
+++ b/games/domination/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/games/domination/domination-swing.desktop b/games/domination/domination-swing.desktop
new file mode 100644
index 0000000000..3e6cf6a378
--- /dev/null
+++ b/games/domination/domination-swing.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Domination Map Editor
+Exec=domination
+Icon=domination
+Type=Application
+Terminal=false
+Comment=Create maps for Domination
+Categories=Game;BoardGame;
diff --git a/games/domination/domination.SlackBuild b/games/domination/domination.SlackBuild
new file mode 100644
index 0000000000..80ae5af9b6
--- /dev/null
+++ b/games/domination/domination.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for domination
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# See README_SBo.txt for more info on this script (I wrote too many
+# comments, moved them to a separate file).
+
+PRGNAM=domination
+VERSION=${VERSION:-1.1.1.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+SRCNAM=Domination
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM
+unzip $CWD/${SRCNAM}_$VERSION.zip
+cd $SRCNAM
+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 {} \;
+
+# We don't need Windows exes or OSX app bundles. Or the source. Or
+# in fact upstream's wrapper scripts (we include our own).
+rm -rf *.exe *.app *.cmd *.zip *.htm *.sh ._*
+
+# Docs first, get rid of DOS line endings.
+sed -i 's,\r,,' *.txt
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+
+# Everything else goes in the game dir. share/ is OK as there's no
+# native binaries.
+mkdir -p $PKG/usr/share/games/$PRGNAM
+mv * $PKG/usr/share/games/$PRGNAM
+
+# Wrapper scripts.
+mkdir -p $PKG/usr/games
+install -m0755 $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
+ln -s $PRGNAM $PKG/usr/games/$PRGNAM-swing
+
+# resources/icon.png is only 16x16. Use 128x128 icon instead, extracted
+# from the OSX app bundle with icns2png.
+mkdir -p $PKG/usr/share/pixmaps
+cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# .desktop written for this SlackBuild.
+APPDIR=$PKG/usr/share/applications
+mkdir -p $APPDIR
+cat $CWD/$PRGNAM.desktop > $APPDIR/$PRGNAM.desktop
+cat $CWD/$PRGNAM-swing.desktop > $APPDIR/$PRGNAM-swing.desktop
+
+# no man pages, no command-line options.
+
+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:-tgz}
diff --git a/games/domination/domination.desktop b/games/domination/domination.desktop
new file mode 100644
index 0000000000..b6966b1b0a
--- /dev/null
+++ b/games/domination/domination.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Domination
+Exec=domination
+Icon=domination
+Type=Application
+Terminal=false
+Comment=Risk-like Strategy Board Game
+Categories=Game;BoardGame;
diff --git a/games/domination/domination.info b/games/domination/domination.info
new file mode 100644
index 0000000000..99d4da5da2
--- /dev/null
+++ b/games/domination/domination.info
@@ -0,0 +1,10 @@
+PRGNAM="domination"
+VERSION="1.1.1.6"
+HOMEPAGE="http://domination.sourceforge.net/"
+DOWNLOAD="http://downloads.sourceforge.net/project/domination/Domination/1.1.1.6/Domination_1.1.1.6.zip"
+MD5SUM="4aab32b6a911b5c143bfb9a1d2f02cf9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="jdk"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/domination/domination.png b/games/domination/domination.png
new file mode 100644
index 0000000000..2fda8ece62
--- /dev/null
+++ b/games/domination/domination.png
Binary files differ
diff --git a/games/domination/domination.sh b/games/domination/domination.sh
new file mode 100644
index 0000000000..9a8b96c536
--- /dev/null
+++ b/games/domination/domination.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# wrapper script for domination, part of the SlackBuilds.org
+# project. Written by B. Watson, licensed under the WTFPL.
+
+# script is installed as domination and domination-swing, checks how
+# it was called to know what java class to invoke.
+
+PRGNAM=domination
+USERDIR="$HOME/.$PRGNAM"
+SHAREDIR="/usr/share/games/$PRGNAM"
+
+# program expects to read this stuff from the current directory.
+LINKS="Domination.jar help lib maps resources"
+
+[ ! -e "$USERDIR" ] && mkdir -p "$USERDIR"
+if ! cd "$USERDIR"; then
+ echo "$0: failed to create/change to $USERDIR" 1>&2
+ exit 1
+fi
+
+for dir in $LINKS; do
+ [ ! -e $dir ] && ln -s $SHAREDIR/$dir $dir
+done
+
+# program expects to write to this stuff in the current dir.
+mkdir -p saves
+[ ! -e game.ini ] && cat $SHAREDIR/game.ini > game.ini
+
+if [ "$( basename "$0" )" = "$PRGNAM-swing" ]; then
+ exec java -cp Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame "$@"
+else
+ exec java -jar Domination.jar "$@"
+fi
diff --git a/games/domination/slack-desc b/games/domination/slack-desc
new file mode 100644
index 0000000000..e35de9ed1f
--- /dev/null
+++ b/games/domination/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------------------------------------------------------|
+domination: domination (clone of the board game Risk)
+domination:
+domination: Domination is a game that is a bit like the well known board game
+domination: of Risk or RisiKo. It has many game options and includes many maps.
+domination:
+domination: Domination is written in Java. It includes single-player vs. AI,
+domination: networked multiplayer, and many other features. It works in all OSes
+domination: that run Java 1.4 or higher, and Android.
+domination:
+domination:
+domination: