File logkeys.spec of Package logkeys

# spec file for package logkeys
# Copyright (c) 2017 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

Name:           logkeys
Version:	0.2.0
Release:	0		
License:	GPL-3.0+ or WTFPL
Summary:	Simple Keylogger
Group:		Productivity/Security
Source:		%name-%version.tar.gz
Source1:	%{name}d.conf
Source2:	%name.service
Patch0:		missing-call-to-setgroups-before-setuid.patch
BuildRequires:	gcc-c++
BuildRequires:	automake
BuildRequires:	procps
BuildRequires:	kbd
BuildRequires: systemd-rpm-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

logkeys is a linux keylogger. It is no more advanced than other
available linux keyloggers, notably lkl and uberkey, but is a bit
newer, more up to date, it doesn't unreliably repeat keys and it
shouldn't crash your X. All in all, it just seems to work. It
relies on event interface of the Linux input subsystem.
Once completely set, it logs all common character and function keys,
while also being fully aware of Shift and AltGr key modifiers.

%setup -q

%_buildshell ./
# hack to disable /dev/input check
%__sed -i 's/\/dev\/input/\/dev\/null/' configure
# hack to pass osc tests
export CXXFLAGS="%optflags"
%__make %{?_smp_mflags}

%__install -Dm755 src/%name %buildroot%_bindir/%name

%__gzip -9 man/%name.8
%__install -Dm644 man/%name.8.gz %buildroot%_mandir/man8/%name.8.gz

%__install -Dm644 %{S:2} %buildroot%_unitdir/%name.service
%__install -Dm644 %{S:1} %buildroot%_sysconfdir/%{name}d

%__mkdir %buildroot%_sbindir
%__ln_s %_sbindir/service %buildroot%_sbindir/rc%name

cd keymaps
for filename in $(ls *.map); do
	%__install -Dm644 $filename %buildroot%_datadir/%name/${filename}

%doc ChangeLog TODO COPYING
%config(noreplace) %_sysconfdir/%{name}d
%dir %_datadir/%name

%service_add_pre %name.service

%service_add_post %name.service

%service_del_preun %name.service

%service_del_postun %name.service

* Thu Dec 26 2019 Simone Sclavi <> - 0.2.0
- 0.2.0 release

* Wed Oct 11 2017 Simone Sclavi <> - 0.1.1c
- Initial build