system/suckless-tools: Added (utilities from suckless.org).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2014-03-19 07:04:49 +07:00 committed by Erik Hanson
parent f3704690c6
commit cf8cc4ba89
10 changed files with 384 additions and 0 deletions

View File

@ -0,0 +1,32 @@
suckless-tools (tools from suckless.org)
This is a collection of small tools from tools.suckless.org. They're
bundled together in one build because they're so small and simple.
Included tools:
lsw - Lists the titles of all running X windows to stdout, similar to ls(1).
lsx - List executables in a directory tree [1].
sprop - Simple X property utility.
sselp - Simple X selection printer.
ssid - Simple setsid replacement.
swarp - Simple pointer warping tool for X.
wmname - Prints/sets the window manager name property of the root window [2].
xssstate - A simple tool to retrieve the X screensaver state.
Not included:
dmenu, sandy, sic, slock, svkbd, tabbed - These are packaged separately
on SlackBuilds.org.
9base, ii - Currently not available on SlackBuilds.org. If you package
one of these, please let me know so I can update this README.
[1] lsx would conflict with the /usr/bin/lsx from Slackware's minicom
package. To avoid this, lsx is installed as /usr/bin/lsX. If you don't use
XMODEM (or even know what it is), "rm -f /usr/bin/lsx" before installing
suckless-tools, and /usr/bin/lsx will be a symlink to lsX.
[2] wmname has been packaged separately (as desktop/wmname). This build
gives you the same version of wmname, plus a man page for it, so the
separate wmname build isn't needed.

View File

@ -0,0 +1,6 @@
if [ ! -r usr/bin/lsx ]; then
( cd usr/man/man1 ; rm -rf lsx.1.gz )
( cd usr/man/man1 ; ln -sf lsX.1.gz lsx.1.gz )
( cd usr/bin ; rm -rf lsx )
( cd usr/bin ; ln -sf lsX lsx )
fi

View File

@ -0,0 +1,43 @@
# POD source for lsX man page. Convert with:
# pod2man --stderr -s1 -c"Suckless.org Tools" -r0.1 lsx.pod > lsx.1
=pod
=head1 NAME
B<lsX> - List executables in one or more directory trees.
=head1 SYNOPSIS
B<lsX> [dir] {[dir] ...}
=head1 DESCRIPTION
B<lsX> lists the executables in the given directories, non-recursively.
Non-directory arguments are ignored. If no arguments are given, B<lsX>
exits without doing anything.
B<lsX> always exits with zero status.
=head1 OPTIONS
B<-v> prints the version number and exits.
=head1 NOTES
When using B<lsX> with multiple directory arguments, the 2nd and any
further directories must be absolute paths (this counts as a bug).
B<lsX> may also be installed as B<lsx>. The name change is to avoid
conflicting with the B<lsx> symlink included in Slackware's minicom
package. If minicom isn't installed, B</usr/bin/lsx> will be a
symlink to B<lsX>.
=head1 AUTHORS
B<lsX> was written by Anselm R. Garbe (garbeam at gmail dot com) and
Sander van Dijk (a dot h dot vandijk at gmail dot com).
This man page written by B. Watson for the SlackBuilds.org project. It
may be used by anyone.
=cut

View File

@ -0,0 +1,36 @@
# POD source for sselp man page. Convert with:
# pod2man --stderr -s1 -c"Suckless.org Tools" -r0.1 sselp.pod > sselp.1
=pod
=head1 NAME
B<sselp> - Simple X selection printer.
=head1 SYNOPSIS
B<sselp>
=head1 DESCRIPTION
B<sselp> prints the X selection to stdout. If there is no X client owning
the selection it just exits. Useful for scripts where you can query the
X selection without pressing mouse Button2 in cumbersome ways.
B<sselp> always exits with zero status.
=head1 OPTIONS
B<-v> prints the version number and exits.
=head1 ENVIRONMENT
B<DISPLAY> - used in the usual way.
=head1 AUTHORS
B<wmname> was written by Anselm R. Garbe (garbeam at gmail dot com).
This man page written by B. Watson for the SlackBuilds.org project. It
may be used by anyone.
=cut

View File

@ -0,0 +1,34 @@
# POD source for ssid man page. Convert with:
# pod2man --stderr -s1 -c"Suckless.org Tools" -r0.1 ssid.pod > ssid.1
=pod
=head1 NAME
B<ssid> - Simple setsid replacement.
=head1 SYNOPSIS
B<ssid> [-v] cmd [arg ...]
=head1 DESCRIPTION
B<ssid> runs a program in a new session.
=head1 OPTIONS
B<-v> prints the version number and exits.
=head1 SEE ALSO
setsid(2)
setsid(1)
=head1 AUTHORS
B<ssid> was written by Anselm R. Garbe (garbeam at gmail dot com).
This man page written by B. Watson for the SlackBuilds.org project. It
may be used by anyone.
=cut

View File

