summaryrefslogtreecommitdiff
path: root/games/tome/tome.SlackBuild
diff options
context:
space:
mode:
authorDavid Melik <dchmelik@gmail.com>2012-12-20 12:19:47 +0100
committerMatteo Bernardini <ponce@slackbuilds.org>2012-12-20 12:20:11 +0100
commite524edc30cdab8b8cca5a3265c171c2d8ef941f6 (patch)
tree764cb6f93987732ae12a2692cddc1101ea8d8134 /games/tome/tome.SlackBuild
parent86266d2fc04f34fd42598ddf6604d9f6bc2c98d1 (diff)
downloadslackbuilds-e524edc30cdab8b8cca5a3265c171c2d8ef941f6.tar.gz
games/tome: Updated for version v2.3.10_ah, added a startup script.
(cleanups, linked explicitly to libm --ponce) Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'games/tome/tome.SlackBuild')
-rw-r--r--games/tome/tome.SlackBuild51
1 files changed, 23 insertions, 28 deletions
diff --git a/games/tome/tome.SlackBuild b/games/tome/tome.SlackBuild
index 178d62763c..b15e84c02d 100644
--- a/games/tome/tome.SlackBuild
+++ b/games/tome/tome.SlackBuild
@@ -7,7 +7,7 @@
# Partly based on Marshall Scott's Angband SlackBuild.
PRGNAM=tome
-VERSION=${VERSION:-235}
+VERSION=${VERSION:-v2.3.10_ah}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -43,9 +43,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION-src
-tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2
-cd $PRGNAM-$VERSION-src
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -53,35 +53,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# make use of our CFLAGS
-sed -i "s/-O1/$SLKCFLAGS/g" src/makefile.std
-
-cd src
- make \
- -f makefile.std \
- BINDIR=/usr/games \
- LIBDIR=/var/games/tome
-
- make \
- -f makefile.std \
- BINDIR=/usr/games \
- LIBDIR=/var/games/tome \
- DESTDIR=$PKG \
- install
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr/share/games/$PRGNAM \
+ -DSYSTEM_INSTALL:BOOL=true \
+ -DLIBS:STRING="-lm" \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
cd -
-# We'll kill the "delete.me" files in the package; probably these are left so
-# that lesser package management tools don't choke on empty directories
+install -m 0755 $CWD/$PRGNAM.sh $PKG/usr/share/games/$PRGNAM/bin/$PRGNAM.sh
+mkdir -p $PKG/usr/games
+ln -fs /usr/share/games/tome/bin/$PRGNAM.sh $PKG/usr/games/$PRGNAM
+
find $PKG -name "delete.me" | xargs rm -f
find $PKG -name ".cvsignore" | xargs rm -f
-# Now let's prevent upgrades from clobbering any existing datafiles
-mv $PKG/var/games/tome/apex/scores.raw \
- $PKG/var/games/tome/apex/scores.raw.new
-
-mkdir -p $PKG/usr/share/{applications,pixmaps}
-cp $CWD/tome.png $PKG/usr/share/pixmaps
-cp $CWD/tome.desktop $PKG/usr/share/applications
+install -m 0644 -D $CWD/$PRGNAM.png \
+ $PKG/usr/share/pixmaps/$PRGNAM.png
+install -m 0644 -D $CWD/$PRGNAM.desktop \
+ $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a changes.txt credits.txt $PKG/usr/doc/$PRGNAM-$VERSION