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
|
Summary: Enclosure LED Utilities
|
||||||
Name: ledmon
|
Name: ledmon
|
||||||
Version: 0.96
|
Version: 0.96
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/intel/ledmon
|
URL: https://github.com/intel/ledmon
|
||||||
Source0: https://github.com/intel/ledmon/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
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
|
BuildRequires: gcc make
|
||||||
# Needed for the udev dependency.
|
# Needed for the udev dependency.
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
|
||||||
Obsoletes: ledctl = 0.1-1
|
Obsoletes: ledctl = 0.1-1
|
||||||
Provides: ledctl = %{version}-%{release}
|
Provides: ledctl = %{version}-%{release}
|
||||||
Requires: sg3_utils-libs
|
Requires: sg3_utils-libs
|
||||||
@ -39,6 +41,15 @@ make
|
|||||||
%install
|
%install
|
||||||
%make_install SBIN_DIR=$RPM_BUILD_ROOT/%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir}
|
%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
|
%files
|
||||||
%doc README.md COPYING
|
%doc README.md COPYING
|
||||||
%{_sbindir}/ledctl
|
%{_sbindir}/ledctl
|
||||||
|
Loading…
Reference in New Issue
Block a user