summaryrefslogtreecommitdiff
path: root/system/vwm
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-12-08 13:02:16 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-12-10 08:37:38 +0700
commitb3023951f9d29bdfcf9564f0ff8323e05bd553f6 (patch)
tree08d021c1632cfc07648c3ff9d2ba048ce2595481 /system/vwm
parente51ab34303da817166be6254e2d51d7e3da3076e (diff)
downloadslackbuilds-b3023951f9d29bdfcf9564f0ff8323e05bd553f6.tar.gz
desktop/vwm: Move to system/vwm.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/vwm')
-rw-r--r--system/vwm/README18
-rw-r--r--system/vwm/git2tarxz.sh54
-rw-r--r--system/vwm/slack-desc19
-rw-r--r--system/vwm/vwm.SlackBuild172
-rw-r--r--system/vwm/vwm.info10
5 files changed, 273 insertions, 0 deletions
diff --git a/system/vwm/README b/system/vwm/README
new file mode 100644
index 0000000000..9040a52c86
--- /dev/null
+++ b/system/vwm/README
@@ -0,0 +1,18 @@
+vwm (console text-based window manager)
+
+Viper Window Manager (VWM) is a lightweight, extensible window manager
+for the console. Originally, VWM was designed to be the reference
+implementation of libviper. In fact, the two projects were initially
+one before public release.
+
+From conception, VWM was designed to be both lightweight and ssh
+friendly. Character based line-art compresses very well as do the
+escape sequences which handle cursor manipulation. This makes VWM quite
+suitable for low-bandwidth, remote connectivity over ssh.
+
+It is also very easy to extend the functionality of VWM. By following
+a few simple API rules, anyone can create a "native application"
+which will appear on the VWM Main Menu. The mechanism for this is very
+similar to Mozilla-style plugins.
+
+See /usr/doc/$VERSION/samples/vwmrc for information on customising VWM.
diff --git a/system/vwm/git2tarxz.sh b/system/vwm/git2tarxz.sh
new file mode 100644
index 0000000000..5dd951db3c
--- /dev/null
+++ b/system/vwm/git2tarxz.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number.
+
+# Note that this script doesn't need to be run as root. It does
+# need to be able to write to the current directory it's run from.
+
+# This git2tarxz's output is a tarball with 2 separate projects.
+# Upstream doesn't use tags. The version number of the tarball is the
+# version of vwm, taken from vwm.h, plus the commit date and hash of
+# the vwm tree. The libvterm version isn't included in the version
+# number.
+
+PRGNAM=vwm
+PRGURL=https://github.com/TragicWarrior/vwm
+LIBURL1=https://github.com/TragicWarrior/libvterm
+LIBURL2=https://github.com/TragicWarrior/libviper
+
+set -e
+
+CWD="$( pwd )"
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+mkdir -p $GITDIR
+
+cd $GITDIR
+
+git clone $PRGURL
+git clone $LIBURL1
+git clone $LIBURL2
+
+cd $PRGNAM
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+RELVER="$( grep '#define *VWM_VERSION' vwm.h | cut -d'"' -f2 )"
+VERSION=$RELVER+${DATE}_${GIT_SHA}
+
+cd -
+
+rm -rf */.git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=$VERSION"
diff --git a/system/vwm/slack-desc b/system/vwm/slack-desc
new file mode 100644
index 0000000000..428b5afcc7
--- /dev/null
+++ b/system/vwm/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+vwm: vwm (console text-based window manager)
+vwm:
+vwm: Viper Window Manager (VWM) is a lightweight, extensible window manager
+vwm: for the console. Originally, VWM was designed to be the reference
+vwm: implementation of libviper. In fact, the two projects were initially
+vwm: one before public release.
+vwm: From conception, VWM was designed to be both lightweight and ssh
+vwm: friendly. Character based line-art compresses very well as do the
+vwm: escape sequences which handle cursor manipulation. This makes VWM
+vwm: quite suitable for low-bandwidth, remote connectivity over ssh.
+vwm:
diff --git a/system/vwm/vwm.SlackBuild b/system/vwm/vwm.SlackBuild
new file mode 100644
index 0000000000..7cbfd75b67
--- /dev/null
+++ b/system/vwm/vwm.SlackBuild
@@ -0,0 +1,172 @@
+#!/bin/bash
+
+# SlackBuild script for vwm.
+
+# Originally written by Pierre Cazenave <email removed>
+# Previously maintained by Gerardo Zamudio.
+# Now maintained by B. Watson <yalhcru@gmail.com>.
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20211118 bkw:
+# - relicense as WTFPL, with permission from Pierre.
+# - Move to system/ category.
+
+# 20210908 bkw:
+# - Update this stale build. It compiled on -current, but failed to
+# run properly. Upstream never updated the old sourceforge page to
+# let us know he moved to github, so I just now found it out...
+# Upstream doesn't use tags for releases, I used latest git for
+# all 3 projects (vwm, libviper, libvterm).
+# - Bundle libviper. The old libviper build is gone (nothing else used it).
+# - Bundled libs are now shared, not static, and are included in the
+# built package (along with their includes).
+# - Upstream switched to cmake, many changes because of that.
+
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=vwm
+VERSION=${VERSION:-3.3.2+20200112_207d888}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+
+set -e
+
+rm -rf $PKG $TMP/$PRGNAM-$VERSION
+mkdir -p $PKG $OUTPUT
+cd $TMP
+
+# The tarball includes all 3 projects (vwm, libviper, libvterm) and
+# was created by git2tarxz.sh.
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+BASEDIR=$( pwd )
+
+# First, we build the two libraries vwm needs. These are by the same
+# author as vwm. The one called libvterm is *not* related to the
+# libvterm on SBo (two projects happened to pick the same name).
+# These have to be shared libs (or anyway, libvterm has to be, as
+# vwm's vwmterm module loads it via dlopen()).
+
+buildlib() {
+ cd $BASEDIR/lib$1
+ mkdir -p build
+ cd build
+
+ # Note: the cmake stuff here ignores any attempt to install to lib64.
+ # We'll fix it later.
+ cmake \
+ -DCMAKE_C_FLAGS_RELEASE="$SLKCFLAGS -DNDEBUG" \
+ -DCMAKE_CXX_FLAGS_RELEASE="$SLKCFLAGS -DNDEBUG" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install/strip DESTDIR=$PKG
+}
+
+buildlib vterm
+buildlib viper
+
+# no way to disable static libs via cmake, so...
+rm -f $PKG/usr/lib/*.a
+
+# Finally, we can build vwm. Easier to force-override the autodetect
+# for the libs, than it would be to make the autodetect actually work.
+cd $BASEDIR/$PRGNAM
+
+ # why is this hardcoded?
+ sed -i "s,/usr/local/lib/vwm/,/usr/lib$LIBDIRSUFFIX/vwm/," vwm.h
+
+ mkdir -p build
+ cd build
+ cmake \
+ -DCMAKE_C_FLAGS_RELEASE="$SLKCFLAGS -DNDEBUG -I$PKG/usr/include" \
+ -DCMAKE_CXX_FLAGS_RELEASE="$SLKCFLAGS -DNDEBUG -I$PKG/usr/include" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DVTERM_LIBRARY=$PKG/usr/lib/libvterm.so \
+ -DVIPER_LIBRARY=$PKG/usr/lib/libviper.so \
+ -DVTERM_INCLUDE_DIR=$PKG/usr/include \
+ -DVIPER_INCLUDE_DIR=$PKG/usr/include \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install/strip DESTDIR=$PKG
+cd -
+
+# *Now* we can fix the lib=>lib64 mess, if needed.
+[ "$LIBDIRSUFFIX" != "" ] && mv $PKG/usr/lib $PKG/usr/lib$LIBDIRSUFFIX
+
+# Build and install the keycodes tool to determine codes for remapping
+# keystrokes in '~/.vwm/vwmrc'. Don't think we need the non-wide version,
+# since the main program uses wide ncurses.
+make -j1 -C keycodes keycodes_wide
+install -s -m0755 keycodes/keycodes_wide $PKG/usr/bin/keycodes
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+
+# upstream's README.md is mostly install instructions.
+mkdir -p $PKGDOC
+cp -a BUGS CHANGELOG LICENSE NEWS* README* TODO samples $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+cat $CWD/README > $PKGDOC/README$TAG
+
+# include docs for the libraries too.
+cd $BASEDIR
+mkdir -p $PKGDOC/{libviper,libvterm}
+cp -a libviper/{CHANGELOG,LICENSE,README.md,TODO} $PKGDOC/libviper
+cp -a libvterm/{API,CHANGELOG,COPY*,LIC*,*.md} $PKGDOC/libvterm
+
+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
diff --git a/system/vwm/vwm.info b/system/vwm/vwm.info
new file mode 100644
index 0000000000..e844ca171d
--- /dev/null
+++ b/system/vwm/vwm.info
@@ -0,0 +1,10 @@
+PRGNAM="vwm"
+VERSION="3.3.2+20200112_207d888"
+HOMEPAGE="https://github.com/TragicWarrior/vwm"
+DOWNLOAD="https://slackware.uk/~urchlay/src/vwm-3.3.2+20200112_207d888.tar.xz"
+MD5SUM="096673cc32536c0e170d02fb7aef5322"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="libconfig"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"