File xnohands.spec of Package xnohands

# spec file for package xnohands
# Copyright (c) 2017 SUSE LINUX 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:           xnohands
Version:        0.1
Release:        0
Summary:        Disable XInput touch device when pen or eraser device reports proximity
License:        GPL-2.0+
Group:          System/X11/Utilities
# PATCH-FIX-UPSTREAM xnohands-makefile-destdir-support.patch -- Add destdir support to make install
Patch0:         xnohands-makefile-destdir-support.patch
# PATCH-FIX-UPSTREAM xnohands-cflags.patch -- Add CFLAGS and LDFLAGS support to make
Patch1:         xnohands-cflags.patch
BuildRequires:  libX11-devel
BuildRequires:  libXi-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Disable XInput touch device when pen or eraser device reports proximity,
to avoid palm events when writing on a tablet PC with pen + touch.

XNoHands is designed for Tablet PCs running Linux and equipped
with both touch and pen devices.  The devices must be logically separate,
and the pen device must report proximity events.  (This is the case e.g.
with Wacom-based tablet PCs). XNoHands runs in the background of a user
session and disables the touchscreen device whenever the pen device is in
proximity of the screen. This allows the user to rest their hand on the
screen while writing without causing havoc.

%setup -q -n %{name}
%patch0 -p1
%patch1 -p1

# There is only a Makefile, so adjust paths manually
sed -i "s|%{_prefix}/local/bin|%{_prefix}/bin|" Makefile
sed -i "s|%{_prefix}/local/bin|%{_prefix}/bin|" xnohands.desktop

export CFLAGS="%{optflags}"
make %{?_smp_mflags}

mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_sysconfdir}/xdg/autostart


openSUSE Build Service is sponsored by