summaryrefslogtreecommitdiffstats
path: root/desktop/vwm/vwm.SlackBuild
diff options
context:
space:
mode:
author B. Watson2017-08-25 22:51:11 +0200
committer B. Watson2017-08-26 02:01:08 +0200
commitc11f05ff4a0630ada6307009c32cc0075f35effe (patch)
tree11e737302a0935a2ea57919062662d8f8e73f7b4 /desktop/vwm/vwm.SlackBuild
parent2d78f9172ba57e05ae1d01598152b2a1a889e081 (diff)
downloadslackbuilds-c11f05ff4a0630ada6307009c32cc0075f35effe.tar.gz
desktop/vwm: Updated for version 2.1.3, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'desktop/vwm/vwm.SlackBuild')
-rw-r--r--desktop/vwm/vwm.SlackBuild104
1 files changed, 70 insertions, 34 deletions
diff --git a/desktop/vwm/vwm.SlackBuild b/desktop/vwm/vwm.SlackBuild
index c48f78e579..7b69c737cd 100644
--- a/desktop/vwm/vwm.SlackBuild
+++ b/desktop/vwm/vwm.SlackBuild
@@ -2,7 +2,7 @@
# SlackBuild script for vwm.
#
-# Copyright 2009 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
+# Copyright 2009 Pierre Cazenave <email removed>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,24 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Previously maintained by Gerardo Zamudio.
+# Now maintained by B. Watson <yalhcru@gmail.com>.
+
+# 20170825 bkw:
+# - Take over maintenance.
+# - Update for v2.1.3.
+# - slack-desc cosmetics.
+# - Don't install useless INSTALL to doc dir.
+# - Remove -j1 from the make commands, except the one for keycodes. seems
+# not to be needed any longer.
+# - Simplify script a bit.
+# - Build a private static 'libvterm', which is NOT the same libvterm as
+# libraries/libvterm on SBo. Unfortunately this adds a lot of complexity
+# back to the script :(
+# - Rebase patches/*.diff against 2.1.3 and combine into one patch.
+
PRGNAM=vwm
-VERSION=${VERSION:-2.0.2}
+VERSION=${VERSION:-2.1.3}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
@@ -54,57 +70,77 @@ else
LIBDIRSUFFIX=""
fi
+fixperms() {
+ 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 {} \;
+}
+
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
+mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
+
+# First, the library. This is "libvterm", by the same author as vwm,
+# but it's completely unrelated to the libvterm on SBo. Two projects
+# happened to pick the same name. This one doesn't build a static lib
+# by default (which we need) so it's done here with 'ar'. None of this
+# stuff gets included in the package.
+# libvterm-20170804.tar.xz was created thus:
+# git clone https://github.com/TragicWarrior/libvterm.git libvterm-20170804
+# tar cvfJ libvterm-20170804.tar.xz libvterm-20170804
+LIBNAM=libvterm
+LIBVER=${LIBVER:-20170804}
+
+cd $TMP/$PRGNAM
+rm -rf $LIBNAM-$LIBVER
+tar xvf $CWD/$LIBNAM-$LIBVER.tar.xz
+cd $LIBNAM-$LIBVER
+fixperms
+
+# Build a static library. We need -fPIC even on 32-bit.
+make CFLAGS="$SLKCFLAGS -fPIC"
+rm -f *.so
+ar rcs $LIBNAM.a *.o
+
+# Now, the main program, which will link with the static lib we just built.
+cd $TMP/$PRGNAM
rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
-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 {} \;
-
-# patch the relevant Makefiles to not use hardcoded paths
-patch -p0 < $CWD/patches/vwm-2.0.2-Makefile.patch
-patch -p1 < $CWD/patches/vwm-2.0.2-Makefile-vwmterm2.patch
-patch -p0 < $CWD/patches/vwm-2.0.2-Makefile-sysmon.patch
-
-# hack to fix the hardcoded path in vwm.h. Not the prettiest, but there you
-# have it.
-if [ $ARCH == "x86_64" ]; then
- sed -i '26s|/usr/lib/vwm/modules|/usr/lib64/vwm/modules|' ./vwm.h
-fi
+fixperms
+
+# Patch the relevant Makefiles to not use hardcoded paths.
+patch -p1 < $CWD/patches/paths.diff
-make -j1 CFLAGS="$SLKCFLAGS"
+# Allows us to pass a full path to libvterm.a, avoids 'undefined symbol'
+# when starting vmterm3.
+patch -p1 < $CWD/patches/vterm_static.diff
+
+LIBDIR=$TMP/$PRGNAM/$LIBNAM-$LIBVER
+make CFLAGS="$SLKCFLAGS -I$LIBDIR" VTERM_A=$LIBDIR/libvterm.a
make install prefix=$PKG/usr libdir=$PKG/usr/lib${LIBDIRSUFFIX}
-# build and install the sysmon module (the vmwterm2 one is done with
-# the main installation)
+# Build and install the sysmon module (the vmwterm3 one is done with
+# the main installation).
cd modules/sysmon
- make -j1 CFLAGS="$SLKCFLAGS -I$PKG/usr/include"
+ make CFLAGS="$SLKCFLAGS -I$PKG/usr/include"
make install prefix=$PKG/usr libdir=$PKG/usr/lib${LIBDIRSUFFIX}
cd -
-# build and install the keycodes tool to determine codes for remapping
-# keystrokes in ~/.vwm/vwmrc
+# Build and install the keycodes tool to determine codes for remapping
+# keystrokes in '~/.vwm/vwmrc'.
make -j1 keycode_tool
-cp -a keycodes/keycodes $PKG/usr/bin/
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+install -s -m0755 keycodes/keycodes $PKG/usr/bin/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGELOG INSTALL LICENSE NOTES samples $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGELOG LICENSE NOTES samples $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc