slackbuilds_ponce/games/smc/smc.SlackBuild

68 lines
1.6 KiB
Text
Raw Normal View History

2010-05-11 22:53:47 +02:00
#!/bin/sh
# Slackware build script for smc (Secret Maryo Chronicles)
# Written by Phillip Warner <pc_warner@yahoo.com>
PRGNAM=smc
2010-05-13 00:27:05 +02:00
VERSION=${VERSION:-1.9}
2010-05-11 22:53:47 +02:00
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
2010-05-12 17:39:33 +02:00
LIBDIRSUFFIX=""
2010-05-11 22:53:47 +02:00
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
2010-05-12 17:39:33 +02:00
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
2010-05-11 22:53:47 +02:00
SLKCFLAGS="-O2 -fPIC"
2010-05-12 17:39:33 +02:00
LIBDIRSUFFIX="64"
2010-05-11 22:53:47 +02:00
fi
2010-05-12 17:39:33 +02:00
set -e
2010-05-11 22:53:47 +02:00
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
2010-05-12 17:39:33 +02:00
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
2010-05-11 22:53:47 +02:00
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+rw,go-w .
2010-05-13 00:27:05 +02:00
patch -p1 < $CWD/smc-1.9_boost.patch
2010-05-11 22:53:47 +02:00
./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
2010-05-12 17:39:33 +02:00
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux
2010-05-11 22:53:47 +02:00
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make
make install DESTDIR=$PKG
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/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
2010-05-12 17:39:33 +02:00
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
2010-05-11 22:53:47 +02:00
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
2010-05-13 00:27:05 +02:00
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}