games/armagetronad: Added (old school Tron lightcycles openGL game)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
This commit is contained in:
parent
087c1f8362
commit
e0dbc16969
|
@ -0,0 +1,28 @@
|
|||
armagetronad (old school Tron lightcycles Cycles OpenGL game)
|
||||
|
||||
A Tron lightcycles game clone that offers up to 16 players, a highly
|
||||
advanced AI, and network/internet play in a full OpenGL 3D environment.
|
||||
|
||||
This build includes the game client and Master server.
|
||||
It will install system-wide configuration into /etc/armagetronad.
|
||||
|
||||
Full documentation exists in /usr/doc/armagetronad-<version>/
|
||||
|
||||
The armagetronad server initscript is stored as:
|
||||
/usr/share/games/armagetronad/scripts/rcd_master
|
||||
To use this script, symlink it to /etc/rc.d with this command:
|
||||
ln -s /usr/share/games/armagetronad/scripts/rcd_master /etc/rc.d/rc.armagetronad
|
||||
|
||||
The armagetronad server system-wide install scripts enable the creation
|
||||
of a user called 'armagetronad' for use with the Master server.
|
||||
This user isn't created by default by this package.
|
||||
If you would like to create this user in the same fashion as the
|
||||
armagetronad system-wide install script, the user creation section
|
||||
is in a separate user_creation.sh script that you can execute
|
||||
(or alternatively create an armagetronad user manually).
|
||||
|
||||
If gameplay looks too fast on your hardware, you can set a negative
|
||||
speed factor in Play Game -> Game Setup -> Speed. -2 looks fine here.
|
||||
On the opposite, setting positive factors accelerates the game.
|
||||
|
||||
This needs ftgl and protobuf, available at slackbuilds.org.
|
|
@ -0,0 +1,124 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Written by ponce <matteo.bernardini@gmail.com>
|
||||
# based on the hollywoodb's one on 12.2 repository
|
||||
|
||||
PRGNAM=armagetronad
|
||||
VERSION=${VERSION:-r999}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -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
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $PKG
|
||||
rm -rf $TMP/$PRGNAM-$VERSION
|
||||
cd $TMP
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
|
||||
cd $PRGNAM-$VERSION
|
||||
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
sh bootstrap.sh
|
||||
|
||||
# Using --disable-games since it peppers installation
|
||||
# paths with 'games' subdirectories and we're handling that manually.
|
||||
# --enable-useradd is used, but no user is created (see README)
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--bindir=/usr/games \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--datadir=/usr/share/games \
|
||||
--docdir=/usr/doc \
|
||||
--enable-glout \
|
||||
--enable-master \
|
||||
--enable-main \
|
||||
--enable-music \
|
||||
--disable-dirty \
|
||||
--enable-sysinstall \
|
||||
--disable-uninstall \
|
||||
--enable-useradd \
|
||||
--enable-etc \
|
||||
--enable-desktop \
|
||||
--enable-initscripts=/etc/rc.d \
|
||||
--disable-games \
|
||||
--enable-binreloc \
|
||||
--enable-binreloc-threads
|
||||
|
||||
make
|
||||
make install 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
|
||||
|
||||
mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a {AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README*} $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
rm -rf $PKG/etc/rc.d
|
||||
|
||||
# don't overwrite old configs
|
||||
CONFIGS="aiplayers.cfg \
|
||||
default.cfg \
|
||||
keys_cursor.cfg \
|
||||
keys_cursor_single.cfg \
|
||||
keys_twohand.cfg \
|
||||
keys_wasd.cfg \
|
||||
keys_x.cfg \
|
||||
keys_zqsd.cfg \
|
||||
settings.cfg \
|
||||
settings_authentication.cfg \
|
||||
settings_dedicated.cfg \
|
||||
settings_visual.cfg"
|
||||
for config in $CONFIGS ;
|
||||
do
|
||||
mv $PKG/etc/$PRGNAM/$config $PKG/etc/$PRGNAM/$config.new ;
|
||||
done
|
||||
|
||||
# fix .desktop file
|
||||
mkdir $PKG/usr/share/applications
|
||||
mv $PKG/usr/share/games/$PRGNAM/desktop/$PRGNAM.desktop $PKG/usr/share/applications
|
||||
install -D -m 0644 $PKG/usr/share/games/armagetronad/desktop/icons/large/armagetronad.png \
|
||||
$PKG/usr/share/pixmaps/armagetronad.png
|
||||
|
||||
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 -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}
|
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="armagetronad"
|
||||
VERSION="r999"
|
||||
HOMEPAGE="http://armagetronad.net"
|
||||
DOWNLOAD="http://ponce.cc/slackware/sources/repo/armagetronad-r999.tar.xz"
|
||||
MD5SUM="9c93c842fdd8aee2a430b5b72496176c"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="ponce"
|
||||
EMAIL="matteo.bernardini@gmail.com"
|
||||
APPROVED="Erik Hanson"
|
|
@ -0,0 +1,33 @@
|
|||
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...
|
||||
}
|
||||
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
CONFIGS="aiplayers.cfg \
|
||||
default.cfg \
|
||||
keys_cursor.cfg \
|
||||
keys_cursor_single.cfg \
|
||||
keys_twohand.cfg \
|
||||
keys_wasd.cfg \
|
||||
keys_x.cfg \
|
||||
keys_zqsd.cfg \
|
||||
settings.cfg \
|
||||
settings_authentication.cfg \
|
||||
settings_dedicated.cfg \
|
||||
settings_visual.cfg"
|
||||
for config in $CONFIGS ;
|
||||
do
|
||||
config etc/armagetronad/$config.new ;
|
||||
done
|
|
@ -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 ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
armagetronad: armagetronad (old school Tron lightcycles openGL game)
|
||||
armagetronad:
|
||||
armagetronad: A Tron lightcycles game clone that offers up to 16 players, an highly
|
||||
armagetronad: advanced AI, and network/internet play in a full 3D environment.
|
||||
armagetronad:
|
||||
armagetronad: This build includes the game client and Master server. It will install
|
||||
armagetronad: a system-wide configuration and server initscripts into /etc &
|
||||
armagetronad: /etc/rc.d. This build does NOT create the 'armagetronad' user for use
|
||||
armagetronad: with the Master server. The dedicated server is NOT built.
|
||||
armagetronad:
|
||||
armagetronad:
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# armagetronad default user to use with Master server creation script.
|
||||
|
||||
AUSER=armagetronad
|
||||
AUID=244
|
||||
AGID=20
|
||||
|
||||
if test -w /etc/passwd; then
|
||||
echo "Creating user ${AUSER} with UID:${AUID} GID:${AGID}"
|
||||
if which useradd > /dev/null 2>&1; then
|
||||
useradd -u ${AUID} -g ${AGID} ${AUSER} || echo -e "\nWarning: unable to create user with 'useradd'. Giving up.\n"
|
||||
else
|
||||
echo -e "\nWarning: unable to find suitable program to add user.\n"
|
||||
fi
|
||||
|
||||
else # no write acces to /etc/passwd
|
||||
echo -e "\nWarning: no write access to /etc/passwd, can't add user. Try as root.\n"
|
||||
fi
|
Loading…
Reference in New Issue