diff options
Diffstat (limited to 'app-misc/actkbd')
-rw-r--r-- | app-misc/actkbd/Manifest | 1 | ||||
-rw-r--r-- | app-misc/actkbd/actkbd-0.2.8-r1.ebuild | 49 | ||||
-rw-r--r-- | app-misc/actkbd/files/actkbd-0.2.7-amd64.patch | 38 | ||||
-rw-r--r-- | app-misc/actkbd/files/actkbd.confd | 13 | ||||
-rw-r--r-- | app-misc/actkbd/files/actkbd.initd | 32 | ||||
-rw-r--r-- | app-misc/actkbd/metadata.xml | 11 |
6 files changed, 144 insertions, 0 deletions
diff --git a/app-misc/actkbd/Manifest b/app-misc/actkbd/Manifest new file mode 100644 index 000000000000..c4cb100976d5 --- /dev/null +++ b/app-misc/actkbd/Manifest @@ -0,0 +1 @@ +DIST actkbd-0.2.8.tar.bz2 23192 SHA256 95ea643b8e1b6bd8b9bc342d4a01eb4639498e15329aa42329f7cc83cb3cebc6 SHA512 307d97b2854be801f1a4a8a8fbc408d3c83efd40f5bb35ea463b154fc0c9761fcb83a99905cd2730a24122ff222f60f31c4ac0163600ba463d4713846de2bf72 WHIRLPOOL cf1288351bb8ccc7306289cf7227483d5a7c13905cfa24af905c568ce135aa4cee7085141d8e4812aa09a045cd8448ae15973224b6bd9d5e7d8c5c568db750dd diff --git a/app-misc/actkbd/actkbd-0.2.8-r1.ebuild b/app-misc/actkbd/actkbd-0.2.8-r1.ebuild new file mode 100644 index 000000000000..e986555edf13 --- /dev/null +++ b/app-misc/actkbd/actkbd-0.2.8-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit linux-info eutils toolchain-funcs + +DESCRIPTION="A keyboard shortcut daemon" +HOMEPAGE="http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/" +SRC_URI="http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +CONFIG_CHECK="~INPUT_EVDEV" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.2.7-amd64.patch +} + +src_compile() { + emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" +} + +src_install() { + dobin actkbd + dodoc AUTHORS ChangeLog FAQ README TODO + docinto samples + dodoc samples/actkbd.conf + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN}.initd" ${PN} +} + +pkg_postinst() { + elog + elog "System-wide configuration file is /etc/actkbd.conf." + elog "Use actkbd.conf from usr/share/doc/${PF}/samples as a template." + elog "You need to create the config and set right input device from" + elog "/dev/input/event* in /etc/conf.d/actkbd" + elog + elog "To obtain keycodes for pressed combinations/keys just run:" + elog " # actkbd -s -d /dev/input/event<MYDEVICENUMBER>" +} diff --git a/app-misc/actkbd/files/actkbd-0.2.7-amd64.patch b/app-misc/actkbd/files/actkbd-0.2.7-amd64.patch new file mode 100644 index 000000000000..b962d7e861a7 --- /dev/null +++ b/app-misc/actkbd/files/actkbd-0.2.7-amd64.patch @@ -0,0 +1,38 @@ +# Try to fix pointer assigned to int and vice-versa problems. Written by Joe Pelkey. + +diff -ru actkbd-0.2.7.orig/actkbd.h actkbd-0.2.7/actkbd.h +--- actkbd-0.2.7.orig/actkbd.h 2006-05-02 13:24:01.000000000 -0400 ++++ actkbd-0.2.7/actkbd.h 2006-10-27 03:37:37.000000000 -0400 +@@ -122,7 +122,7 @@ + typedef struct _attr_t attr_t; + struct _attr_t { + int type; /* Attribute type */ +- void *opt; /* Options for this attribute */ ++ int opt; /* Options for this attribute */ + attr_t *next; /* The next node */ + }; + +diff -ru actkbd-0.2.7.orig/config.c actkbd-0.2.7/config.c +--- actkbd-0.2.7.orig/config.c 2006-08-20 07:05:36.000000000 -0400 ++++ actkbd-0.2.7/config.c 2006-10-27 03:55:21.000000000 -0400 +@@ -107,7 +107,7 @@ + strtolower(attrs); + while ((tmp = strsep(&attrs, ", \t")) != NULL) { + int type = -1; +- void *opt = NULL; ++ int opt = 0; + char *num = NULL; + + if (strlen(tmp) == 0) +@@ -174,9 +174,9 @@ + + errno = 0; + if (strlen(num) > 0) { +- opt = (void *)((int)strtol(num, (char **)NULL, 10)); ++ opt = ((int)strtol(num, (char **)NULL, 10)); + } else { +- opt = (void *)((int)(-1)); ++ opt = ((int)(-1)); + } + + if (((int)opt < 0) && diff --git a/app-misc/actkbd/files/actkbd.confd b/app-misc/actkbd/files/actkbd.confd new file mode 100644 index 000000000000..c3c711c1c887 --- /dev/null +++ b/app-misc/actkbd/files/actkbd.confd @@ -0,0 +1,13 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Configuration file +CONFIG="/etc/actkbd.conf" + +# Event provider providing the keypress events +EVENT_DEVICE="/dev/input/<DEVICE>" + +# PID +PIDFILE="/var/run/actkbd.pid" + diff --git a/app-misc/actkbd/files/actkbd.initd b/app-misc/actkbd/files/actkbd.initd new file mode 100644 index 000000000000..e0fc046a7ff6 --- /dev/null +++ b/app-misc/actkbd/files/actkbd.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +checkconfig() { + if [ ! -f ${CONFIG} ] ; then + eerror "Config file \"${CONFIG}\" does not exist. Create it prior launching the daemon." + return 1 + fi + if [ ! -c ${EVENT_DEVICE} ] ; then + eerror "Device \"${EVENT_DEVICE}\" is not valid pointer to input provider." + return 1 + fi +} + +depend() { + before acpid +} + +start() { + checkconfig || return 1 + ebegin "Starting actkbd" + start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec /usr/bin/actkbd -- -c "${CONFIG}" -D -q -x -l -p "${PIDFILE}" -d "${EVENT_DEVICE}" + eend $? +} + +stop() { + ebegin "Stopping actkbd" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} --exec /usr/bin/actkbd + eend $? +} diff --git a/app-misc/actkbd/metadata.xml b/app-misc/actkbd/metadata.xml new file mode 100644 index 000000000000..cbfedbb3611a --- /dev/null +++ b/app-misc/actkbd/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription> +actkbd is a simple daemon that binds actions to keyboard events. It recognises +key combinations and can handle press, repeat and release events. + </longdescription> +</pkgmetadata> |