From 6145bf3424d1f43a850b34c8706aae2bdd64c50a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 15 Feb 2018 17:17:26 +0100 Subject: [PATCH] Make sure spec can be build even when ldconfig_scriplets aren't defined. --- elfutils.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/elfutils.spec b/elfutils.spec index 013bbec..aa5ef60 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -212,8 +212,17 @@ install -Dm0644 config/10-default-yama-scope.conf ${RPM_BUILD_ROOT}%{_sysctldir} %check make -s %{?_smp_mflags} check || (cat tests/test-suite.log; false) +# Only the latest Fedora and EPEL have these scriptlets, +# older Fedora and plain RHEL don't. +%if 0%{?ldconfig_scriptlets:1} %ldconfig_scriptlets libs %ldconfig_scriptlets libelf +%else +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig +%post libelf -p /sbin/ldconfig +%postun libelf -p /sbin/ldconfig +%endif %if %{provide_yama_scope} %post default-yama-scope