File interception-tools.spec of Package interception-tools

#
# spec file for package interception-tools
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           interception-tools
Version:        0.6.8
Release:        0
Summary:        A minimal composable infrastructure on top of libudev and libevdev
License:        GPL-3.0-or-later
URL:            https://gitlab.com/interception/linux/tools
Source0:        tools-%{version}.tar.gz
Source1:        udevmon.service
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libevdev-devel
BuildRequires:  systemd-devel
BuildRequires:  systemd-rpm-macros
BuildRequires:  yaml-cpp-devel

%description
The Interception Tools is a small set of utilities for operating on input
events of evdev devices.

%prep
%setup -q -n tools-%{version}

%build
%cmake
%cmake_build

%install
%cmake_install
install -Dm644 %{SOURCE1} %{buildroot}%{_unitdir}/udevmon.service

%preun
%systemd_preun udevmon.service

%postun
%systemd_postun_with_restart udevmon.service

%files
%license LICENSE.md
%doc README.md
%{_bindir}/*
%{_unitdir}/udevmon.service

%changelog
openSUSE Build Service is sponsored by