summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/psi-notify.spec4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/psi-notify.spec b/utils/psi-notify.spec
index d0a1e91..21821d9 100644
--- a/utils/psi-notify.spec
+++ b/utils/psi-notify.spec
@@ -10,7 +10,9 @@ Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libsystemd)
+%if 0%{?fedora}
BuildRequires: systemd-rpm-macros
+%endif
%description
psi-notify is a minimal unprivileged notifier for system-wide resource pressure
@@ -35,6 +37,7 @@ export CFLAGS="%{optflags}"
install -Dp psi-notify %{buildroot}%{_bindir}/psi-notify
install -Dp psi-notify.service %{buildroot}%{_unitdir}/psi-notify.service
+%if 0%{?fedora}
%post
%systemd_post psi-notify.service
@@ -43,6 +46,7 @@ install -Dp psi-notify.service %{buildroot}%{_unitdir}/psi-notify.service
%postun
%systemd_postun_with_restart psi-notify.service
+%endif
%files