summaryrefslogtreecommitdiffstats
path: root/games/xcowsay/xcowsay.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/xcowsay/xcowsay.SlackBuild')
-rw-r--r--games/xcowsay/xcowsay.SlackBuild61
1 files changed, 41 insertions, 20 deletions
diff --git a/games/xcowsay/xcowsay.SlackBuild b/games/xcowsay/xcowsay.SlackBuild
index be198ce626..1db1890291 100644
--- a/games/xcowsay/xcowsay.SlackBuild
+++ b/games/xcowsay/xcowsay.SlackBuild
@@ -1,15 +1,36 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for xcowsay
-# 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.
+# 20220610 bkw: update for v1.6.
+
+# 20201103 bkw:
+# - Update for v1.5.1. The changelog for this version says this:
+# Fix black squares around cow and bubble on non-compositing window manager.
+# And it works fine in the window managers I've tried it with, so
+# it's probably fine to upgrade. Add note to README about how to
+# build 1.4, if someone needs it.
+
+# 20200221 bkw:
+# - BUILD=2
+# - Add man pages for xcow(dream|fortune|think)
+# - Move executables to /usr/games
+# - Was going to update to v1.5. See README_1.5.txt for why I didn't.
+# You're not going to convince me to upgrade to a version I can't use,
+# so don't try. Maybe 1.6 or later will support non-compositing WMs
+# at some point.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=xcowsay
-VERSION=${VERSION:-1.4}
+VERSION=${VERSION:-1.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,7 +40,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,16 +72,14 @@ 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 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" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--enable-dbus \
+ --bindir=/usr/games \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
@@ -66,24 +89,22 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Man pages for wrapper scripts borrowed from Debian. xcowdream.6 was
+# modified to make more sense.
+for i in $CWD/man/*.6; do
+ cat $i > $PKG/usr/man/man6/$( basename $i )
+done
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+gzip -9 $PKG/usr/man/man6/*.6
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog NEWS README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog NEWS README $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
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