diff --git a/ledmon.spec b/ledmon.spec index 65c9506..b72e322 100644 --- a/ledmon.spec +++ b/ledmon.spec @@ -1,7 +1,7 @@ Summary: Enclosure LED Utilities Name: ledmon Version: 0.96 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://github.com/intel/ledmon Source0: https://github.com/intel/ledmon/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -14,6 +14,8 @@ BuildRequires: autoconf automake BuildRequires: gcc make # 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 @@ -39,6 +41,15 @@ make %install %make_install 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