diff --git a/packages/addons/games/sauerbraten/build b/packages/addons/games/sauerbraten/build new file mode 100755 index 0000000000..d3addc461c --- /dev/null +++ b/packages/addons/games/sauerbraten/build @@ -0,0 +1,44 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain +$SCRIPTS/build zlib +$SCRIPTS/build libpng +$SCRIPTS/build $LIBJPEG +$SCRIPTS/build libX11 +$SCRIPTS/build SDL +$SCRIPTS/build SDL_image +$SCRIPTS/build SDL_mixer +$SCRIPTS/build Mesa + +ADDON_NAME="plugin.games.$1" +ADDON_VERSION="1" + +PKG_DIR=`find $ROOT/$PACKAGES -type d -name $1` + +cd $BUILD/$1/src + +cd enet + ./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + +cd .. + +make + +cd .. + +mkdir -p .addons/$ADDON_NAME + cp -R data .addons/$ADDON_NAME + cp -R packages .addons/$ADDON_NAME + cp *.cfg .addons/$ADDON_NAME + cp -R $PKG_DIR/scripts/* .addons/$ADDON_NAME + $SED "s|@ADDON_VERSION@|$OS_VERSION.$ADDON_VERSION|g" -i .addons/$ADDON_NAME/addon.xml + +mkdir -p .addons/$ADDON_NAME/bin + cp src/sauer_client .addons/$ADDON_NAME/bin + cp src/sauer_server .addons/$ADDON_NAME/bin + +cd .addons + zip -rq $ADDON_NAME-$OS_VERSION.$ADDON_VERSION.zip $ADDON_NAME diff --git a/packages/addons/games/sauerbraten/install b/packages/addons/games/sauerbraten/install new file mode 100755 index 0000000000..d924e3b03b --- /dev/null +++ b/packages/addons/games/sauerbraten/install @@ -0,0 +1,15 @@ +#!/bin/sh + +. config/options + +ADDON_NAME="plugin.games.$1" +ADDON_VERSION="1" + +PKG_DIR=`find $PACKAGES -type d -name $1` + +if [ "$2" = addons ]; then + mkdir -p $TARGET_ADDONS/$ADDON_NAME + cp $BUILD/$1/.addons/$ADDON_NAME-$OS_VERSION.$ADDON_VERSION.zip $TARGET_ADDONS/$ADDON_NAME + cp $PKG_DIR/scripts/changelog.txt $TARGET_ADDONS/$ADDON_NAME/changelog-$OS_VERSION.$ADDON_VERSION.txt + cp $PKG_DIR/scripts/icon.png $TARGET_ADDONS/$ADDON_NAME/icon.png +fi diff --git a/packages/addons/games/sauerbraten/patches/sauerbraten-fix_includes_and_libs-0.1.diff b/packages/addons/games/sauerbraten/patches/sauerbraten-fix_includes_and_libs-0.1.diff new file mode 100644 index 0000000000..9b27089586 --- /dev/null +++ b/packages/addons/games/sauerbraten/patches/sauerbraten-fix_includes_and_libs-0.1.diff @@ -0,0 +1,14 @@ +diff -Naur sauerbraten/src/Makefile sauerbraten.patch/src/Makefile +--- sauerbraten/src/Makefile 2009-04-22 19:47:44.000000000 +0200 ++++ sauerbraten.patch/src/Makefile 2010-07-18 20:21:19.321805286 +0200 +@@ -18,8 +18,8 @@ + CLIENT_INCLUDES= $(INCLUDES) -Iinclude + CLIENT_LIBS= -mwindows -Llib -lSDL -lSDL_image -lSDL_mixer -lzdll -lopengl32 -lenet -lws2_32 -lwinmm + else +-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags` +-CLIENT_LIBS= -Lenet -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL ++CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags` ++CLIENT_LIBS= -Lenet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL + endif + ifeq ($(PLATFORM),Linux) + CLIENT_LIBS+= -lrt diff --git a/packages/addons/games/sauerbraten/scripts/addon.xml b/packages/addons/games/sauerbraten/scripts/addon.xml new file mode 100644 index 0000000000..3bceb9a92e --- /dev/null +++ b/packages/addons/games/sauerbraten/scripts/addon.xml @@ -0,0 +1,21 @@ + + + + + + + + executable + + + Cube 2: Sauerbraten + +Sauerbraten is a free multiplayer/singleplayer first person shooter, built as a major redesign of the Cube FPS. +Much like the original Cube, the aim of this game is not necessarily to produce the most features and eyecandy possible, but rather to allow map/geometry editing to be done dynamically in-game, to create fun gameplay and an elegant engine. + all + + diff --git a/packages/addons/games/sauerbraten/scripts/changelog.txt b/packages/addons/games/sauerbraten/scripts/changelog.txt new file mode 100644 index 0000000000..b660bff93a --- /dev/null +++ b/packages/addons/games/sauerbraten/scripts/changelog.txt @@ -0,0 +1,2 @@ +0.90.1 +- initial version sauerbraten-2009.05.04 \ No newline at end of file diff --git a/packages/addons/games/sauerbraten/scripts/default.py b/packages/addons/games/sauerbraten/scripts/default.py new file mode 100644 index 0000000000..6ad5d8a9a5 --- /dev/null +++ b/packages/addons/games/sauerbraten/scripts/default.py @@ -0,0 +1,26 @@ +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.openelec.tv +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +import sys +import xbmcaddon +import os + +if ( __name__ == "__main__" ): + os.system("sh start.sh") diff --git a/packages/addons/games/sauerbraten/scripts/icon.png b/packages/addons/games/sauerbraten/scripts/icon.png new file mode 100644 index 0000000000..b32e4b3ef4 Binary files /dev/null and b/packages/addons/games/sauerbraten/scripts/icon.png differ diff --git a/packages/addons/games/sauerbraten/scripts/start.sh b/packages/addons/games/sauerbraten/scripts/start.sh new file mode 100755 index 0000000000..2d0b044d4e --- /dev/null +++ b/packages/addons/games/sauerbraten/scripts/start.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.openelec.tv +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +RESOLUTION=`xrandr | grep Screen | cut -f2 -d"," | sed -e "s/ //g" -e "s/current//g"` +RESOLUTION_WIDTH=`echo $RESOLUTION | cut -f1 -d "x"` +RESOLUTION_HEIGHT=`echo $RESOLUTION | cut -f2 -d "x"` + +SAUER_DATA=. +SAUER_OPTIONS="-q${HOME}/.sauerbraten -r" + +# fix permissions lost after unpack + chmod +x ./bin/sauer_client + chmod +x ./bin/sauer_server + +./bin/sauer_client ${SAUER_OPTIONS} "$@" diff --git a/packages/addons/games/sauerbraten/url b/packages/addons/games/sauerbraten/url new file mode 100644 index 0000000000..867322d8ab --- /dev/null +++ b/packages/addons/games/sauerbraten/url @@ -0,0 +1 @@ +http://downloads.sourceforge.net/project/sauerbraten/sauerbraten/2009_05_04/sauerbraten_2009_05_04_trooper_edition_linux.tar.bz2 \ No newline at end of file