slackbuilds_ponce/games/icebreaker/icebreaker.SlackBuild

75 lines
1.7 KiB
Text
Raw Normal View History

#!/bin/sh
# Slackware build script for icebreaker
# Written by B. Watson (yalhcru@gmail.com)
PRGNAM=icebreaker
VERSION=${VERSION:-1.2.1}
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"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
make \
prefix=/usr \
mandir=/usr/man \
highscoredir=/var/state/$PRGNAM \
OPTIMIZE="$SLKCFLAGS"
strip $PRGNAM
make install \
prefix=$PKG/usr \
mandir=$PKG/usr/man \
highscoredir=$PKG/var/state/$PRGNAM
# We prefer the binary to live in /usr/games
mv $PKG/usr/bin $PKG/usr/games
sed -i -e "s,/var/lib/games,/var/state/$PRGNAM," $PKG/usr/man/man6/$PRGNAM.6
gzip -9 $PKG/usr/man/man6/$PRGNAM.6
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp ChangeLog LICENSE README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/share/applications
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications
mkdir -p $PKG/usr/share/pixmaps
convert ${PRGNAM}_48.bmp $PRGNAM.xpm
cp $PRGNAM.xpm $PKG/usr/share/pixmaps
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}