summaryrefslogtreecommitdiff
path: root/community/synergy
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/synergy
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/synergy')
-rw-r--r--community/synergy/PKGBUILD40
-rw-r--r--community/synergy/synergys.rc38
2 files changed, 78 insertions, 0 deletions
diff --git a/community/synergy/PKGBUILD b/community/synergy/PKGBUILD
new file mode 100644
index 000000000..7d140ded5
--- /dev/null
+++ b/community/synergy/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Jelle van der Waa <jelle vdwaa nl>
+# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+
+pkgname=synergy
+pkgver=1.3.6
+pkgrel=1
+pkgdesc="Share a single mouse and keyboard between multiple computers"
+url="http://synergy-foss.org"
+arch=('i686' 'x86_64')
+depends=('gcc-libs' 'libxtst' 'libxinerama' )
+license=('GPL2')
+makedepends=('libxt' 'cmake') # used by configure to test for libx11...
+backup=('etc/synergy.conf')
+source=("http://synergy.googlecode.com/files/$pkgname-$pkgver-Source.tar.gz" "${pkgname}s.rc" )
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}-Source"
+
+ cmake -D CMAKE_INSTALL_PREFIX=/usr .
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}-Source"
+
+# make DESTDIR="$pkgdir" install # doesn't work atm
+
+ # install binary
+ install -d "$pkgdir/usr/bin/"
+ install -Dm755 synergyc $pkgdir/usr/bin/
+ install -Dm755 synergys $pkgdir/usr/bin/
+
+ # install rc.d script and config
+ install -d "${pkgdir}/etc/rc.d"
+ install -Dm644 examples/${pkgname}.conf "${pkgdir}/etc" # true
+ install -Dm755 $srcdir/${pkgname}s.rc "${pkgdir}/etc/rc.d/${pkgname}s" # true
+}
+md5sums=('7a445e97fe01850f60cdf43882d7f385'
+ '8f8c01add9bf6e3ae9f37a36ca6345b6')
diff --git a/community/synergy/synergys.rc b/community/synergy/synergys.rc
new file mode 100644
index 000000000..8f19dc5f7
--- /dev/null
+++ b/community/synergy/synergys.rc
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+daemon_name=synergys
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/synergys`
+case "$1" in
+ start)
+ stat_busy "Starting Synergy Server"
+ [ -z "$PID" ] && /usr/bin/synergys --config /etc/synergy.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Synergy Server"
+ [ ! -z "$PID" ] && kill -9 $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0