@ -0,0 +1,39 @@
# POD source for swarp man page. Convert with:
# pod2man --stderr -s1 -c"Suckless.org Tools" -r0.1 swarp.pod > swarp.1
=pod
=head1 NAME
B<swarp> - simple pointer warp
=head1 SYNOPSIS
B<swarp> [x] [y]
B<swarp> -v
=head1 DESCRIPTION
B<swarp> is a generic pointer warping utility for X. Example:
# B<swarp 100 100>
will warp the pointer to (100, 100) on your screen.
=head1 OPTIONS
B<-v> prints the version number and exits.
=head1 ENVIRONMENT
B<DISPLAY> - used in the usual way.
=head1 AUTHORS
B<ssid> was written by Anselm R. Garbe (garbeam at gmail dot com)
and Sander van Dijk (a dot h dot vandijk at gmail dot com).
This man page written by B. Watson for the SlackBuilds.org project. It
may be used by anyone.
=cut

View File

@ -0,0 +1,44 @@
# POD source for wmname man page. Convert with:
# pod2man --stderr -s1 -c"Suckless.org Tools" -r0.1 wmname.pod > wmname.1
=pod
=head1 NAME
B<wmname> - Prints/sets the EWMH WM name property.
=head1 SYNOPSIS
B<wmname> I<{[name]}>
=head1 DESCRIPTION
wmname prints/sets the window manager name property of the root window,
similar to how hostname(1) behaves.
wmname is a nice utility to fix problems with JDK versions and other
broken programs assuming a reparenting window manager for instance.
The following command prints the window manager name, if any:
# B<wmname>
The following command sets the window manager name, e.g.
# B<wmname LG3D>
This helpful when attempting to run java swing (broken) applications,
it makes them think they are running through the looking glass and behave
as expected.
=head1 OPTIONS
B<-v> prints the version number and exits.
=head1 AUTHORS
B<wmname> was written by Anselm R. Garbe (garbeam at gmail dot com).
This man page written by B. Watson for the SlackBuilds.org project. It
may be used by anyone.
=cut

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------------------------------------------------------|
suckless-tools: suckless-tools (utilities from suckless.org)
suckless-tools:
suckless-tools: This is a collection of small tools/utilities from
suckless-tools: suckless.org. They're bundled together in one build because they're
suckless-tools: so small and simple.
suckless-tools:
suckless-tools: Included tools:
suckless-tools:
suckless-tools: lsw-XXXX lsx-XXXX sprop-XXXX sselp-XXXX
suckless-tools: ssid-XXXX swarp-XXXX wmname-XXXX xssstate-XXXX
suckless-tools:

View File

@ -0,0 +1,107 @@
#!/bin/sh
# Slackware build script for suckless-tools
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PROGS="lsw lsx sprop sselp ssid swarp wmname xssstate"
PRGNAM=suckless-tools
VERSION=${VERSION:-20140317}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -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
DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
# we are going to repeatedly modify the slack-desc, don't do
# it in $CWD because that might be read-only.
cp $CWD/slack-desc .
# some of the Makefiles expect these to already exist:
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
for prog in $PROGS; do
tar xvf $CWD/$prog-*.tar.gz
cd $prog-*
dir=$( basename $( pwd ) )
toolver=$( echo $dir | cut -d- -f2 )
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 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i -e "s,-O.\>,$SLKCFLAGS," -e "s,\<lib\>,lib$LIBDIRSUFFIX," config.mk
make PREFIX=/usr MANPREFIX=/usr/man DESTDIR=$PKG install
mkdir -p $DOCDIR/$dir
cp -a README LICENSE $DOCDIR/$dir
cd -
sed -i "s,$prog-XXXX,$dir," slack-desc
# some of the man pages were written for this build
[ -e $CWD/pod/$prog.pod ] && \
pod2man --stderr -s1 -c"Suckless.org Tools" -r$toolver $CWD/pod/$prog.pod \
> $PKG/usr/man/man1/$prog.1
done
strip $PKG/usr/bin/*
gzip -9 $PKG/usr/man/man?/*.?
# Special case handling because Slackware's minicom package includes a
# /usr/bin/lsx already (it's a symlink to lsz). Our doinst.sh will
# link these to their lowercase versions, if minicom's /usr/bin/lsx
# is missing at install time.
mv $PKG/usr/bin/lsx $PKG/usr/bin/lsX
mv $PKG/usr/man/man1/lsx.1.gz $PKG/usr/man/man1/lsX.1.gz
cp -a $CWD/README $DOCDIR
cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View File

@ -0,0 +1,24 @@
PRGNAM="suckless-tools"
VERSION="20140317"
HOMEPAGE="http://tools.suckless.org/"
DOWNLOAD="http://dl.suckless.org/tools/lsw-0.2.tar.gz
http://dl.suckless.org/tools/lsx-0.1.tar.gz
http://dl.suckless.org/tools/sprop-0.1.tar.gz
http://dl.suckless.org/tools/sselp-0.2.tar.gz
http://dl.suckless.org/tools/ssid-0.1.tar.gz
http://dl.suckless.org/tools/swarp-0.1.tar.gz
http://dl.suckless.org/tools/wmname-0.1.tar.gz
http://dl.suckless.org/tools/xssstate-1.1.tar.gz"
MD5SUM="5ddd61d04ff084a39494b2aa06c00b65
d48fdce9868b13bf5ef3e7834768f89f
7586fc99580a1f79194f2e83f9ef3e9e
b74d6558790d8df897db40bca90bc0f6
8740013208d79ef4d7ce7fe0c1f12e87
b674dd2f33c45cbd789e4b6e09b7b55e
6903d299f84d335e529fbd2c1d6e49fe
7d4935bc17b6f01afa12e420331fa688"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"