%define build_date %(date +"%Y%m%d") %global commit 859dbadcc5d9559ccf95a8139d686714c4a33837 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: interception-tools Version: 0 Release: 0.11.%{build_date}git%{shortcommit}%{?dist} Summary: A minimal composable infrastructure on top of libudev and libevdev License: GPLv3+ URL: https://gitlab.com/interception/linux/tools Source0: https://gitlab.com/interception/linux/tools/-/archive/%{commit}/tools-%{shortcommit}.tar.gz 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 %autosetup -n tools-%{commit} %build %cmake %cmake_build %install rm -rf $RPM_BUILD_ROOT %cmake_install install -Dm644 udevmon.service $RPM_BUILD_ROOT%{_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