summaryrefslogtreecommitdiff
path: root/games/assaultcube
diff options
context:
space:
mode:
Diffstat (limited to 'games/assaultcube')
-rw-r--r--games/assaultcube/Makefile.patch28
-rw-r--r--games/assaultcube/README6
-rw-r--r--games/assaultcube/assaultcube.SlackBuild86
-rw-r--r--games/assaultcube/assaultcube.desktop12
-rw-r--r--games/assaultcube/assaultcube.info12
-rw-r--r--games/assaultcube/doinst.sh4
-rw-r--r--games/assaultcube/slack-desc19
7 files changed, 167 insertions, 0 deletions
diff --git a/games/assaultcube/Makefile.patch b/games/assaultcube/Makefile.patch
new file mode 100644
index 0000000000..d655376c7c
--- /dev/null
+++ b/games/assaultcube/Makefile.patch
@@ -0,0 +1,28 @@
+diff -Naur update.orig/source/src/Makefile update/source/src/Makefile
+--- update.orig/source/src/Makefile 2009-02-14 16:02:36.000000000 +0000
++++ update/source/src/Makefile 2009-06-29 16:57:39.000000000 +0000
+@@ -1,12 +1,12 @@
+-CXXOPTFLAGS=-O3 -fomit-frame-pointer
+-INCLUDES1=-I/usr/X11R6/include -I../enet/include -I../src
++CXXOPTFLAGS?=-O3 -fomit-frame-pointer
++INCLUDES1=-I../enet/include -I/usr/X11R6/include -I../src
+ INCLUDES2=`sdl-config --cflags`
+ CXXCUSTOMFLAGS=-fsigned-char -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wpointer-arith -Wwrite-strings -Wconversion -rdynamic
+ CXXFLAGS=$(CXXOPTFLAGS) $(INCLUDES1) $(INCLUDES2) $(CUSTOMFLAGS)
+ CXXFLAGSSERVER=$(CXXOPTFLAGS) $(INCLUDES1) $(CUSTOMFLAGS)
+
+ PLATFORM_PREFIX=native
+-CLIENT_LIBS=-L/usr/X11R6/lib -L../enet -lenet `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile
++CLIENT_LIBS=-L../enet -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile
+ CLIENT_OBJS1= \
+ client.o \
+ clientgame.o \
+@@ -69,7 +69,7 @@
+ all: libenet client server
+
+ ../enet/Makefile:
+- cd ../enet; ./configure
++ cd ../enet; ./configure --enable-crc32
+
+ libenet: ../enet/Makefile
+ -$(MAKE) -C ../enet all
diff --git a/games/assaultcube/README b/games/assaultcube/README
new file mode 100644
index 0000000000..218b4debbf
--- /dev/null
+++ b/games/assaultcube/README
@@ -0,0 +1,6 @@
+formerly ActionCube, is a free first-person-shooter
+based on the game Cube. Set in a realistic looking
+environment, as far as thatīs possible with this
+engine, while gameplay stays fast and arcade.
+
+Requires OpenAL.
diff --git a/games/assaultcube/assaultcube.SlackBuild b/games/assaultcube/assaultcube.SlackBuild
new file mode 100644
index 0000000000..568987bb52
--- /dev/null
+++ b/games/assaultcube/assaultcube.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# Slackware build script for assaultcube
+
+# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
+
+SRCNAM=AssaultCube
+PRGNAM=assaultcube
+VERSION=${VERSION:-1.0.4}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf ${SRCNAM}_v1.0.2
+tar xvf $CWD/${SRCNAM}_v1.0.2.tar.bz2
+cd ${SRCNAM}_v1.0.2
+tar xvf $CWD/${SRCNAM}_v${VERSION}-Update.tar.bz2
+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 {} \;
+
+# We need to change the order of the enet libs and includes. Enet libs and include
+# directories need to be declared first as compile will fail if enet is already
+# installed on the system and the Makefile uses system files instead. Also, use
+# custom SLKCFLAGS.
+patch -p1 < $CWD/Makefile.patch
+sed -i "s|-O2|$SLKCFLAGS|" source/enet/configure
+
+CXXOPTFLAGS="$SLKCFLAGS -fomit-frame-pointer" \
+make -C source/src
+CXXOPTFLAGS="$SLKCFLAGS -fomit-frame-pointer" \
+make -C source/src install
+
+mkdir -p $PKG/usr/games $PKG/usr/share/$PRGNAM
+sed -i "/^CUBE_DIR/s|=.*|=\"/usr/share/${PRGNAM}\"|" $PRGNAM.sh
+install -m 0755 $PRGNAM.sh $PKG/usr/games/$PRGNAM
+chmod 0755 bin_unix/*
+cp -ar \
+ bin_unix config bot demos mods packages screenshots \
+ $PKG/usr/share/$PRGNAM
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications
+convert icon.ico $PRGNAM.png
+install -m 0644 $PRGNAM-0.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ source/*.txt source/src/*.txt docs \
+ $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:-tgz}
diff --git a/games/assaultcube/assaultcube.desktop b/games/assaultcube/assaultcube.desktop
new file mode 100644
index 0000000000..7029fcbe28
--- /dev/null
+++ b/games/assaultcube/assaultcube.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=/usr/games/assaultcube
+Icon=assaultcube
+Type=Application
+Terminal=false
+MultipleArgs=false
+Name=AssaultCube
+GenericName=Realistic Multiplayer FPS
+MimeType=text/html
+StartupNotify=false
+Categories=Game;ActionGame;
diff --git a/games/assaultcube/assaultcube.info b/games/assaultcube/assaultcube.info
new file mode 100644
index 0000000000..1e94b0fe9a
--- /dev/null
+++ b/games/assaultcube/assaultcube.info
@@ -0,0 +1,12 @@
+PRGNAM="assaultcube"
+VERSION="1.0.4"
+HOMEPAGE="http://assault.cubers.net/"
+DOWNLOAD="http://downloads.sourceforge.net/actiongame/AssaultCube_v1.0.2.tar.bz2
+ http://downloads.sourceforge.net/sourceforge/actiongame/AssaultCube_v1.0.4-Update.tar.bz2"
+MD5SUM="e083182699e65c240d8c7fa051644e6f
+ d907a279879fed8c21cd3ba83ce984bf"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Larry Hajali"
+EMAIL="larryhaja[at]gmail[dot]com"
+APPROVED="dsomero"
diff --git a/games/assaultcube/doinst.sh b/games/assaultcube/doinst.sh
new file mode 100644
index 0000000000..4e8ba7071d
--- /dev/null
+++ b/games/assaultcube/doinst.sh
@@ -0,0 +1,4 @@
+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/assaultcube/slack-desc b/games/assaultcube/slack-desc
new file mode 100644
index 0000000000..08adc3790e
--- /dev/null
+++ b/games/assaultcube/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+assaultcube: AssaultCube (First person shooter game)
+assaultcube:
+assaultcube: AssaultCube, formerly ActionCube, is a free first-person-shooter
+assaultcube: based on the game Cube. Set in a realistic looking environment,
+assaultcube: as far as that's possible with this engine, while gameplay stays
+assaultcube: fast and arcade. This game is all about team oriented multiplayer
+assaultcube: fun. Network game also 56k and up.
+assaultcube:
+assaultcube: Homepage: http://assault.cubers.net/
+assaultcube:
+assaultcube: