File inputplumber.spec of Package inputplumber

#
# spec file for package inputplumber
#
# Copyright (c) 2025 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:           inputplumber
Version:        0.62.2
Release:        0%{?dist}
Summary:        Input router and remapper daemon for Linux
License:        GPL-3.0
URL:            https://github.com/ShadowBlip/InputPlumber
Source0:        InputPlumber-%{version}.tar.xz
Source1:        vendor.tar.zst
BuildRequires:  rust
BuildRequires:	cargo
BuildRequires:  cargo-packaging
BuildRequires:  libevdev-devel
BuildRequires:  pkgconfig(libiio)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  llvm-devel
BuildRequires:  clang-devel
BuildRequires:  pkgconfig(systemd)
Provides:       InputPlumber

%description
InputPlumber is a input routing and control daemon for Linux.
It can be used to combine any number of input devices (like gamepads,
mice, and keyboards) and translate their input to a variety of
virtual device formats.

%prep
%autosetup -p1 -a1 -n InputPlumber-%{version}

%build
make build

%install
make install PREFIX=%{buildroot}%{_prefix}

%pre
%systemd_pre inputplumber-suspend.service inputplumber.service

%post
%systemd_post inputplumber-suspend.service inputplumber.service

%preun
%systemd_preun inputplumber-suspend.service inputplumber.service

%postun
%systemd_postun inputplumber-suspend.service inputplumber.service

%files
%{_bindir}/inputplumber
%{_datadir}/inputplumber
%{_datadir}/inputplumber/devices
%{_datadir}/inputplumber/capability_maps
%{_datadir}/inputplumber/profiles
%{_datadir}/inputplumber/schema
%{_datadir}/dbus-1/system.d/org.shadowblip.InputPlumber.conf
%{_prefix}/lib/udev/hwdb.d
%{_prefix}/lib/udev/hwdb.d/59-inputplumber.hwdb
%{_prefix}/lib/udev/rules.d/90-inputplumber-autostart.rules
%{_prefix}/lib/systemd/system/inputplumber.service
%{_prefix}/lib/systemd/system/inputplumber-suspend.service

%changelog
openSUSE Build Service is sponsored by