summaryrefslogtreecommitdiffstats
path: root/source/xap/windowmaker/windowmaker.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/windowmaker/windowmaker.SlackBuild')
-rwxr-xr-xsource/xap/windowmaker/windowmaker.SlackBuild30
1 files changed, 24 insertions, 6 deletions
diff --git a/source/xap/windowmaker/windowmaker.SlackBuild b/source/xap/windowmaker/windowmaker.SlackBuild
index 4a541b456..bf84807e1 100755
--- a/source/xap/windowmaker/windowmaker.SlackBuild
+++ b/source/xap/windowmaker/windowmaker.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,6 +20,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=windowmaker
VERSION=${VERSION:-$(echo WindowMaker-0*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-2}
@@ -35,6 +38,14 @@ 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -49,7 +60,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-windowmaker
@@ -68,9 +78,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix a segfault in wmmenugen.c:
-zcat $CWD/wmmenugen.c.diff.gz | patch -p1 --verbose || exit 1
-
# This should be non-interactive where possible.
zcat $CWD/wmaker.inst.diff.gz | patch -p1 --verbose || exit 1
@@ -97,6 +104,14 @@ NLSDIR=/usr/share/locale \
# Disabling magick per this LQ thread:
# http://www.linuxquestions.org/questions/showthread.php?p=5284319#post5284319
+# 20170223 bkw: WindowMaker has always been chatty, but starting with
+# v0.95.6 or so, it also logs everything to syslog. In a typical week of
+# running WindowMaker, I end up with 150KB of useless wmaker messages in
+# /var/log/syslog (and 400 bytes of non-wmaker stuff there). Undefining
+# HAVE_SYSLOG stops it from cluttering the log, and whatever it was
+# going to log will still be printed to its stderr.
+sed -i '/HAVE_SYSLOG/s,#define,#undef,' config.h
+
make $NUMJOBS || make || exit 1
# Change /usr/local/GNUstep to /usr/lib/GNUstep in the WMRootMenu:
@@ -139,6 +154,9 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null