Name: joystick-monitor Version: 0.0.3 Release: 2%{?dist} Summary: Monitors gamepads/joysticks used by applications and inhibits the screen saver during activity License: GPLv3+ URL: https://github.com/Unrud/%{name} Source0: https://github.com/Unrud/%{name}/archive/v%{version}.tar.gz BuildRequires: golang BuildRequires: git BuildRequires: systemd-rpm-macros Provides: %{name} = %{version} %description Monitors gamepads/joysticks used by applications and inhibits the screen saver during activity. Enable and start the service for the current user: systemctl --user enable --now joystick-monitor Enable service for all users: sudo systemctl --global enable joystick-monitor %global debug_package %{nil} %prep %autosetup sed -i '/^ExecStart=/c\ExecStart=%{_bindir}/%{name}' %{name}.service %build go build -v -o %{name} %install install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name} install -Dpm 0644 %{name}.service %{buildroot}%{_userunitdir}/%{name}.service %post %systemd_user_post %{name}.service %preun %systemd_user_preun %{name}.service %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_userunitdir}/%{name}.service %changelog * Sat Aug 26 01:00:00 CEST 2023 Unrud - 0.0.3-2 - Fix systemd unit * Sat Aug 26 00:00:00 CEST 2023 Unrud - 0.0.3-1 - First release