desktop/x2x: Added (share keyboard/mouse across multiple X displays)

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

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2020-10-31 00:27:17 +00:00 committed by Willy Sudiarto Raharjo
parent dfc0b7dbba
commit cadbc09a11
No known key found for this signature in database
GPG key ID: 3F617144D7238786
5 changed files with 156 additions and 0 deletions

4
desktop/x2x/README Normal file
View file

@ -0,0 +1,4 @@
x2x (share keyboard/mouse between multiple X displays)
x2x allows the keyboard and mouse on one X display to be used to control
another X display. It also shares X clipboards between the displays.

44
desktop/x2x/git2tarxz.sh Normal file
View file

@ -0,0 +1,44 @@
#!/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.
# Takes one optional argument, which is the commit or tag to create
# a tarball of. With no arg, HEAD is used.
PRGNAM=x2x
CLONE_URL=https://github.com/dottedmag/x2x.git
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=1.30_beta+${DATE}_${GIT_SHA}
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"

19
desktop/x2x/slack-desc Normal file
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------------------------------------------------------|
x2x: x2x (share keyboard/mouse between multiple X displays)
x2x:
x2x: x2x allows the keyboard and mouse on one X display to be used to
x2x: control another X display. It also shares X clipboards between
x2x: the displays.
x2x:
x2x:
x2x:
x2x:
x2x:
x2x:

View file

@ -0,0 +1,79 @@
#!/bin/sh
# Slackware build script for x2x
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20200130 bkw: Sorry about the fugly version number. The last "release"
# was 1.30-beta, which got imported into a github repo by the current
# upstream, who has made some changes but not yet done a release.
PRGNAM=x2x
VERSION=${VERSION:-1.30_beta+20200121_ec10215}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
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 .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
sh bootstrap.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man1/$PRGNAM.1
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:-tgz}

10
desktop/x2x/x2x.info Normal file
View file

@ -0,0 +1,10 @@
PRGNAM="x2x"
VERSION="1.30_beta+20200121_ec10215"
HOMEPAGE="https://github.com/dottedmag/x2x"
DOWNLOAD="https://slackware.uk/~urchlay/src/x2x-1.30_beta+20200121_ec10215.tar.xz"
MD5SUM="4d31a8e54beca199cd05227bfa9a6cc6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"