diff --git a/SPECS/ledmon.spec b/SPECS/ledmon.spec index 3666a23..4792b75 100644 --- a/SPECS/ledmon.spec +++ b/SPECS/ledmon.spec @@ -1,7 +1,7 @@ Summary: Enclosure LED Utilities Name: ledmon Version: 0.96 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/System URL: https://github.com/intel/ledmon @@ -13,6 +13,8 @@ BuildRequires: pciutils-devel BuildRequires: autoconf, automake # Needed for the udev dependency. BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros + Obsoletes: ledctl = 0.1-1 Provides: ledctl = %{version}-%{release} Requires: sg3_utils-libs @@ -37,6 +39,15 @@ make %install make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUILD_ROOT/%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir} +%post +%systemd_post ledmon.service + +%preun +%systemd_preun ledmon.service + +%postun +%systemd_postun_with_restart ledmon.service + %files %doc README.md COPYING %{_sbindir}/ledctl @@ -45,6 +56,9 @@ make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUI %{_unitdir}/ledmon.service %changelog +* Mon Jun 27 2022 Jan Macku - 0.96-2 +- Use systemd-rpm-macros to handle ledmon.service (#2073331) + * Wed Jun 01 2022 Jan Macku - 0.96-1 - update to 0.96 (#2041713)