%global commit d9553a91a18b064060ede88f9e4e69d0e24ecb5f %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: lact Version: 0.5.4 Release: 1%{?dist} Summary: Linux Advanced Configuration Tool License: GPL URL: https://github.com/ilya-zlobintsev/LACT Source0: https://github.com/ilya-zlobintsev/LACT/archive/%{commit}.tar.gz BuildRequires: rust BuildRequires: gtk4-devel BuildRequires: git BuildRequires: pkg-config BuildRequires: make BuildRequires: hwdata-devel BuildRequires: cargo BuildRequires: libdrm-devel BuildRequires: blueprint-compiler BuildRequires: systemd-rpm-macros %description LACT is a Linux Advanced Configuration Tool that allows for the configuration and monitoring of various system components. %prep %autosetup -n LACT-%{commit} cat << EOF >> %{_builddir}/92-lactd.preset enable lactd.service EOF %build %make_build build-release %install %make_install PREFIX=/usr mkdir -p %{buildroot}%{_presetdir}/ install -m 644 %{_builddir}/92-lactd.preset %{buildroot}%{_presetdir}/92-lactd.preset %post %systemd_post lactd.service %preun %systemd_preun lactd.service %postun %systemd_postun_with_restart lactd.service %files %{_bindir}/lact %{_unitdir}/lactd.service %{_datadir}/applications/io.github.lact-linux.desktop %{_datadir}/icons/hicolor/scalable/apps/io.github.lact-linux.svg %{_datadir}/pixmaps/io.github.lact-linux.png %{_presetdir}/92-lactd.preset %changelog