summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/g15daemon/README11
-rw-r--r--misc/g15daemon/README.SLACKWARE16
-rw-r--r--misc/g15daemon/doinst.sh22
-rw-r--r--misc/g15daemon/g15daemon.SlackBuild97
-rw-r--r--misc/g15daemon/g15daemon.info10
-rw-r--r--misc/g15daemon/rc.g15daemon62
-rw-r--r--misc/g15daemon/slack-desc19
7 files changed, 237 insertions, 0 deletions
diff --git a/misc/g15daemon/README b/misc/g15daemon/README
new file mode 100644
index 0000000000..8603c2dd9b
--- /dev/null
+++ b/misc/g15daemon/README
@@ -0,0 +1,11 @@
+The G15daemon is a userspace driver/multiplexer for the keyboard and its LCD,
+using libg15 for low-level keyboard control. Some features of g15daemon are:
+1. Allows all extra G15 keys to be used in applications.
+2. It allows for multiple simultaneous LCD clients.
+3. Virtualises the LCD, the user can select which application is displayed with a simple keypress.
+4. Clients talk to the daemon via a simple protocol.
+5. Client applications have full control over LCD backlight and contrast.
+
+See README.SLACKWARE for additional setup information.
+
+This requires libg15 and libg15render.
diff --git a/misc/g15daemon/README.SLACKWARE b/misc/g15daemon/README.SLACKWARE
new file mode 100644
index 0000000000..1cf39a2e83
--- /dev/null
+++ b/misc/g15daemon/README.SLACKWARE
@@ -0,0 +1,16 @@
+README.SLACKWARE for g15daemon
+
+To start g15daemon at boot, make sure /etc/rc.d/rc.g15daemon has executable
+permissions (typically mode 0755) and add the following lines to your local
+system init script (/etc/rc.d/rc.local):
+
+ if [ -x /etc/rc.d/rc.g15daemon ]; then
+ /etc/rc.d/rc.g15daemon start
+ fi
+
+You will also need to add the following to /etc/rc.d/rc.local_shutdown:
+
+ if [ -x /etc/rc.d/rc.g15daemon ]; then
+ /etc/rc.d/rc.g15daemon stop
+ fi
+
diff --git a/misc/g15daemon/doinst.sh b/misc/g15daemon/doinst.sh
new file mode 100644
index 0000000000..ec1722b4b5
--- /dev/null
+++ b/misc/g15daemon/doinst.sh
@@ -0,0 +1,22 @@
+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.g15daemon.new:
+if [ -e etc/rc.d/rc.g15daemon ]; then
+ cp -a etc/rc.d/rc.g15daemon etc/rc.d/rc.g15daemon.new.incoming
+ cat etc/rc.d/rc.g15daemon.new > etc/rc.d/rc.g15daemon.new.incoming
+ mv etc/rc.d/rc.g15daemon.new.incoming etc/rc.d/rc.g15daemon.new
+fi
+
+config etc/rc.d/rc.g15daemon.new
+
diff --git a/misc/g15daemon/g15daemon.SlackBuild b/misc/g15daemon/g15daemon.SlackBuild
new file mode 100644
index 0000000000..8c244bc825
--- /dev/null
+++ b/misc/g15daemon/g15daemon.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Slackware build script for g15daemon
+
+# Copyright (c) 2009 Alan Alberghini <414N@slacky.it>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, 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.
+
+
+PRGNAM=g15daemon
+VERSION=${VERSION:-1.9.5.3}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --disable-static \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make install-strip docdir=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG
+
+# Install init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
+chmod 0755 $PKG/etc/rc.d/rc.$PRGNAM.new
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+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/misc/g15daemon/g15daemon.info b/misc/g15daemon/g15daemon.info
new file mode 100644
index 0000000000..bc586d559c
--- /dev/null
+++ b/misc/g15daemon/g15daemon.info
@@ -0,0 +1,10 @@
+PRGNAM="g15daemon"
+VERSION="1.9.5.3"
+HOMEPAGE="http://www.g15tools.com"
+DOWNLOAD="http://downloads.sourceforge.net/project/g15daemon/G15Daemon%201.9x/1.9.5.3/g15daemon-1.9.5.3.tar.bz2"
+MD5SUM="2cd8b4f1bd039bf804f1f472216742f0"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Alan Alberghini"
+EMAIL="414N@slacky.it"
+APPROVED="rworkman"
diff --git a/misc/g15daemon/rc.g15daemon b/misc/g15daemon/rc.g15daemon
new file mode 100644
index 0000000000..9bf247b831
--- /dev/null
+++ b/misc/g15daemon/rc.g15daemon
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# rc script to start/stop g15daemon.
+
+# Copyright 2009 Alan Alberghini <414N@slacky.it>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# 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.
+
+function start()
+{
+ echo -n "Starting g15daemon..."
+ /usr/sbin/g15daemon
+}
+
+function stop()
+{
+ echo -n "Stopping g15daemon..."
+ if [ $(pidof g15daemon) ]
+ then
+ /usr/sbin/g15daemon -k
+ return 0
+ else
+ echo "Failed! g15daemon not running!"
+ return 1
+ fi
+
+}
+
+function restart()
+{
+ stop
+ sleep 1
+ start
+}
+
+case $1 in
+start)
+ start;;
+stop)
+ stop;;
+restart)
+ restart;;
+*)
+ echo "Usage: $(basename $0) start | stop | restart"
+ exit 1;;
+esac
diff --git a/misc/g15daemon/slack-desc b/misc/g15daemon/slack-desc
new file mode 100644
index 0000000000..b1a26e3aa8
--- /dev/null
+++ b/misc/g15daemon/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 ':'.
+
+ |----handy-ruler--------------------------------------------------------|
+g15daemon: G15Daemon (G15 keyboard driver)
+g15daemon:
+g15daemon: The G15daemon is a userspace driver/multiplexer for the keyboard
+g15daemon: and its LCD, using libg15 for low-level keyboard control.
+g15daemon:
+g15daemon: http://www.g15tools.com
+g15daemon:
+g15daemon:
+g15daemon:
+g15daemon:
+g15daemon: