spec: Use systemd-rpm-macros to handle ledmon.service
Resolves: #2101300
This commit is contained in:
parent
17c43be4d1
commit
269d0de785
13
ledmon.spec
13
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
|
||||
|
Loading…
Reference in New Issue
Block a user