File libinput-gestures.spec of Package libinput-gestures

#
# spec file for package libinput-gestures
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#


Name:           libinput-gestures
Version:        2.52
Release:        0
Summary:        Actions gestures on your touchpad using libinput
License:        GPL-2.0
Group:          Development/Languages/C and C++
Url:            https://github.com/bulletmark/libinput-gestures
Source0:        %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  make
BuildRequires:  update-desktop-files
BuildRequires:  hicolor-icon-theme
Requires:	    libinput-tools
Requires:       python3
Requires:       xdotool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:	noarch

%description
Libinput-gestures is a utility which reads libinput gestures from your touchpad and maps
them to gestures you configure in a configuration file.
Each gesture can be configured to activate a shell command which is typically an xdotool
command to action desktop/window/application keyboard combinations and commands.

See the examples in the provided libinput-gestures.conf file.
My motivation for creating this is to use triple swipe up/down to switch GNOME workspaces,
and triple swipe left/right to go backwards/forwards in my browser, as per the default configuration.

This small and simple utility is only intended to be used temporarily until GNOME and other DE's action
libinput gestures natively. It parses the output of the libinput-list-devices and libinput-debug-events
utilities so is a little fragile to any version changes in their output format.

%prep
%autosetup -p1

%build

%install
%make_install DESTDIR=%{buildroot}
sed -i -e '1d;2i#!/usr/bin/python3' $RPM_BUILD_ROOT/%{_bindir}/libinput-gestures

%suse_update_desktop_file -u -r -G "Actions gestures on your touchpad using libinput" %{name} "GNOME;GTK;Accessibility"

%files
%doc README.md
%config %{_sysconfdir}/libinput-gestures.conf
%{_bindir}/*
%{_datadir}/icons/hicolor/128x128/apps/*
%{_datadir}/applications/*
%exclude %{_datadir}/doc/libinput-gestures/README.md

%changelog
openSUSE Build Service is sponsored by