summaryrefslogtreecommitdiffstats
path: root/games/berusky/berusky.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/berusky/berusky.SlackBuild')
-rw-r--r--games/berusky/berusky.SlackBuild43
1 files changed, 28 insertions, 15 deletions
diff --git a/games/berusky/berusky.SlackBuild b/games/berusky/berusky.SlackBuild
index 74f44e03ef..89a7d5ce93 100644
--- a/games/berusky/berusky.SlackBuild
+++ b/games/berusky/berusky.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for berusky
@@ -22,10 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - update to v1.7.2 (old version segfaulted on startup, on 15.0).
+# - binary in /usr/games.
+# - fix icon (png file was named .svg).
+# - fix .desktop.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=berusky
-VERSION=${VERSION:-1.7}
+VERSION=${VERSION:-1.7.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +44,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}
@@ -63,32 +76,32 @@ 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 {} \;
+# 20220222 bkw: do not use template, it trips over dangling symlinks.
+find . -type f -exec chmod 644 {} \+
+find . -type d -exec chmod 755 {} \+
sed -i 's/var\/games/usr\/share/' src/defines.h
+autoreconf -if
+
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
+CXXFLAGS="$SLKCFLAGS -std=c++11" \
+sh ./configure \
--prefix=/usr \
+ --bindir=/usr/games \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+sed -i 's,/usr/bin,/usr/games,' $PKG/usr/share/berusky/berusky.ini
mkdir -p $PKG/usr/share/applications
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps/
-install -D -m644 $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.svg
+install -D -m644 $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog README TODO $PKG/usr/doc/$PRGNAM-$VERSION
@@ -100,4 +113,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