summaryrefslogtreecommitdiffstats
path: root/system/suckless-tools/suckless-tools.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/suckless-tools/suckless-tools.SlackBuild')
-rw-r--r--system/suckless-tools/suckless-tools.SlackBuild27
1 files changed, 17 insertions, 10 deletions
diff --git a/system/suckless-tools/suckless-tools.SlackBuild b/system/suckless-tools/suckless-tools.SlackBuild
index c32bd1febe..b0e5252ed7 100644
--- a/system/suckless-tools/suckless-tools.SlackBuild
+++ b/system/suckless-tools/suckless-tools.SlackBuild
@@ -1,17 +1,23 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for suckless-tools
-# 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.
-PROGS="lsw lsx sprop sselp ssid swarp wmname xssstate"
+# 20210823 bkw: note to self: don't try to upgrade lsw to 0.3. It
+# doesn't actually work (0.2 does).
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=suckless-tools
VERSION=${VERSION:-20140317}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+PROGS="lsw lsx sprop sselp ssid swarp wmname xssstate"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -21,7 +27,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}
@@ -65,11 +75,8 @@ for prog in $PROGS; do
toolver=$( echo $dir | cut -d- -f2 )
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 {} \+
sed -i -e "s,-O.\>,$SLKCFLAGS," -e "s,\<lib\>,lib$LIBDIRSUFFIX," config.mk
@@ -104,4 +111,4 @@ cat 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