[Lunar-commits] <moonbase> g15daemon: Initial import
Stefan Wold
ratler at lunar-linux.org
Sun Mar 21 18:00:38 CET 2010
commit 8d22e97c777b7b77af45b345d4b96a0a788ad63e
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sun Mar 21 18:00:38 2010 +0100
g15daemon: Initial import
---
utils/g15daemon/BUILD | 30 ++++++++++++++++++++++++
utils/g15daemon/DEPENDS | 4 +++
utils/g15daemon/DETAILS | 29 +++++++++++++++++++++++
utils/g15daemon/init.d/g15daemon | 47 ++++++++++++++++++++++++++++++++++++++
4 files changed, 110 insertions(+), 0 deletions(-)
diff --git a/utils/g15daemon/BUILD b/utils/g15daemon/BUILD
new file mode 100644
index 0000000..460ac20
--- /dev/null
+++ b/utils/g15daemon/BUILD
@@ -0,0 +1,30 @@
+(
+ PYMAJ=$(installed_version Python | cut -d. -f1-2) &&
+
+ patch_it $SOURCE6 2 &&
+
+ cd $SOURCE_DIRECTORY/lang-bindings &&
+ tar xf perl-G15Daemon-0.2.tar.gz &&
+ tar xf pyg15daemon-0.0.tar.bz2 &&
+ cd $SOURCE_DIRECTORY/lang-bindings/G15Daemon-0.2 &&
+ perl -f Makefile.PL &&
+ make &&
+ cd $SOURCE_DIRECTORY &&
+ default_build &&
+
+ [ -f /etc/config.d/g15daemon ] || install -m 644 $SOURCE_CACHE/$SOURCE3 /etc/config.d/g15daemon &&
+ [ -f /etc/g15daemon.conf ] || install -m 644 $SOURCE_CACHE/$SOURCE4 /etc/g15daemon.conf &&
+
+ install -m 644 $SOURCE_CACHE/$SOURCE2 /lib/udev/rules.d/ &&
+ install -m 755 $SOURCE_CACHE/$SOURCE5 /usr/bin/g15daemon-hotplug &&
+
+ # Install perl and python bindings
+ cd $SOURCE_DIRECTORY/lang-bindings/G15Daemon-0.2 &&
+ make install &&
+ mkdir -p /usr/lib/python${PYMAJ}/site-packages/ &&
+ install -m644 $SOURCE_DIRECTORY/lang-bindings/pyg15daemon/g15daemon.py /usr/lib/python${PYMAJ}/site-packages/ &&
+
+ # Byte compile the python module
+ python -O -c 'import g15daemon'
+
+) > $C_FIFO 2>&1
diff --git a/utils/g15daemon/DEPENDS b/utils/g15daemon/DEPENDS
new file mode 100644
index 0000000..baec1d8
--- /dev/null
+++ b/utils/g15daemon/DEPENDS
@@ -0,0 +1,4 @@
+depends libg15render
+depends Inline
+depends GDGraph
+depends Python
diff --git a/utils/g15daemon/DETAILS b/utils/g15daemon/DETAILS
new file mode 100644
index 0000000..30b256a
--- /dev/null
+++ b/utils/g15daemon/DETAILS
@@ -0,0 +1,29 @@
+ MODULE=g15daemon
+ VERSION=1.9.5.3
+ SOURCE=${MODULE}-${VERSION}.tar.bz2
+ SOURCE2=60-g15daemon.rules
+ SOURCE3=$MODULE-config.d-0.1
+ SOURCE4=$MODULE-config-0.1
+ SOURCE5=$MODULE-hotplug-0.1
+ SOURCE6=$MODULE-1.9.5.3-open_mode.patch
+ SOURCE_URL=$SFORGE_URL/$MODULE/G15Daemon%201.9x
+ SOURCE2_URL=$PATCH_URL
+ SOURCE3_URL=$PATCH_URL
+ SOURCE4_URL=$PATCH_URL
+ SOURCE5_URL=$PATCH_URL
+ SOURCE6_URL=$PATCH_URL
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+ SOURCE_VFY=sha1:24efd2b3eb33c32e82ff08003fb5489da5a944f7
+ SOURCE2_VFY=sha1:3b7561f3a9b7d1e1f006065c878c50b495d44559
+ SOURCE3_VFY=sha1:3f19b760bb577a005bfe6ace35f453d5bf192041
+ SOURCE4_VFY=sha1:569ac9cbd5ae488915db3c14dec9c4a7716d2dd5
+ SOURCE5_VFY=sha1:95328c23078de185c3e7063780f04d693c918f1a
+ SOURCE6_VFY=sha1:81c9d08dec32d87bb26836668a6984e0182e24ce
+ WEB_SITE="http://www.g15tools.com/"
+ ENTERED=20100321
+ UPDATED=20100321
+ SHORT="G15daemon takes control of the G15 keyboard, through the linux kernel uinput device driver"
+cat <<EOF
+G15daemon takes control of the G15 keyboard, through the linux kernel
+uinput device driver.
+EOF
diff --git a/utils/g15daemon/init.d/g15daemon b/utils/g15daemon/init.d/g15daemon
new file mode 100755
index 0000000..3c3d5e6
--- /dev/null
+++ b/utils/g15daemon/init.d/g15daemon
@@ -0,0 +1,47 @@
+#!/bin/bash
+#
+# g15daemon Start/Stop the Logitech G15 daemon.
+#
+# chkconfig: 2345 99 12
+# description: Logitech G15 keyboard daemon
+# processname: g15daemon
+# pidfile: /var/run/g15daemon.pid
+
+# config settings
+[ -f /etc/config.d/g15daemon ] && . /etc/config.d/g15daemon
+
+
+start() {
+ local G15ARG
+ if [[ -e /proc/modules && ! -e /dev/input/uinput ]] ; then
+ modprobe uinput
+ fi
+ G15ARG=""
+ if [ "$CLIENT_SWITCH_L1" == "yes" ]; then
+ G15ARG="-s"
+ fi
+ echo -n "Starting g15daemon: "
+ /usr/sbin/g15daemon $G15ARG &&
+ echo -e $RESULT_OK || echo -e $RESULT_FAIL
+}
+
+stop() {
+ local G15ARG
+ G15ARG="-k"
+ if [ "$BACKLIGHT_OFF" == "yes" ]; then
+ G15ARG="-K"
+ fi
+ echo -n "Stopping g15daemon: "
+ /usr/sbin/g15daemon $G15ARG > /dev/null &&
+ echo -e $RESULT_OK || echo -e $RESULT_FAIL
+
+ # Give the system time to unload in case someone call start|stop to quickly
+ sleep 2
+}
+
+restart() {
+ $0 stop
+ $0 start
+}
+
+. /lib/lsb/init-functions
More information about the Lunar-commits
mailing list