slackbuilds_ponce/games/ltris/ltris.SlackBuild

65 lines
1.5 KiB
Text
Raw Normal View History

2010-05-11 14:28:20 +02:00
#!/bin/sh
# Slackware build script for LTris
# Written by Bill Kirkpatrick <bkirkp@gmail.com>
# Build 2, 20080515 - Minor version bump, 1.0.12
# Modified by Robby Workman <rworkman@slackbuilds.org>
2010-05-11 14:28:20 +02:00
PRGNAM=ltris
VERSION=1.0.12
2010-05-11 14:28:20 +02:00
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
2010-05-11 14:28:20 +02:00
TAG=${TAG:-_SBo}
CWD=$(pwd)
2010-05-11 14:28:20 +02:00
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
2010-05-11 14:28:20 +02:00
fi
set -e
2010-05-11 14:28:20 +02:00
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
2010-05-11 14:28:20 +02:00
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
2010-05-11 14:28:20 +02:00
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var/lib/lgames \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux
2010-05-11 14:28:20 +02:00
make
make install DESTDIR=$PKG
2010-05-11 14:28:20 +02:00
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
2010-05-11 14:28:20 +02:00
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING INSTALL README $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
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz