summaryrefslogtreecommitdiffstats
path: root/desktop/amiwm
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/amiwm')
-rw-r--r--desktop/amiwm/README9
-rw-r--r--desktop/amiwm/amiwm.SlackBuild134
-rw-r--r--desktop/amiwm/amiwm.info10
-rw-r--r--desktop/amiwm/doinst.sh11
-rw-r--r--desktop/amiwm/git2tarxz.sh42
-rw-r--r--desktop/amiwm/slack-desc19
-rw-r--r--desktop/amiwm/xinitrc.amiwm34
7 files changed, 259 insertions, 0 deletions
diff --git a/desktop/amiwm/README b/desktop/amiwm/README
new file mode 100644
index 0000000000..25c4871e38
--- /dev/null
+++ b/desktop/amiwm/README
@@ -0,0 +1,9 @@
+amiwm (Amiga lookalike X window manager)
+
+amiwm is an X window manager that tries to make your display look and
+feel like an Amiga Workbench screen. It is fully functional and can do
+all the usual window manager stuff, like moving and resizing windows.
+
+Due to license restrictions, you may not redistribute the binary
+package this script builds unless you include the complete source.
+See /usr/doc/amiwm-$VERSION/LICENSE for details.
diff --git a/desktop/amiwm/amiwm.SlackBuild b/desktop/amiwm/amiwm.SlackBuild
new file mode 100644
index 0000000000..bf3040c140
--- /dev/null
+++ b/desktop/amiwm/amiwm.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/bash
+
+# Slackware build script for amiwm
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# This thing is very early-90s, and not very much fun to use (even
+# for me, who prefers WindowMaker). However, I never had an Amiga;
+# for someone who grew up with one, maybe this is how they expect GUIs
+# to work.
+
+# 20230427 bkw: update for v0.22pl2.
+# - Switched upstreams. Apparently the github version I packaged was a
+# fork. Now I'm using the actual author's version. Thanks to luna on
+# IRC for finding the original site and the new release (also for
+# testing the previous version).
+# - Fix issue with parallel make.
+# - Clean up man page slightly.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=amiwm
+VERSION=${VERSION:-0.22pl2}
+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
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM$VERSION
+tar xvf $CWD/$PRGNAM$VERSION.tar.gz
+cd $PRGNAM$VERSION
+chown -R root:root .
+# permissions are awful, don't revert to template here.
+find -L . -type d -a -exec chmod 755 {} \+ -o \
+ -type f -a -exec chmod 644 {} \+
+
+LIB=lib$LIBDIRSUFFIX
+LIBDIR=/usr/$LIB
+
+# hardcoded wrong path in config file.
+sed -i "s,/usr/local/lib,$LIBDIR," system.amiwmrc
+
+# 20230427 bkw: man page has confusing wording. also left curly
+# quotes, but the right quotes are straight, which is weird-looking.
+sed -i -e 's,amiwmrc-file,amiwmrc file,' \
+ -e 's,\\f1\\\*(lq\\f3,",g' \
+ amiwm.1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+sh ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+# --libdir doesn't work as usual, and there's no DESTDIR support.
+# install-strip isn't supported, but not needed (make install will
+# strip the binaries).
+# have to make the X* files here to avoid having $PKG in them,
+# though it doesn't really matter (we don't use these, they're
+# just there for reference I guess).
+# 20230427 bkw: it occasionally fails with -jN (but not always),
+# because gram.h isn't made before it's needed. so make it first.
+make gram.h
+make libdir=$LIBDIR all Xinitrc Xsession Xsession2
+make install prefix=$PKG/usr libdir=$PKG/$LIBDIR
+gzip -9 $PKG/usr/man/man*/*.*
+
+# this symlink ends up absolute, with $PKG in the path.
+rm -f $PKG/usr/bin/requestchoice
+ln -s ../$LIB/$PRGNAM/requestchoice $PKG/usr/bin/requestchoice
+
+# xinitrc.amiwm adapted from Slackware's xinitrc.wmaker
+install -D -oroot -groot -m0755 \
+ $CWD/xinitrc.$PRGNAM \
+ $PKG/etc/X11/xinit/xinitrc.$PRGNAM
+
+# make this a .new config file, although since it's not in /etc,
+# "slackpkg new-config" won't ever prompt for it (not really a
+# problem, this isn't a core Slackware package anyway).
+rename rc rc.new $PKG/$LIBDIR/$PRGNAM/system.amiwmrc
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a README* LICENSE* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s,@LIB@,$LIB," < $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/desktop/amiwm/amiwm.info b/desktop/amiwm/amiwm.info
new file mode 100644
index 0000000000..1cead02e70
--- /dev/null
+++ b/desktop/amiwm/amiwm.info
@@ -0,0 +1,10 @@
+PRGNAM="amiwm"
+VERSION="0.22pl2"
+HOMEPAGE="https://www.lysator.liu.se/~marcus/amiwm.html"
+DOWNLOAD="ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm0.22pl2.tar.gz"
+MD5SUM="1179235617aeeb807e73f71605836b1b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/desktop/amiwm/doinst.sh b/desktop/amiwm/doinst.sh
new file mode 100644
index 0000000000..a8c0f353fb
--- /dev/null
+++ b/desktop/amiwm/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config usr/@LIB@/amiwm/system.amiwmrc.new
diff --git a/desktop/amiwm/git2tarxz.sh b/desktop/amiwm/git2tarxz.sh
new file mode 100644
index 0000000000..10b91aa9e7
--- /dev/null
+++ b/desktop/amiwm/git2tarxz.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# Create source tarball from git repo
+
+# 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.
+
+# Takes one optional argument, which is the commit or tag to create a
+# tarball of. With no arg, HEAD is used.
+
+PRGNAM=amiwm
+CLONE_URL=https://github.com/redspl/amiwm/
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=${DATE}_${GIT_SHA}
+
+find . -name .git\* -print0 | xargs -0 rm -rf
+
+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/desktop/amiwm/slack-desc b/desktop/amiwm/slack-desc
new file mode 100644
index 0000000000..7e8a238b8a
--- /dev/null
+++ b/desktop/amiwm/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------------------------------------------------------|
+amiwm: amiwm (Amiga lookalike X window manager)
+amiwm:
+amiwm: amiwm is an X window manager that tries to make your display look and
+amiwm: feel like an Amiga Workbench screen. It is fully functional and can do
+amiwm: all the usual window manager stuff, like moving and resizing windows.
+amiwm:
+amiwm:
+amiwm:
+amiwm:
+amiwm:
+amiwm:
diff --git a/desktop/amiwm/xinitrc.amiwm b/desktop/amiwm/xinitrc.amiwm
new file mode 100644
index 0000000000..2b6770ca9f
--- /dev/null
+++ b/desktop/amiwm/xinitrc.amiwm
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# xinitrc.amiwm, part of SBo amiwm package.
+# heavily based on Slackware's xinitrc.wmaker.
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=/etc/X11/xinit/.Xresources
+sysmodmap=/etc/X11/xinit/.Xmodmap
+
+# merge in defaults and keymaps
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f $userresources ]; then
+ xrdb -merge $userresources
+fi
+
+if [ -f $usermodmap ]; then
+ xmodmap $usermodmap
+fi
+
+# Start the window manager:
+if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
+ exec ck-launch-session dbus-launch --exit-with-session /usr/bin/amiwm
+else
+ exec dbus-launch --exit-with-session /usr/bin/amiwm
+fi