aboutsummaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-04-20 20:06:40 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-22 11:38:29 +0700
commit60e3067dde42bd3b93a4fd4185d61930e9f62266 (patch)
treeed97e5d072156bd66b45183bc4efff8bee5b1746 /desktop
parent170ea043cd53e915cf7edfe9002c36ae5ae3a643 (diff)
desktop/amiwm: Added (Amiga lookalike X window manager)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/amiwm/README12
-rw-r--r--desktop/amiwm/amiwm.SlackBuild121
-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, 249 insertions, 0 deletions
diff --git a/desktop/amiwm/README b/desktop/amiwm/README
new file mode 100644
index 0000000000000..a03fa983b5c61
--- /dev/null
+++ b/desktop/amiwm/README
@@ -0,0 +1,12 @@
+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.
+
+The original website is https://www.lysator.liu.se/~marcus/amiwm.html
+but what's packaged here is a fork from github which has been
+updated (in 2017) to build on modern compilers.
+
+Due to license restrictions, you may not redistribute the binary
+package this script builds.
diff --git a/desktop/amiwm/amiwm.SlackBuild b/desktop/amiwm/amiwm.SlackBuild
new file mode 100644
index 0000000000000..f6ee8a63102ea
--- /dev/null
+++ b/desktop/amiwm/amiwm.SlackBuild
@@ -0,0 +1,121 @@
+#!/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. However,
+# I never had an Amiga; for someone who grew up with one, maybe this
+# is how they expect GUIs to work.
+
+# One potential TODO: figure out how to make amiwm show up in the
+# list of window managers, in runlevel 4. I don't use runlevel 4
+# and couldn't figure it out in the 5 minutes I spent looking at it.
+# If you know how to do this, send me a patch.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=amiwm
+VERSION=${VERSION:-20170803_8e0948c}
+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.xz
+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
+
+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).
+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 *.md $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 0000000000000..7f2da26094143
--- /dev/null
+++ b/desktop/amiwm/amiwm.info
@@ -0,0 +1,10 @@
+PRGNAM="amiwm"
+VERSION="20170803_8e0948c"
+HOMEPAGE="https://github.com/redspl/amiwm/"
+DOWNLOAD="https://slackware.uk/~urchlay/src/amiwm-20170803_8e0948c.tar.xz"
+MD5SUM="e765128f9f0755f86cf1121c5194f5f0"
+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 0000000000000..a8c0f353fb845
--- /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 0000000000000..10b91aa9e78a9
--- /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 0000000000000..5f173582f636b
--- /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: Due to license restrictions, you may not redistribute the binary
+amiwm: package this script builds.
+amiwm:
+amiwm:
+amiwm:
diff --git a/desktop/amiwm/xinitrc.amiwm b/desktop/amiwm/xinitrc.amiwm
new file mode 100644
index 0000000000000..2b6770ca9f187
--- /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