Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 2013 11:57:45 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r313344 - in head/sysutils: . keyboard-daemon keyboard-daemon/files
Message-ID:  <201303031157.r23Bvj0s017049@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: crees
Date: Sun Mar  3 11:57:44 2013
New Revision: 313344
URL: http://svnweb.freebsd.org/changeset/ports/313344

Log:
  The author has not found any simple programs that listen on a device and
  run commands based on the values received.
  
  keyboard-daemon binds to a device (for example, a remote control) and
  listens for button presses.  These are then mapped to programs that are
  executed.
  
  WWW: http://www.bayofrum.net/cgi-bin/fossil/keyboard-daemon/

Added:
  head/sysutils/keyboard-daemon/
  head/sysutils/keyboard-daemon/Makefile   (contents, props changed)
  head/sysutils/keyboard-daemon/distinfo   (contents, props changed)
  head/sysutils/keyboard-daemon/files/
  head/sysutils/keyboard-daemon/files/keyboard_daemon.in   (contents, props changed)
  head/sysutils/keyboard-daemon/pkg-descr   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Sun Mar  3 11:51:05 2013	(r313343)
+++ head/sysutils/Makefile	Sun Mar  3 11:57:44 2013	(r313344)
@@ -429,6 +429,7 @@
     SUBDIR += kdf
     SUBDIR += kdirstat
     SUBDIR += keep
+    SUBDIR += keyboard-daemon
     SUBDIR += kfloppy
     SUBDIR += kgrubeditor
     SUBDIR += kgtk

Added: head/sysutils/keyboard-daemon/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/keyboard-daemon/Makefile	Sun Mar  3 11:57:44 2013	(r313344)
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+PORTNAME=	keyboard-daemon
+PORTVERSION=	0.5
+CATEGORIES=	sysutils
+MASTER_SITES=	http://www.bayofrum.net/dist/${PORTNAME}/
+
+MAINTAINER=	crees@FreeBSD.org
+COMMENT=	Listens on a keyboard device and executes commands on keypresses
+
+BUILD_DEPENDS=	${LOCALBASE}/lib/libcfu.a:${PORTSDIR}/devel/libcfu
+
+USE_BZIP2=	yes
+
+USE_RC_SUBR=	${PORTNAME:S/-/_/}
+PLIST_FILES=	bin/${PORTNAME}
+PORTEXAMPLES=	*
+MAN1=		${PORTNAME}.1
+MANCOMPRESSED=	yes
+
+.include <bsd.port.options.mk>
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
+	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1.gz ${MAN1PREFIX}/man/man1/
+.if ${PORT_OPTIONS:MEXAMPLES}
+	${MKDIR} ${EXAMPLESDIR}
+	for f in ${WRKSRC}/examples/*; do	\
+	    ${INSTALL_DATA} $$f ${EXAMPLESDIR};	\
+	done
+.endif
+
+.include <bsd.port.mk>

Added: head/sysutils/keyboard-daemon/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/keyboard-daemon/distinfo	Sun Mar  3 11:57:44 2013	(r313344)
@@ -0,0 +1,2 @@
+SHA256 (keyboard-daemon-0.5.tar.bz2) = 28f97ba20105953d6564b203704ffdf1f905b74567580309c3eee6cf9d7ab63b
+SIZE (keyboard-daemon-0.5.tar.bz2) = 4280

Added: head/sysutils/keyboard-daemon/files/keyboard_daemon.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/keyboard-daemon/files/keyboard_daemon.in	Sun Mar  3 11:57:44 2013	(r313344)
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: keyboard_daemon
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable this service:
+#
+# keyboard_daemon_enable:	Set to no by default; set to yes to enable it.
+# keyboard_daemon_device:	Set to the name of your keyboard device, such
+#				as /dev/ukbd0
+#				CARE-- this will disconnect your keyboard from
+#				the kbdmux, do not use on your only keyboard!
+#
+# Optional:
+#
+# keyboard_daemon_conf:		Defaults to %%PREFIX%%/etc/keyboard-daemon.conf
+
+. /etc/rc.subr
+
+name=keyboard_daemon
+rcvar=keyboard_daemon_enable
+
+load_rc_config keyboard_daemon
+
+: ${keyboard_daemon_enable:=no}
+
+pidfile=/var/run/keyboard-daemon.pid
+required_files=${keyboard_daemon_conf}
+command=%%PREFIX%%/bin/keyboard-daemon
+command_args="-d -p $pidfile ${keyboard_daemon_conf+-f keyboard_daemon_conf} /dev/ukbd0"
+
+start_precmd=keyboard_daemon_prestart
+stop_postcmd="kbdcontrol -a ${keyboard_daemon_device} < /dev/console"
+
+keyboard_daemon_prestart()
+{
+	: ${keyboard_daemon_device:?keyboard_daemon_device must be set in rc.conf}
+	kbdcontrol -A ${keyboard_daemon_device} < /dev/console
+}
+
+run_rc_command $1

Added: head/sysutils/keyboard-daemon/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/keyboard-daemon/pkg-descr	Sun Mar  3 11:57:44 2013	(r313344)
@@ -0,0 +1,8 @@
+The author has not found any simple programs that listen on a device and
+run commands based on the values received.
+
+keyboard-daemon binds to a device (for example, a remote control) and
+listens for button presses.  These are then mapped to programs that are
+executed.
+
+WWW: http://www.bayofrum.net/cgi-bin/fossil/keyboard-daemon/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303031157.r23Bvj0s017049>