summaryrefslogtreecommitdiffstats
path: root/games/gtklife/gtklife.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/gtklife/gtklife.SlackBuild')
-rw-r--r--games/gtklife/gtklife.SlackBuild48
1 files changed, 35 insertions, 13 deletions
diff --git a/games/gtklife/gtklife.SlackBuild b/games/gtklife/gtklife.SlackBuild
index c49a73055c..840b1b726e 100644
--- a/games/gtklife/gtklife.SlackBuild
+++ b/games/gtklife/gtklife.SlackBuild
@@ -1,15 +1,25 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gtklife
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20240207 bkw: update for v5.3.
+
+# 20211008 bkw: BUILD=3
+# - new-style icons.
+# - build with gtk+2, not gtk+1. nicer UI.
+# - binary in /usr/games, not /usr/bin.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gtklife
-VERSION=${VERSION:-5.2}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-5.3}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,7 +29,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -47,11 +61,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS -std=gnu89" \
CXXFLAGS="$SLKCFLAGS" \
@@ -59,13 +70,24 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-docdir=/usr/doc/$PRGNAM-$VERSION/html \
+ --with-gtk2 \
--build=$ARCH-slackware-linux
make
-make install-strip prefix=$PKG/usr docdir=$PKG/usr/doc/$PRGNAM-$VERSION/html
+make install-strip \
+ prefix=$PKG/usr \
+ docdir=$PKG/usr/doc/$PRGNAM-$VERSION/html \
+ bindir=$PKG/usr/games
+
+for i in icon_*.png; do
+ size="$( echo $i | cut -d_ -f2 | cut -d. -f1 )"
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
mkdir -p $PKG/usr/share/pixmaps
-cat icon_48x48.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
@@ -79,4 +101,4 @@ 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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE