diff --git a/packages/addons/games/wesnoth/build b/packages/addons/games/wesnoth/build new file mode 100755 index 0000000000..103bf0d007 --- /dev/null +++ b/packages/addons/games/wesnoth/build @@ -0,0 +1,47 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain +$SCRIPTS/build boost +$SCRIPTS/build lua +$SCRIPTS/build zlib +$SCRIPTS/build libX11 +$SCRIPTS/build pango +$SCRIPTS/build fontconfig +$SCRIPTS/build SDL +$SCRIPTS/build SDL_image +$SCRIPTS/build SDL_mixer +$SCRIPTS/build SDL_net +$SCRIPTS/build SDL_ttf + +ADDON_NAME="plugin.games.$1" +ADDON_VERSION="1" + +PKG_DIR=`find $ROOT/$PACKAGES -type d -name $1` + +cd $PKG_BUILD + +rm -rf build +mkdir -p build +cd build + +cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ + -DCMAKE_INSTALL_PREFIX=/usr/games/$1 \ + .. + +make + +cd .. + +mkdir -p .addons/$ADDON_NAME + cp -R data fonts images sounds translations .addons/$ADDON_NAME + cp l10n-track .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 build/wesnoth .addons/$ADDON_NAME/bin + +cd .addons + zip -rq $ADDON_NAME-$OS_VERSION.$ADDON_VERSION.zip $ADDON_NAME diff --git a/packages/addons/games/wesnoth/install b/packages/addons/games/wesnoth/install new file mode 100755 index 0000000000..749f29fa75 --- /dev/null +++ b/packages/addons/games/wesnoth/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 $PKG_BUILD/.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/wesnoth/scripts/addon.xml b/packages/addons/games/wesnoth/scripts/addon.xml new file mode 100644 index 0000000000..cabd2bb2d8 --- /dev/null +++ b/packages/addons/games/wesnoth/scripts/addon.xml @@ -0,0 +1,23 @@ + + + + + + + + executable + + + The Battle for Wesnoth + +The Battle for Wesnoth is a turn-based strategy game with a fantasy theme. +Build up a great army, gradually turning raw recruits into hardened veterans. In later games, recall your toughest warriors and form a deadly host against whom none can stand! Choose units from a large pool of specialists, and hand-pick a force with the right strengths to fight well on different terrains against all manner of opposition. Wesnoth has many different sagas waiting to be played out. Fight to regain the throne of Wesnoth, of which you are the legitimate heir... step into the boots of a young officer sent to guard a not-so-sleepy frontier outpost... vanquish a horde of undead warriors unleashed by a foul necromancer, who also happens tohave taken your brother hostage... guide a band of elvish survivors in an epic quest to find a new home. +200+ unit types. 16 races. 6 major factions. Hundreds of years of history. The world of Wesnoth is absolutely huge and limited only by your creativity - make your own custom units, compose your own maps, and write your own scenarios or even full-blown campaigns. You can also challenge up to 8 friends - or strangers - and fight in epic multi-player fantasy battles. + + all + + diff --git a/packages/addons/games/wesnoth/scripts/changelog.txt b/packages/addons/games/wesnoth/scripts/changelog.txt new file mode 100644 index 0000000000..bd720cd4d6 --- /dev/null +++ b/packages/addons/games/wesnoth/scripts/changelog.txt @@ -0,0 +1,2 @@ +0.90.1 +- initial version wesnoth-1.8.3 \ No newline at end of file diff --git a/packages/addons/games/wesnoth/scripts/default.py b/packages/addons/games/wesnoth/scripts/default.py new file mode 100644 index 0000000000..6ad5d8a9a5 --- /dev/null +++ b/packages/addons/games/wesnoth/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/wesnoth/scripts/icon.png b/packages/addons/games/wesnoth/scripts/icon.png new file mode 100644 index 0000000000..f9e3a3366a Binary files /dev/null and b/packages/addons/games/wesnoth/scripts/icon.png differ diff --git a/packages/addons/games/wesnoth/scripts/start.sh b/packages/addons/games/wesnoth/scripts/start.sh new file mode 100755 index 0000000000..36b2098f02 --- /dev/null +++ b/packages/addons/games/wesnoth/scripts/start.sh @@ -0,0 +1,30 @@ +#!/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"` + +# fix permissions lost after unpack + chmod +x ./bin/wesnoth + +./bin/wesnoth . -f -r ${RESOLUTION_WIDTH}x${RESOLUTION_HEIGHT} diff --git a/packages/addons/games/wesnoth/url b/packages/addons/games/wesnoth/url new file mode 100644 index 0000000000..8127d8a494 --- /dev/null +++ b/packages/addons/games/wesnoth/url @@ -0,0 +1 @@ +http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.8.3.tar.bz2 \ No newline at end of file