Deal with rpaths using the method from Packaging Guidelines

No need to rerun autotools and BuildRequire them.

Though now we need to set LD_LIBRARY_PATH for "make check", because
even the test binaries now do not have rpath and would not find
libhwloc.so.* without it.
This commit is contained in:
Michal Schmidt 2017-11-02 16:22:32 +01:00
parent ea420550d1
commit f02aa0b711

View File

@ -19,7 +19,6 @@ BuildRequires: libXNVCtrl-devel
BuildRequires: ncurses-devel
BuildRequires: transfig doxygen w3m
BuildRequires: texlive-latex texlive-makeindex
BuildRequires: autoconf automake libtool
BuildRequires: desktop-file-utils
%ifnarch s390 s390x %{arm}
BuildRequires: numactl-devel
@ -81,9 +80,10 @@ Requires: %{name}-plugins%{?_isa} = %{version}-%{release}
%autosetup -p1
%build
# Remove rpaths
autoreconf --force --install
%configure --enable-plugins --disable-silent-rules
# Remove rpaths
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
@ -108,7 +108,7 @@ ln %{buildroot}%{_mandir}/man1/lstopo-no-graphics.1 %{buildroot}%{_mandir}/man1/
rm %{buildroot}%{_datadir}/%{name}/hwloc-dump-hwdata.service
%check
make check
LD_LIBRARY_PATH=$PWD/src/.libs make check
%post libs -p /sbin/ldconfig