diff options
author | B. Watson <yalhcru@gmail.com> | 2020-10-31 00:27:17 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-31 11:15:31 +0700 |
commit | cadbc09a1148db45a61575e05a82d92da561d578 (patch) | |
tree | a602eddf3a87ddaae7c0379e293869d51da7f4bc | |
parent | dfc0b7dbba510a2cea571c88d8c0e872d0b66bc9 (diff) | |
download | slackbuilds-cadbc09a1148db45a61575e05a82d92da561d578.tar.gz |
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>
-rw-r--r-- | desktop/x2x/README | 4 | ||||
-rw-r--r-- | desktop/x2x/git2tarxz.sh | 44 | ||||
-rw-r--r-- | desktop/x2x/slack-desc | 19 | ||||
-rw-r--r-- | desktop/x2x/x2x.SlackBuild | 79 | ||||
-rw-r--r-- | desktop/x2x/x2x.info | 10 |
5 files changed, 156 insertions, 0 deletions
diff --git a/desktop/x2x/README b/desktop/x2x/README new file mode 100644 index 0000000000..0d03b4a883 --- /dev/null +++ b/desktop/x2x/README @@ -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. diff --git a/desktop/x2x/git2tarxz.sh b/desktop/x2x/git2tarxz.sh new file mode 100644 index 0000000000..a515561416 --- /dev/null +++ b/desktop/x2x/git2tarxz.sh @@ -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" diff --git a/desktop/x2x/slack-desc b/desktop/x2x/slack-desc new file mode 100644 index 0000000000..1dc8a7d28a --- /dev/null +++ b/desktop/x2x/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------------------------------------------------------| +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: diff --git a/desktop/x2x/x2x.SlackBuild b/desktop/x2x/x2x.SlackBuild new file mode 100644 index 0000000000..81f4a0b7ca --- /dev/null +++ b/desktop/x2x/x2x.SlackBuild @@ -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} diff --git a/desktop/x2x/x2x.info b/desktop/x2x/x2x.info new file mode 100644 index 0000000000..86344e9254 --- /dev/null +++ b/desktop/x2x/x2x.info @@ -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" |