desktop/devilspie2: Added (window-matching utility)

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Marek Šrejma 2023-02-01 22:02:47 +00:00 committed by Willy Sudiarto Raharjo
parent 6a1f2280f5
commit 22e4f4bdf2
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 143 additions and 0 deletions

24
desktop/devilspie2/README Normal file
View file

@ -0,0 +1,24 @@
Devil's Pie 2 - A window-matching utility
Devilspie2 is a window-matching utility, allowing the user to perform
scripted actions on windows as they are created. For example, you can
script a terminal program to always be positioned at a specific screen
position, or position a window on a specific workspace.
Devilspie2 is based on the program Devilspie by Ross Burton. The
difference is that Devilspie2 has replaced the symbolic expressions of
the original with a Lua interpreter, making it much easier to maintain
and extend.
Please note that the rules of Devilspie2 are not compatible with the
symbolic expressions of the original Devilspie.
Please see the README for more information and examples of use.
This script will build the package with support for GTK 3 and Lua 5.1,
but if you prefer building it with other versions,
i.e GTK 2 and Lua 5.4, use
GTK2=on LUA=5.4 devilspie2.SlackBuild
Also the compiler can be set optionally, i.e CC=clang.

View file

@ -0,0 +1,90 @@
#!/bin/bash
# Slackware build script for devilspie
# Written by Phillip Warner <pc_warner@yahoo.com>
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=devilspie2
VERSION=${VERSION:-0.44}
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 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march="$ARCH" -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "aarch64" ]; 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.?z*
cd $PRGNAM-$VERSION
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 {} \;
sed -i "s#share/man#man#" Makefile
CFLAGS="$SLKCFLAGS" \
CPPFLAGS="$SLKCFLAGS" \
CC=${CC:-gcc} \
PREFIX=/usr \
LUA=lua${LUA:-5.1} \
GTK2=${GTK2:-off} \
make
PREFIX=/usr \
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do
ln -s $( readlink $i ).gz $i.gz ; rm $i
done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -ar AUTHORS COPYING ChangeLog GPL3.txt README* TODO doc/examples \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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

View file

@ -0,0 +1,10 @@
PRGNAM="devilspie2"
VERSION="0.44"
HOMEPAGE="https://www.nongnu.org/devilspie2/"
DOWNLOAD="http://download.savannah.nongnu.org/releases/devilspie2/devilspie2-0.44.tar.xz"
MD5SUM="60194adb85b935158c7c15017d3ab9df"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua"
MAINTAINER="Marek Šrejma"
EMAIL="marek@modweb.de"

View file

@ -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------------------------------------------------------|
devilspie2: devilspie2 (window-matching utility)
devilspie2:
devilspie2: Devil's Pie can be configured to detect windows as they are created,
devilspie2: and match the window to a set of rules. If the window matches the
devilspie2: rules, it can perform a series of actions on that window.
devilspie2:
devilspie2: Please note that the rules of Devilspie2 are not compatible with the
devilspie2: symbolic expressions of the original Devilspie.
devilspie2:
devilspie2:
devilspie2: