summaryrefslogtreecommitdiff
path: root/games/nsudoku/nsudoku.SlackBuild
diff options
context:
space:
mode:
authorBinh Nguyen <binhnguyen@fastmail.fm>2010-07-22 20:55:14 -0500
committerErik Hanson <erik@slackbuilds.org>2010-07-25 21:52:40 -0500
commitb065b5b72133731c74dac7ec2d8c52aee70176c3 (patch)
tree210454748d3eeb1b35e64f96333f0e3cfe76a3a7 /games/nsudoku/nsudoku.SlackBuild
parent25c67f495a0266da578d43f1b3ed64166b96bf38 (diff)
downloadslackbuilds-b065b5b72133731c74dac7ec2d8c52aee70176c3.tar.gz
games/nsudoku: Added (A Sudoku game in ncurses)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'games/nsudoku/nsudoku.SlackBuild')
-rw-r--r--games/nsudoku/nsudoku.SlackBuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/games/nsudoku/nsudoku.SlackBuild b/games/nsudoku/nsudoku.SlackBuild
new file mode 100644
index 0000000000..6774608720
--- /dev/null
+++ b/games/nsudoku/nsudoku.SlackBuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Copyright 2010 Binh Nguyen <binhnguyen@fastmail.fm>
+# 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=nsudoku
+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}
+
+set -eu
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cat $CWD/$PRGNAM.c > $PRGNAM-$VERSION/$PRGNAM.c
+cd $PRGNAM-$VERSION
+
+gcc -lncurses -o $PRGNAM $PRGNAM.c
+install -Dm755 $PRGNAM $PKG/usr/bin/$PRGNAM
+
+find $PKG | xargs 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/doc/$PRGNAM-$VERSION
+cat $CWD/LICENSE > $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}