diff options
author | Dimiris Zlatanidis <d.zlatanidis@gmail.com> | 2014-04-26 18:50:15 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-04-27 12:18:17 -0500 |
commit | 9f219ce23a7e0c860bb626e52f03ed9b9e9e2de1 (patch) | |
tree | da69b862ac4e3bfb52d5a50e1c09c561eee10e8c /games | |
parent | cbcfdaef5194048d902c83ad4028196b857f7645 (diff) |
games/cpsokoban: Added (Sokoban like game).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/cpsokoban/README | 2 | ||||
-rw-r--r-- | games/cpsokoban/configure_doc.patch | 56 | ||||
-rw-r--r-- | games/cpsokoban/cpsokoban.SlackBuild | 113 | ||||
-rw-r--r-- | games/cpsokoban/cpsokoban.desktop | 10 | ||||
-rw-r--r-- | games/cpsokoban/cpsokoban.info | 10 | ||||
-rw-r--r-- | games/cpsokoban/cpsokoban.sh | 3 | ||||
-rw-r--r-- | games/cpsokoban/doinst.sh | 3 | ||||
-rw-r--r-- | games/cpsokoban/slack-desc | 19 |
8 files changed, 216 insertions, 0 deletions
diff --git a/games/cpsokoban/README b/games/cpsokoban/README new file mode 100644 index 0000000000000..9bc439ef39ae1 --- /dev/null +++ b/games/cpsokoban/README @@ -0,0 +1,2 @@ +CPSokoban is yet another version of the game Sokoban. +This one's written in C and Python, whence the name. diff --git a/games/cpsokoban/configure_doc.patch b/games/cpsokoban/configure_doc.patch new file mode 100644 index 0000000000000..2f0b94d7fcd8c --- /dev/null +++ b/games/cpsokoban/configure_doc.patch @@ -0,0 +1,56 @@ +--- cpsokoban-1.0/configure.original 2014-04-26 10:50:11.334099417 +0300 ++++ cpsokoban-1.0/configure 2014-04-26 11:12:26.817403578 +0300 +@@ -308,7 +308,7 @@ + # include <unistd.h> + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INCLUDES HAS_XLIB HAS_TIX SOKODIR TARDIR HELPCMD PIXMAPDIR SUBDIRS SET_MAKE LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir docdir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INCLUDES HAS_XLIB HAS_TIX SOKODIR TARDIR HELPCMD PIXMAPDIR SUBDIRS SET_MAKE LIBOBJS LTLIBOBJS' + ac_subst_files='' + + # Initialize some variables set by options. +@@ -348,6 +348,7 @@ + oldincludedir='/usr/include' + infodir='${prefix}/info' + mandir='${prefix}/man' ++docdir='${prefix}/doc' + + ac_prev= + for ac_option +@@ -450,6 +451,11 @@ + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + ++ -docdir | --docdir | --docdi | --docd | --doc) ++ ac_prev=docdir ;; ++ -docdir=* | --docdir=* | --docdi=* | docd=* | --doc=*) ++ docdir=$ac_optarg ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -667,7 +673,7 @@ + + # Be sure to have absolute paths. + for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ +- localstatedir libdir includedir oldincludedir infodir mandir ++ localstatedir libdir includedir oldincludedir infodir mandir docdir + do + eval ac_val=$`echo $ac_var` + case $ac_val in +@@ -825,6 +831,7 @@ + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] ++ --docdir=DIR doc documentation [PREFIX/doc] + --mandir=DIR man documentation [PREFIX/man] + _ACEOF + +@@ -4208,6 +4215,7 @@ + s,@includedir@,$includedir,;t t + s,@oldincludedir@,$oldincludedir,;t t + s,@infodir@,$infodir,;t t ++s,@docdir@,$docdir,;t t + s,@mandir@,$mandir,;t t + s,@build_alias@,$build_alias,;t t + s,@host_alias@,$host_alias,;t t diff --git a/games/cpsokoban/cpsokoban.SlackBuild b/games/cpsokoban/cpsokoban.SlackBuild new file mode 100644 index 0000000000000..46b06a69af3d1 --- /dev/null +++ b/games/cpsokoban/cpsokoban.SlackBuild @@ -0,0 +1,113 @@ +#!/bin/sh + +# Slackware build script for cpsokoban + +# Copyright 2014 Dimitris Zlatanidis Greece-Orestiada +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=cpsokoban +VERSION=${VERSION:-1.0} +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 $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# fix --docdir configuration parametr +patch -p1 < $CWD/configure_doc.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +INCLUDES=/usr/include/python2.7 \ +./configure \ + --prefix=/usr \ + --datadir=/usr/share/games \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make # compile source + +find $PKG -print0 | xargs -0 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/games/$PRGNAM $PKG/usr/bin +# copy data games +cp -rf pixmaps $PKG/usr/share/games/$PRGNAM +cp -rf levelsets $PKG/usr/share/games/$PRGNAM + +# install launchers +install -D -m0755 $PRGNAM $PKG/usr/share/games/$PRGNAM +install -D -m0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM + +mkdir -p $PKG/usr/share/applications +install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop + +mkdir -p $PKG/usr/share/pixmaps/ +install -D -m644 doc/cpsb.png $PKG/usr/share/pixmaps/$PRGNAM.svg + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README doc/*.html $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/cpsokoban/cpsokoban.desktop b/games/cpsokoban/cpsokoban.desktop new file mode 100644 index 0000000000000..8141cd12aa107 --- /dev/null +++ b/games/cpsokoban/cpsokoban.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name= CPSokoban +Name[he]= CPSokoban +Comment=CPSokoban is yet another version of the game Sokoban +Exec=cpsokoban +Icon=cpsokoban +Terminal=false +Type=Application +Categories=Game;Puzzle; +GenericName=Game diff --git a/games/cpsokoban/cpsokoban.info b/games/cpsokoban/cpsokoban.info new file mode 100644 index 0000000000000..9bf18e151f61f --- /dev/null +++ b/games/cpsokoban/cpsokoban.info @@ -0,0 +1,10 @@ +PRGNAM="cpsokoban" +VERSION="1.0" +HOMEPAGE="http://sourceforge.net/projects/cpsokoban" +DOWNLOAD="http://sourceforge.net/projects/cpsokoban/files/cpsokoban/cpsokoban-1.0/cpsokoban-1.0.tar.gz" +MD5SUM="05963b52300e281e474084105bf89d74" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Dimitris Zlatanidis" +EMAIL="d.zlatanidis@gmail.com" diff --git a/games/cpsokoban/cpsokoban.sh b/games/cpsokoban/cpsokoban.sh new file mode 100644 index 0000000000000..6fe262e271012 --- /dev/null +++ b/games/cpsokoban/cpsokoban.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/share/games/cpsokoban +./cpsokoban diff --git a/games/cpsokoban/doinst.sh b/games/cpsokoban/doinst.sh new file mode 100644 index 0000000000000..5fb28930db0b9 --- /dev/null +++ b/games/cpsokoban/doinst.sh @@ -0,0 +1,3 @@ +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/cpsokoban/slack-desc b/games/cpsokoban/slack-desc new file mode 100644 index 0000000000000..01728428e789b --- /dev/null +++ b/games/cpsokoban/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +cpsokoban: cpsokoban (Sokoban like game) +cpsokoban: +cpsokoban: CPSokoban is yet another version of the game Sokoban. +cpsokoban: This one's written in C and Python, whence the name. +cpsokoban: +cpsokoban: Homepage: http://sourceforge.net/projects/cpsokoban +cpsokoban: +cpsokoban: +cpsokoban: +cpsokoban: +cpsokoban: |