File logiops.spec of Package logiops

#
# spec file for package logiops
#
# 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:           logiops
Summary:        Unofficial Userspace Driver for HID++ Logitech Devices
Version:        0.2.3.git18
Release:        0
URL:            https://github.com/PixlOne/logiops
Source:        	%{name}-%{version}.tar.gz
License:        GPL-3.0-or-later
Group:          Hardware/Other
BuildRequires:  cmake >= 3.10.0
BuildRequires:  pkgconfig
BuildRequires:	gcc-c++
BuildRequires:  systemd-rpm-macros
BuildRequires:  pkgconfig(libevdev)
BuildRequires:  pkgconfig(libconfig++)
BuildRequires:  pkgconfig(systemd)
BuildRequires:  pkgconfig(libudev)
%systemd_requires

Provides: logid

%description
This is an unofficial driver for Logitech mice and keyboard.
This is currently only compatible with HID++ >2.0 devices.

%prep
%setup -q

%build
%cmake
%cmake_build

%install
%cmake_install

# Copy the example config
mkdir -p %{buildroot}%{_docdir}/logiops
cp logid.example.cfg %{buildroot}%{_docdir}/logiops.example.cfg

%pre
%service_add_pre logid.service

%post
%service_add_post logid.service

%preun
%service_del_preun logid.service

%postun
%service_del_postun logid.service

%files
%license LICENSE
%doc README.md TESTED.md 
%{_bindir}/logid
%{_unitdir}/logid.service
%{_docdir}/logiops.example.cfg
openSUSE Build Service is sponsored by