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.SlackBuild32
1 files changed, 21 insertions, 11 deletions
diff --git a/games/gtklife/gtklife.SlackBuild b/games/gtklife/gtklife.SlackBuild
index 5d7b93677b..6278d7f70b 100644
--- a/games/gtklife/gtklife.SlackBuild
+++ b/games/gtklife/gtklife.SlackBuild
@@ -6,11 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 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}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +27,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -57,11 +59,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" \
@@ -69,13 +68,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