summaryrefslogtreecommitdiff
path: root/games/smc/smc.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-04-12 22:39:33 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-12 22:39:33 +0700
commit75badd19c0a3bc0edb2d84821762a1d04f73ae3e (patch)
treea3a53b593706fdd8d027cad510279a9eb77d6902 /games/smc/smc.SlackBuild
parenta18b2dc8085a024f8d4a8b1b14c04dd13181e3a4 (diff)
downloadslackbuilds-75badd19c0a3bc0edb2d84821762a1d04f73ae3e.tar.gz
games/smc: Added (Secret Maryo Chronicles).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/smc/smc.SlackBuild')
-rw-r--r--games/smc/smc.SlackBuild85
1 files changed, 85 insertions, 0 deletions
diff --git a/games/smc/smc.SlackBuild b/games/smc/smc.SlackBuild
new file mode 100644
index 0000000000..cc619e1e23
--- /dev/null
+++ b/games/smc/smc.SlackBuild
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+# Slackware build script for smc (Secret Maryo Chronicles)
+# Originally written by Phillip Warner <pc_warner@yahoo.com>
+
+# Modified by B. Watson, for post-1.9 git snapshot and Slack 14.1.
+# - removed boost patch (no longer needed)
+# - changed Categories in .desktop file (make it validate)
+# - got CEGUI0.7 maintainer to add a couple configure options this needs
+
+# Note about the REQUIRES in the .info file: I listed FreeImage first
+# because it's an optional dep for CEGUI0.7. This build needs CEGUI0.7
+# with FreeImage support compiled in.
+
+PRGNAM=smc
+VERSION=${VERSION:-20140328}
+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
+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 {} \;
+
+./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --build=$ARCH-slackware-linux
+
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}