summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-09-12 01:42:00 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-09-12 23:08:53 -0500
commit250dd5450676fc9263c21e6e2144b01b09f4f585 (patch)
tree76e4bc0ad6501eb962b16d26b20f907372248f03
parent076d539a097d737ff2641722b3560fbe0e791472 (diff)
downloadslackbuilds-250dd5450676fc9263c21e6e2144b01b09f4f585.tar.gz
games/xspacewarp: include manpage and Xdefaults file
Thanks to Luis Henrique. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--games/xspacewarp/XSpacewarp267
-rw-r--r--games/xspacewarp/doinst.sh15
-rw-r--r--games/xspacewarp/xspacewarp.SlackBuild24
-rw-r--r--games/xspacewarp/xspacewarp.info6
-rw-r--r--games/xspacewarp/xspacewarp.man35
5 files changed, 335 insertions, 12 deletions
diff --git a/games/xspacewarp/XSpacewarp b/games/xspacewarp/XSpacewarp
new file mode 100644
index 0000000000..15960e6a1e
--- /dev/null
+++ b/games/xspacewarp/XSpacewarp
@@ -0,0 +1,267 @@
+! app-defaults for xspacewarp 1.2 (12/22/95)
+
+! whether to use mouse pointer inside xspacewarp window
+*nomouse: true
+
+! number rows of 9x15 blocks in a sector of the universe
+*rows: 26
+
+! number columns of 9x15 blocks in a sector of the universe
+*columns: 79
+
+! The following resources refer to the number of bases, jovians,
+! stars and blackholes in the universe. "min" values correspond
+! to the lowest skill level of the game and "max" values
+! correspond to the highest skill level. Values for the other
+! skill levels are interpolated linearly between the "min" value
+! and the "max" value. Populations are chosen randomly in the
+! range: (average) +/- (variation).
+
+! Limits for the average population and the variation in
+! population for bases. The actual average and variation used
+! is interpolated linearly from these limits as a function of
+! the skill level.
+
+*minAverageBasePop: 18
+*maxAverageBasePop: 18
+*minVariationBasePop: 3
+*maxVariationBasePop: 3
+
+! Limits for the average population and the variation in
+! population for jovians.
+
+*minAverageJovianPop: 10
+*maxAverageJovianPop: 73
+*minVariationJovianPop: 3
+*maxVariationJovianPop: 3
+
+! Limits for the average population and the variation in
+! population for stars.
+
+*minAverageStarPop: 75
+*maxAverageStarPop: 75
+*minVariationStarPop: 5
+*maxVariationStarPop: 5
+
+! Limits for the average population and the variation in
+! population for blackholes.
+
+*minAverageBlackholePop: 5
+*maxAverageBlackholePop: 5
+*minVariationBlackholePop: 4
+*maxVariationBlackholePop: 4
+
+! color for text and graphical borders
+*foreground: white
+
+! background color for everything
+*background: black
+
+! visual representation of the endever (icon must have exactly 3 characters)
+*endeverColor: white
+*endeverIcon: >-0
+
+! visual representation of the jovians (icon must have exactly 3 characters)
+*jovianColor: white
+*jovianIcon: <*>
+
+! visual representation of the bases (icon must have exactly 3 characters)
+*baseColor: white
+*baseIcon: +0+
+
+! visual representation of the stars (icon must have exactly 1 character)
+*starColor: white
+*starIcon: .
+
+! visual representation of the blackholes (icon must have exactly 1 character)
+*blackholeColor: black
+*blackholeIcon: \040
+
+! faser color
+*faserColor: white
+
+! torpedo color
+*torpedoColor: white
+
+! Fasers are drawn as dashed lines. The dash list describes the
+! dash pattern of the line. A list such as "3 2 4" (elements of
+! the list are separated by \040, the octal code for a space
+! character) will make a dash pattern that has the first 3
+! pixels of the line lit, the next 2 pixels dark and the next 4
+! pixels lit. This pattern is repeated through the dashed
+! line. The dash offset is the pixel in the dash list at which
+! to begin the pattern. Eg, offset=3 in the example above would
+! mean starting the dashed line with 2 lit pixels followed by 4
+! unlit pixels and then 3 lit pixels, etc.
+*faserDashList: 4\0404
+*faserDashOffset: 0
+
+! Thickness of faser in pixels
+*faserWidth: 9
+
+! millisec time determines speed of ion thrusters
+*endeverThrustSpeed: 100
+
+! millisec interval for ship (base, jovian, endever) re-energizing
+*shipEnergizeSpeed: 3000
+
+! millisec interval between jovian actions
+*jovianActionSpeed: 100
+
+! millisec interval for faser movement
+*faserSpeed: 15
+
+! millisec interval for torpedo movement
+*torpedoSpeed: 30
+
+! dimensions of torpedo (in pixels)
+*torpedoLength: 6
+*torpedoWidth: 9
+
+! millisec interval for rate of explosion growth
+*explosionSpeed: 20
+
+*explosionColor: white
+
+! radius to use for most ship explosions
+*explosionRadiusSmall: 35
+
+! radius to use for endever self-destruct explosion
+*explosionRadiusBig: 200
+
+! endever self-destruct code
+*selfDestructCode: 123
+
+! endever default faser/torpedo angle (radians). type float.
+*defaultFiringAngle: 0.0
+
+! starting number of torpedoes for endever
+*maxTorpedoes: 10
+
+*maxJoviansPerSector: 3
+*maxStarsPerSector: 5
+
+! probability a sector is masked (percent)
+*maskProbability: 5
+
+! When the Endever leaps into a new sector, it gets placed at a
+! random location inside that sector. The euclidean distance
+! (in pixels) from this location to the jovians inside the
+! sector is at least this value.
+
+*minJovianDistance: 150
+
+! min percent energy needed for endever fasers to work
+*endeverMinFaserEnergy: 10
+
+! min percent energy for endever warpdrive to work
+*endeverMinWarpEnergy: 20
+
+! min percent energy for endever ion thrusters to work
+*endeverMinThrustEnergy: 10
+
+! min percent energy needed for jovian fasers to work
+*jovianMinFaserEnergy: 10
+
+! min percent energy for jovian warpdrive to work
+*jovianMinWarpEnergy: 20
+
+! min percent energy for ion thrusters to work
+*jovianMinThrustEnergy: 10
+
+
+! Now some "artificial intelligence" parameters for controlling
+! jovian behavior.
+
+! If the percent energy levels (ie, percent of maximum energy)
+! of the thrusters, warpdrive, fasers and shields of a jovian
+! drop to levels less than the respective "retreat" energies
+! given below, then the jovian will exit the battle scene with
+! probability (given as a percent)
+! jovianRetreatProbability. jovianRetreatSpeed (type float) is
+! the average rate (movements/sec) at which the jovian retreats
+! toward the sector edge. Thus if jovianRetreatSpeed is 1.4,
+! then a fleeing jovian will make a movement toward the edge of
+! the sector, on average, once every 1.4 seconds. And if the
+! jovian happens to already be on the edge of the sector, then
+! the jovian will leap to a different sector (if its warpdrive
+! energy is adequate) after a pause of 1.4 seconds on average.
+
+*jovianThrustRetreatEnergy: 30
+*jovianWarpRetreatEnergy: 40
+*jovianFaserRetreatEnergy: 30
+*jovianShieldRetreatEnergy: 40
+*jovianRetreatProbability: 50
+*jovianRetreatSpeed: 1.0
+
+
+! If the endever or a base being raided is in the same sector as
+! a jovian, then the jovian moves or shoots (on average) every
+! jovianMaxFightFrequency seconds in the highest skill level of
+! the game and every jovianMinFightFrequency seconds in lowest
+! skill level. Fight frequencies for the other skill levels are
+! interpolated linearly between jovianMinFightFrequency and
+! jovianMaxFightFrequency. These resources are type "float".
+
+*jovianMaxFightFrequency: 1.5
+*jovianMinFightFrequency: 3.5
+
+! When a sector contains a base and a jovian, but not the
+! endever, then there is a possibility of an attack or "raid" on
+! the base. These resources are the average time in seconds
+! before some jovian somewhere in the universe launches a raid
+! on a base. jovianMaxRaidFrequency is for the highest skill
+! level, jovianMinRaidFrequency is for the lowest skill
+! level. Values for other skill levels are interpolated linearly
+! between these extremes. These resources are type "float".
+
+*jovianMaxRaidFrequency: 40.0
+*jovianMinRaidFrequency: 400.0
+
+! If a jovian is in a sector containing neither a base nor the
+! endever, then there is a possibility of the jovian leaping to
+! a different sector. These resources are the average number of
+! seconds until some jovian somewhere in the universe leaps to a
+! sector containing a base or the
+! endever. jovianMaxLeapFrequency is for the highest skill level
+! and jovianMinLeapFrequency is for the lowest skill
+! level. Values for the other skill levels are interpolated in
+! between these extremes. These resources are type "float".
+
+*jovianMaxLeapFrequency: 40.0
+*jovianMinLeapFrequency: 400.0
+
+! key bindings for the endever
+
+*widget.translations: #replace \n\
+ <Expose>: expose() \n\
+ <Key>KP_Up: move(up) \n\
+ <Key>KP_Down: move(down) \n\
+ <Key>KP_Left: move(left) \n\
+ <Key>KP_Right: move(right) \n\
+ <Key>Up: move(up) \n\
+ <Key>Down: move(down) \n\
+ <Key>Left: move(left) \n\
+ <Key>Right: move(right) \n\
+ <Key>space: mission(start) sector() \n\
+ <Key>1: input() scanner() \n\
+ <Key>2: input() summary() \n\
+ <Key>3: input() leap() \n\
+ <Key>4: input() shields() \n\
+ <Key>5: input() fasers() \n\
+ <Key>6: input() torpedoes() \n\
+ <Key>7: input() selfdestruct() \n\
+ <Key>8: input() \n\
+ <Key>9: input() \n\
+ <Key>0: input() \n\
+ <Key>-: input() \n\
+ <Key>Return: endinput() \n\
+ <Key>BackSpace: backspace() \n\
+ <Key>n: orientation(next) replay(no) \n\
+ <Key>o: mission(orient) \n\
+ <Key>p: orientation(prev) pause() \n\
+ <Key>q: orientation(quit) \n\
+ <Key>y: replay(yes)
+
+! end app-defaults
+
diff --git a/games/xspacewarp/doinst.sh b/games/xspacewarp/doinst.sh
index 5fb28930db..1015d8fd4d 100644
--- a/games/xspacewarp/doinst.sh
+++ b/games/xspacewarp/doinst.sh
@@ -1,3 +1,18 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/X11/app-defaults/XSpacewarp.new
+
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/xspacewarp/xspacewarp.SlackBuild b/games/xspacewarp/xspacewarp.SlackBuild
index fbabd9b526..537c948b0e 100644
--- a/games/xspacewarp/xspacewarp.SlackBuild
+++ b/games/xspacewarp/xspacewarp.SlackBuild
@@ -4,21 +4,21 @@
# Time Trek - like game for X Window System
# Written by Niels Horn <niels.horn@gmail.com>
-# Revision date: 2010/06/01
+# Revision date: 2010/09/11
+
+# man-page and app-defaults files by Luis Henrique <lmello.009@gmail.com>
PRGNAM=xspacewarp
VERSION=${VERSION:-1.2b}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCVERSION=$(echo $VERSION | cut -b -3)
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -69,6 +69,18 @@ make install BINDIR=/usr/games DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# Install X app-defaults
+mkdir -p $PKG/etc/X11/app-defaults
+cat $CWD/XSpacewarp > $PKG/etc/X11/app-defaults/XSpacewarp.new
+
+# Put man-page in package
+mkdir -p $PKG/usr/man/man6
+cat $CWD/xspacewarp.man | gzip -9 > $PKG/usr/man/man6/xspacewarp.6.gz
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
CHANGES INSTALL \
@@ -76,10 +88,6 @@ cp -a \
cat $CWD/xspacewarp-1.2.README > $PKG/usr/doc/$PRGNAM-$VERSION/README
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mkdir -p $PKG/usr/share/{applications,pixmaps}
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
diff --git a/games/xspacewarp/xspacewarp.info b/games/xspacewarp/xspacewarp.info
index 49c0d09ec9..ace901c662 100644
--- a/games/xspacewarp/xspacewarp.info
+++ b/games/xspacewarp/xspacewarp.info
@@ -1,10 +1,8 @@
PRGNAM="xspacewarp"
VERSION="1.2b"
HOMEPAGE="http://ftp.x.org/contrib/games/xspacewarp-1.2.README"
-DOWNLOAD="http://ftp.x.org/contrib/games/xspacewarp-1.2.tar.gz \
- http://ftp.x.org/contrib/games/xspacewarp-1.2.README"
-MD5SUM="54aa93eb6fd3d7fa396fc47ddf3ffd15 \
- 2ada097ae26285e710f2e4976744e7cf"
+DOWNLOAD="http://ftp.x.org/contrib/games/xspacewarp-1.2.tar.gz"
+MD5SUM="54aa93eb6fd3d7fa396fc47ddf3ffd15"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Niels Horn"
diff --git a/games/xspacewarp/xspacewarp.man b/games/xspacewarp/xspacewarp.man
new file mode 100644
index 0000000000..f2ed190759
--- /dev/null
+++ b/games/xspacewarp/xspacewarp.man
@@ -0,0 +1,35 @@
+.TH XSPACEWARP 6 "July 26, 2010"
+.SH NAME
+xspacewarp -\ Time Trek like game for X Window System
+.SH SYNOPSIS
+.B xspacewarp
+[
+.I X options
+]
+.SH DESCRIPTION
+In \fBxspacewarp\fP the player maneuvers a Federation spaceship,
+called the Endever, through 81 sectors of space trying to
+destroy an Armada of enemy Jovian ships before they destroy the
+all the Federation bases. To accompish this task, the Endever
+has fasers, ion thrust engines, warpdrive for jumping between
+sectors, a limited number of photon torpedoes, and a finite
+store of energy which gets depleted during battles and must be
+replenished by docking with the bases. The game has no time
+limit and has a choice of 10 skill levels.
+.P
+Ported to X from a game originally written for the TRS-80 in 1977.
+.SH OPTIONS
+.B xspacewarp
+only takes default \fIX options\fR, see X(7) for more details.
+.SH FILES
+You can modify pratically every single variable of the game by
+making a copy of \fI/etc/X11/app-defaults/XSpacewarp\fR into your
+home directory and tweaking it accordingly.
+.SH SEE ALSO
+X(7)
+.SH CREDITS
+Joshua Lavinsky - original TRS-80 program (1977)
+.br
+Greg Walker - X11 port (12/22/95)
+.br
+Niels Horn - adaptation for modern gcc compilers (05/14/10)