diff options
author | B. Watson <yalhcru@gmail.com> | 2011-12-20 10:39:17 -0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-12-22 00:02:52 -0600 |
commit | 98e800a9a59001158e98c32242b181be55e9368f (patch) | |
tree | 2d7f001ff2ad88a3ccf34d0d5621445cc5469dd4 /games/ucr/ucr.SlackBuild | |
parent | c5ee6ec05fe53d5dc6fa0aff27044329f9f88f1a (diff) | |
download | slackbuilds-98e800a9a59001158e98c32242b181be55e9368f.tar.gz |
games/ucr: Added (Ultima Classics Revisited)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'games/ucr/ucr.SlackBuild')
-rw-r--r-- | games/ucr/ucr.SlackBuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/games/ucr/ucr.SlackBuild b/games/ucr/ucr.SlackBuild new file mode 100644 index 0000000000..afbe0ebded --- /dev/null +++ b/games/ucr/ucr.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for ucr + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=ucr +VERSION=${VERSION:-0.1.2} +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} + +# Nothing in /usr/lib(64) for this package. +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" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION-beta +tar xvf $CWD/$PRGNAM-$VERSION-beta.tar.gz +cd $PRGNAM-$VERSION-beta +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# configure is not an autoconf script (doesn't accept arguments at all). +./configure +sed -i "s/-O3/$SLKCFLAGS/" Makefile +make + +# No DESTDIR support either, manual install. +mkdir -p $PKG/usr/bin $PKG/etc/$PRGNAM +install -s -m0755 $PRGNAM $PKG/usr/bin +mkdir -p $PKG/usr/share/$PRGNAM +cp -a data pixmaps $PKG/usr/share/$PRGNAM +sed "s,/usr/games/$PRGNAM/,/usr/share/$PRGNAM/," etc/$PRGNAM.conf \ + > $PKG/etc/$PRGNAM/$PRGNAM.conf.new + +# PNG icon made by removing blue background from icon.xpm. +# .desktop file written for this package. +mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +# man page written for this build. Needed because the docs don't list +# the keyboard commands for playing the game! +mkdir -p $PKG/usr/man/man6 +gzip -9c $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README CHANGELOG TODO $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |