commit 7c24090ca386762060ed26b8579991ad60fdf3c0351fe3a3cfc9ac7c6ecbd64d Author: OBS User mrdocs Date: Wed Sep 17 21:19:13 2014 +0000 Accepting request 248171 from home:scarabeus_iv New package, will fwd to Factory. OBS-URL: https://build.opensuse.org/request/show/248171 OBS-URL: https://build.opensuse.org/package/show/utilities/actkbd?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/actkbd-0.2.7-amd64.patch b/actkbd-0.2.7-amd64.patch new file mode 100644 index 0000000..9ce9891 --- /dev/null +++ b/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/actkbd-0.2.8.tar.bz2 b/actkbd-0.2.8.tar.bz2 new file mode 100644 index 0000000..d0ac514 --- /dev/null +++ b/actkbd-0.2.8.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95ea643b8e1b6bd8b9bc342d4a01eb4639498e15329aa42329f7cc83cb3cebc6 +size 23192 diff --git a/actkbd.changes b/actkbd.changes new file mode 100644 index 0000000..a306664 --- /dev/null +++ b/actkbd.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Aug 12 08:29:01 UTC 2014 - tchvatal@suse.com + +- Nice and simple daemon to convert key events into action. + diff --git a/actkbd.conf b/actkbd.conf new file mode 100644 index 0000000..490e569 --- /dev/null +++ b/actkbd.conf @@ -0,0 +1,2 @@ +# actkbd.conf: +# * consult actkbd.conf in samples documentation on how to create the settings diff --git a/actkbd.service b/actkbd.service new file mode 100644 index 0000000..a8211b8 --- /dev/null +++ b/actkbd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Actkbd: Daemon for X-independent shortcuts +Wants=setkeycodes.service +Requires=setkeycodes.service + +[Service] +EnvironmentFile=-/etc/sysconfig/actkbd +ExecStart=/usr/bin/actkbd -q -x -l -d ${ACTKBD_DEVICE} -c ${ACTKBD_CONFIG} + +[Install] +WantedBy=multi-user.target diff --git a/actkbd.spec b/actkbd.spec new file mode 100644 index 0000000..3547433 --- /dev/null +++ b/actkbd.spec @@ -0,0 +1,84 @@ +# +# spec file for package actkbd +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: actkbd +Version: 0.2.8 +Release: 0 +Summary: A keyboard shortcut daemon +License: GPL-2.0+ +Group: System/Console +Url: http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/ +Source0: http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/actkbd-%{version}.tar.bz2 +Source1: actkbd.service +Source2: actkbd.conf +Source3: actkbd.sysconfig +Patch0: actkbd-0.2.7-amd64.patch +BuildRequires: systemd +Requires(pre): %fillup_prereq +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%{?systemd_requires} + +%description +actkbd is a daemon that reacts to user defined keys and launches specific +commands. It can be used to utilize multimedia keys on simple setups, or +assigned custom actions to rarely used keys. + +%prep +%setup -q +%patch0 -p1 + +%build +make CFLAGS="%{optflags}" %{?_smp_mflags} + +%install +install -Dm 644 %{SOURCE1} %{buildroot}%{_unitdir}/actkbd.service +mkdir -p %{buildroot}%{_sbindir}/ +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcactkbd + +install -Dm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/actkbd.conf +install -Dm 644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.actkbd + +install -Dm 755 actkbd %{buildroot}%{_sbindir}/actkbd + +install -d %{buildroot}%{_docdir}/%{name}/samples +install -dm 644 samples %{buildroot}%{_docdir}/%{name}/samples + +%pre +%service_add_pre actkbd.service + +%post +%fillup_only -n actkbd +%service_add_post actkbd.service + +%preun +%service_del_preun actkbd.service + +%postun +%service_del_postun actkbd.service + +%files +%defattr(-,root,root) +%doc README NEWS FAQ AUTHORS +%config %{_sysconfdir}/actkbd.conf +%{_localstatedir}/adm/fillup-templates/* +%{_sbindir}/actkbd +%{_unitdir}/actkbd.service +%{_sbindir}/rcactkbd +%{_docdir}/%{name}/samples + +%changelog diff --git a/actkbd.sysconfig b/actkbd.sysconfig new file mode 100644 index 0000000..c402a6c --- /dev/null +++ b/actkbd.sysconfig @@ -0,0 +1,14 @@ +## Type: string +## Default: "/etc/actkbd.conf" +# Path to actkbd configuration file +ACTKBD_CONFIG="/etc/actkbd.conf" + +## Type: string +## Default: "" +# Device we are wanting to listen on keypresses. +# Usually we want just one device to control this (remote/...) +# Check your /dev/input/event* +# For testing purposes and to detect key-press values use: +# # actkbd -s -d /dev/input/event +# This variable must be populated for the daemon to work. +ACTKBD_DEVICE=""