--- olpc-kbdshim-12.orig/debian/olpc-kbdshim.init +++ olpc-kbdshim-12/debian/olpc-kbdshim.init @@ -0,0 +1,73 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: olpc-kbdshim +# Required-Start: $syslog $remote_fs +# Required-Stop: $syslog $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: OLPC XO keyboard support daemon +### END INIT INFO + +set -e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/olpc-kbdshim +NAME=olpc-kbdshim +PIDFILE=/var/run/$NAME.pid +DESC="OLPC XO keyboard support daemon" + +test -x $DAEMON || exit 0 + +# make sure we're running on an XO +[ -f /ofw/model ] || exit 0 + +. /lib/lsb/init-functions + +modprobe uinput || true + +# allow the admin to set DAEMON_OPTS +if [ -f /etc/default/olpc-kbdshim ]; then + . /etc/default/olpc-kbdshim +fi + +do_start() +{ + start-stop-daemon --start --quiet --oknodo --background \ + --make-pidfile --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS +} + +do_stop() +{ + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \ + --name $NAME +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + log_end_msg $? + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + log_end_msg $? + ;; + + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + sleep 1 + do_start + log_end_msg $? + ;; + + *) + log_success_msg "Usage: $0 {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 --- olpc-kbdshim-12.orig/debian/compat +++ olpc-kbdshim-12/debian/compat @@ -0,0 +1 @@ +7 --- olpc-kbdshim-12.orig/debian/olpc-kbdshim-hal.docs +++ olpc-kbdshim-12/debian/olpc-kbdshim-hal.docs @@ -0,0 +1 @@ +README --- olpc-kbdshim-12.orig/debian/changelog +++ olpc-kbdshim-12/debian/changelog @@ -0,0 +1,15 @@ +olpc-kbdshim (12-2) unstable; urgency=low + + * Fix a buglet w/ kbdshim-hal not starting correctly. + * Bail out of the kbdshim init script early if not on an XO. + * Bump the standards-version. + * Fix some lintian errors. + + -- Andres Salomon Sat, 17 Apr 2010 23:09:49 +0000 + +olpc-kbdshim (12-1) unstable; urgency=low + + * Initial release. + + -- Andres Salomon Sat, 17 Apr 2010 00:39:17 +0000 + --- olpc-kbdshim-12.orig/debian/olpc-kbdshim-hal.install +++ olpc-kbdshim-12/debian/olpc-kbdshim-hal.install @@ -0,0 +1,2 @@ +olpc-kbdshim-hal /usr/lib/hal +20-olpc-kbdshim.fdi /usr/share/hal/fdi/policy/20thirdparty --- olpc-kbdshim-12.orig/debian/olpc-kbdshim-common.install +++ olpc-kbdshim-12/debian/olpc-kbdshim-common.install @@ -0,0 +1,3 @@ +olpc-rotate /usr/bin +olpc-brightness /usr/bin +olpc-volume /usr/bin --- olpc-kbdshim-12.orig/debian/olpc-kbdshim-hal.dirs +++ olpc-kbdshim-12/debian/olpc-kbdshim-hal.dirs @@ -0,0 +1,2 @@ +/usr/share/hal/fdi/policy/20thirdparty +/usr/lib/hal --- olpc-kbdshim-12.orig/debian/olpc-kbdshim-common.docs +++ olpc-kbdshim-12/debian/olpc-kbdshim-common.docs @@ -0,0 +1 @@ +README --- olpc-kbdshim-12.orig/debian/olpc-kbdshim.dirs +++ olpc-kbdshim-12/debian/olpc-kbdshim.dirs @@ -0,0 +1,2 @@ +/usr/bin +/usr/sbin --- olpc-kbdshim-12.orig/debian/olpc-kbdshim.install +++ olpc-kbdshim-12/debian/olpc-kbdshim.install @@ -0,0 +1 @@ +olpc-kbdshim /usr/sbin --- olpc-kbdshim-12.orig/debian/rules +++ olpc-kbdshim-12/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --- olpc-kbdshim-12.orig/debian/olpc-kbdshim-common.dirs +++ olpc-kbdshim-12/debian/olpc-kbdshim-common.dirs @@ -0,0 +1 @@ +/usr/bin --- olpc-kbdshim-12.orig/debian/olpc-kbdshim.docs +++ olpc-kbdshim-12/debian/olpc-kbdshim.docs @@ -0,0 +1 @@ +README --- olpc-kbdshim-12.orig/debian/copyright +++ olpc-kbdshim-12/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Andres Salomon on +Sat, 17 Apr 2010 00:02:54 +0000 + +It was downloaded from: . + +Upstream Authors: + Paul Fox + +Copyright (C) 2005 David Zeuthen, +Copyright (C) 2005 Ryan Lortie +Copyright (C) 2006 Matthew Garrett +Copyright (C) 2007 Codethink Ltd. +Copyright (C) 2009 Paul G Fox + +License: + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this package; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General Public License +can be found in `/usr/share/common-licenses/GPL'. --- olpc-kbdshim-12.orig/debian/control +++ olpc-kbdshim-12/debian/control @@ -0,0 +1,49 @@ +Source: olpc-kbdshim +Section: admin +Priority: optional +Maintainer: Andres Salomon +Build-Depends: debhelper (>> 7), libglib2.0-dev, libdbus-glib-1-dev, libhal-dev +Standards-Version: 3.8.4 + +Package: olpc-kbdshim-common +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: OLPC XO keyboard support daemon (common files) + The olpc-kbdshim daemon is used to handle keyboard events on the somewhat + unique OLPC XO hardware. It does this by monitoring the keyboard and + touchpad, enabling the XO "grab" keys and touchpad rotation (to match + screen rotation), and reporting user (in)activity. It can also bind the XO + screen rotate, brightness, and volume keys to appropriate commands (which are + provided). + . + This package provides the common files shared between hal and non-hal + version. + +Package: olpc-kbdshim +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, olpc-kbdshim-common +Conflicts: olpc-kbdshim-hal +Description: OLPC XO keyboard support daemon + The olpc-kbdshim daemon is used to handle keyboard events on the somewhat + unique OLPC XO hardware. It does this by monitoring the keyboard and + touchpad, enabling the XO "grab" keys and touchpad rotation (to match + screen rotation), and reporting user (in)activity. It can also bind the XO + screen rotate, brightness, and volume keys to appropriate commands (which are + provided). + . + This package provides the non-hal version, which runs as a standalone daemon. + +Package: olpc-kbdshim-hal +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, olpc-kbdshim-common, hal +Conflicts: olpc-kbdshim +Description: OLPC XO keyboard support daemon (hal version) + The olpc-kbdshim daemon is used to handle keyboard events on the somewhat + unique OLPC XO hardware. It does this by monitoring the keyboard and + touchpad, enabling the XO "grab" keys and touchpad rotation (to match + screen rotation), and reporting user (in)activity. It can also bind the XO + screen rotate, brightness, and volume keys to appropriate commands (which are + provided). + . + This package provides the hal version, which integrates with hal and contains + additional support for monitoring USB input devices. --- olpc-kbdshim-12.orig/debian/olpc-kbdshim.default +++ olpc-kbdshim-12/debian/olpc-kbdshim.default @@ -0,0 +1 @@ +DAEMON_OPTS="-f -l -r /usr/bin/olpc-rotate -V /usr/bin/olpc-volume -b /usr/bin/olpc-brightness -R /var/run/olpc-kbdshim_command"