summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorPierre Cazenave <pwcazenave at gmail {dot} com>2010-12-16 20:05:15 -0200
committerErik Hanson <erik@slackbuilds.org>2010-12-17 07:56:48 -0600
commit4f983c2e511d1ed2832dc7a01254ff6d3dbce7f6 (patch)
tree79025c40de329f440e7067b5a6c0fb9cf5a1b719 /desktop
parent63b68a1eaedeadab514b3109a574332d9db09d03 (diff)
downloadslackbuilds-4f983c2e511d1ed2832dc7a01254ff6d3dbce7f6.tar.gz
desktop/synergy-plus: New init-script, man-pages & config
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/synergy-plus/README9
-rw-r--r--desktop/synergy-plus/doinst.sh23
-rw-r--r--desktop/synergy-plus/rc.synergys70
-rw-r--r--desktop/synergy-plus/slack-desc8
-rw-r--r--desktop/synergy-plus/synergy-plus.SlackBuild27
-rw-r--r--desktop/synergy-plus/synergy-plus.info4
-rw-r--r--desktop/synergy-plus/synergyc.man47
-rw-r--r--desktop/synergy-plus/synergys.man57
8 files changed, 230 insertions, 15 deletions
diff --git a/desktop/synergy-plus/README b/desktop/synergy-plus/README
index 29e21bca7c..937ffe5722 100644
--- a/desktop/synergy-plus/README
+++ b/desktop/synergy-plus/README
@@ -6,11 +6,14 @@ display. It's a little like having a 2nd or a 3rd desktop.
This build can co-exist with an existing synergy installation if
SYNERGYOLD is set to yes. This is set to no by default as synergy has
-not been updated in some two and a half years.
+not been updated in some three years.
If SYNERGYOLD is set to yes, the two binaries synergyc (client)
and synergys (server) are suffixed with -plus to synergyc-plus and
synergys-plus.
-An example configuration file (synergy.conf) can be found in
-/usr/doc/synergy-plus-1.3.4/.
+The configuration file is /etc/synergy.conf. You will need to edit this
+to suit your needs before synergy will work at all with the rc.synergys
+script. Alternatively, you can choose to run synergys as a normal user,
+making your configuration file $HOME/.synergy.conf.
+
diff --git a/desktop/synergy-plus/doinst.sh b/desktop/synergy-plus/doinst.sh
new file mode 100644
index 0000000000..12625c065e
--- /dev/null
+++ b/desktop/synergy-plus/doinst.sh
@@ -0,0 +1,23 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.synergys.new:
+if [ -e etc/rc.d/rc.synergys ]; then
+ cp -a etc/rc.d/rc.synergys etc/rc.d/rc.synergys.new.incoming
+ cat etc/rc.d/rc.synergys.new > etc/rc.d/rc.synergys.new.incoming
+ mv etc/rc.d/rc.synergys.new.incoming etc/rc.d/rc.synergys.new
+fi
+
+config etc/rc.d/rc.synergys.new
+config etc/synergy.conf.new
+
diff --git a/desktop/synergy-plus/rc.synergys b/desktop/synergy-plus/rc.synergys
new file mode 100644
index 0000000000..61f72afcf0
--- /dev/null
+++ b/desktop/synergy-plus/rc.synergys
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# By Steven King 11/3/2010
+# kingrst@gmail.com
+#
+# Modified by Pierre Cazenave 3rd November 2010
+# pwcazenave <at> gmail {dot} com
+#
+# Starts the Synergy-Plus Server
+#
+
+synergy_start() {
+
+ if [ -f /var/run/synergys.pid ]; then
+ echo "Synergy Server is already running"
+ exit 1
+ elif [ -x /usr/bin/synergys ]; then
+ /usr/bin/synergys || exit $?
+
+ pidof synergys > /var/run/synergys.pid
+ echo "Synergy Server Started"
+ fi
+
+}
+
+synergy_stop() {
+
+ if [ -f /var/run/synergys.pid ]; then
+ kill $(cat /var/run/synergys.pid) || echo "Unable to stop Synergy Server"
+
+ rm -f /var/run/synergys.pid
+ echo "Synergy Server Stopped"
+ else
+ echo "Synergy Server is not started"
+ fi
+
+}
+
+synergy_status() {
+
+ if [ -f /var/run/synergys.pid ]; then
+ echo "Synergy Server Running"
+ echo "PID: $(cat /var/run/synergys.pid)"
+ else
+ echo "Synergy Server is not started"
+ fi
+
+}
+
+
+case "$1" in
+ "start")
+ synergy_start
+ ;;
+ "stop")
+ synergy_stop
+ ;;
+ "status")
+ synergy_status
+ ;;
+ "restart")
+ synergy_stop
+ sleep 1
+ synergy_start
+ ;;
+ *)
+ echo "$0 Usage: [start|stop|restart|status]"
+ ;;
+esac
+
diff --git a/desktop/synergy-plus/slack-desc b/desktop/synergy-plus/slack-desc
index 1697f02ebe..67669e3820 100644
--- a/desktop/synergy-plus/slack-desc
+++ b/desktop/synergy-plus/slack-desc
@@ -5,9 +5,9 @@
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
- |-----handy-ruler--------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
synergy-plus: synergy-plus (share mouse/keyboard between multiple computers)
-synergy-plus:
+synergy-plus:
synergy-plus: Synergy+ (synergy-plus) lets you easily share a single mouse and
synergy-plus: keyboard between multiple computers with different operating
synergy-plus: systems, without special hardware. All you need is a LAN
@@ -15,5 +15,5 @@ synergy-plus: connection. It's intended for users with multiple computers, where
synergy-plus: each system uses its own display. It's a little like having a 2nd
synergy-plus: or a 3rd desktop...
synergy-plus:
-synergy-plus: Homepage: http://code.google.com/p/synergy-plus/
-synergy-plus:
+synergy-plus:
+synergy-plus:
diff --git a/desktop/synergy-plus/synergy-plus.SlackBuild b/desktop/synergy-plus/synergy-plus.SlackBuild
index 6754bcc6da..acaa195000 100644
--- a/desktop/synergy-plus/synergy-plus.SlackBuild
+++ b/desktop/synergy-plus/synergy-plus.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for synergy-plus.
#
-# Copyright 2009 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
+# Copyright 2009,2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,18 +21,19 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Thanks to Steven King for the rc.synergys script.
+#
PRGNAM=synergy-plus
VERSION=${VERSION:-1.3.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -73,7 +74,7 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-if [ $SYNERGYOLD == "yes" ]; then
+if [ $SYNERGYOLD = "yes" ]; then
BINSUFFIX="--program-suffix=-plus"
fi
@@ -92,6 +93,19 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Move the rc.synergys file to the package etc directory
+mkdir -p $PKG/etc/rc.d/
+cat $CWD/rc.synergys > $PKG/etc/rc.d/rc.synergys.new
+
+# Copy the sample configuration file to the package etc directory
+cat examples/synergy.conf > $PKG/etc/synergy.conf.new
+
+# Add man pages from upstream
+mkdir -p $PKG/usr/man/man1
+cp $CWD/synergy{s,c}.man $PKG/usr/man/man1
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING ChangeLog INSTALL NEWS README examples/synergy.conf \
@@ -101,6 +115,7 @@ cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
mkdir -p $PKG/install
cat $CWD/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}
diff --git a/desktop/synergy-plus/synergy-plus.info b/desktop/synergy-plus/synergy-plus.info
index 05c02cdb78..8e2a2e65cc 100644
--- a/desktop/synergy-plus/synergy-plus.info
+++ b/desktop/synergy-plus/synergy-plus.info
@@ -1,10 +1,10 @@
PRGNAM="synergy-plus"
VERSION="1.3.4"
-HOMEPAGE="http://code.google.com/p/synergy-plus/"
+HOMEPAGE="http://synergy-foss.org/"
DOWNLOAD="http://synergy-plus.googlecode.com/files/synergy-plus-1.3.4.tar.gz"
MD5SUM="2c565afe5f920d363eef38dd97449b73"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Pierre Cazenave"
EMAIL="pwcazenave <at> gmail {dot} com"
-APPROVED="dsomero"
+APPROVED="dsomero,Niels Horn"
diff --git a/desktop/synergy-plus/synergyc.man b/desktop/synergy-plus/synergyc.man
new file mode 100644
index 0000000000..58a99d68f5
--- /dev/null
+++ b/desktop/synergy-plus/synergyc.man
@@ -0,0 +1,47 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
+.TH SYNERGYC "1" "June 2010" "synergyc 1.5.0, protocol version 1.3" "User Commands"
+.SH NAME
+synergyc \- manual page for synergyc 1.5.0, protocol version 1.3
+.SH SYNOPSIS
+.B synergyc
+[\fI--yscroll <delta>\fR] [\fI--daemon|--no-daemon\fR] [\fI--name <screen-name>\fR] [\fI--restart|--no-restart\fR] [\fI--debug <level>\fR] \fI<server-address>\fR
+.SH DESCRIPTION
+Connect to a synergy mouse/keyboard sharing server.
+.TP
+\fB\-d\fR, \fB\-\-debug\fR <level>
+filter out log messages with priority below level.
+level may be: FATAL, ERROR, WARNING, NOTE, INFO,
+DEBUG, DEBUGn (1\-5).
+.TP
+\fB\-n\fR, \fB\-\-name\fR <screen\-name> use screen\-name instead the hostname to identify
+this screen in the configuration.
+.TP
+\fB\-1\fR, \fB\-\-no\-restart\fR
+do not try to restart on failure.
+.PP
+* \fB\-\-restart\fR restart the server automatically if it fails.
+.TP
+\fB\-l\fR \fB\-\-log\fR <file>
+write log messages to file.
+.TP
+\fB\-f\fR, \fB\-\-no\-daemon\fR
+run in the foreground.
+.PP
+* \fB\-\-daemon\fR run as a daemon.
+.TP
+\fB\-\-yscroll\fR <delta>
+defines the vertical scrolling delta, which is
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+display this help and exit.
+.TP
+\fB\-\-version\fR
+display version information and exit.
+.PP
+* marks defaults.
+.PP
+The server address is of the form: [<hostname>][:<port>]. The hostname
+must be the address or hostname of the server. The port overrides the
+default port, 24800.
+.SH COPYRIGHT
+Copyright \(co 2010 The Synergy+ Project
diff --git a/desktop/synergy-plus/synergys.man b/desktop/synergy-plus/synergys.man
new file mode 100644
index 0000000000..b3f0f1f9fb
--- /dev/null
+++ b/desktop/synergy-plus/synergys.man
@@ -0,0 +1,57 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
+.TH SYNERGYS "1" "June 2010" "synergys 1.5.0, protocol version 1.3" "User Commands"
+.SH NAME
+synergys \- manual page for synergys 1.5.0, protocol version 1.3
+.SH SYNOPSIS
+.B synergys
+[\fI--address <address>\fR] [\fI--config <pathname>\fR] [\fI--daemon|--no-daemon\fR] [\fI--name <screen-name>\fR] [\fI--restart|--no-restart\fR] [\fI--debug <level>\fR]
+.SH DESCRIPTION
+Start the synergy mouse/keyboard sharing server.
+.TP
+\fB\-a\fR, \fB\-\-address\fR <address>
+listen for clients on the given address.
+.TP
+\fB\-c\fR, \fB\-\-config\fR <pathname>
+use the named configuration file instead.
+.TP
+\fB\-d\fR, \fB\-\-debug\fR <level>
+filter out log messages with priority below level.
+level may be: FATAL, ERROR, WARNING, NOTE, INFO,
+DEBUG, DEBUGn (1\-5).
+.TP
+\fB\-n\fR, \fB\-\-name\fR <screen\-name> use screen\-name instead the hostname to identify
+this screen in the configuration.
+.TP
+\fB\-1\fR, \fB\-\-no\-restart\fR
+do not try to restart on failure.
+.PP
+* \fB\-\-restart\fR restart the server automatically if it fails.
+.TP
+\fB\-l\fR \fB\-\-log\fR <file>
+write log messages to file.
+.TP
+\fB\-f\fR, \fB\-\-no\-daemon\fR
+run in the foreground.
+.PP
+* \fB\-\-daemon\fR run as a daemon.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+display this help and exit.
+.TP
+\fB\-\-version\fR
+display version information and exit.
+.PP
+* marks defaults.
+.PP
+The argument for \fB\-\-address\fR is of the form: [<hostname>][:<port>]. The
+hostname must be the address or hostname of an interface on the system.
+The default is to listen on all interfaces. The port overrides the
+default port, 24800.
+.PP
+If no configuration file pathname is provided then the first of the
+following to load successfully sets the configuration:
+.IP
+$HOME/.synergy.conf
+/etc/synergy.conf
+.SH COPYRIGHT
+Copyright \(co 2010 The Synergy+ Project