Work around removed rpath from libtool and the test suite not working without it.

TODO: analyze what is wrong here, I don't have time for it now
This commit is contained in:
Jan Safranek 2010-10-26 15:44:58 +02:00
parent 71158214b0
commit fa24569666
1 changed files with 4 additions and 0 deletions

View File

@ -202,6 +202,8 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
--with-sys-contact="root@localhost" <<EOF
EOF
# store original libtool file, we will need it later
cp libtool libtool.orig
# remove rpath from libtool
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
@ -299,6 +301,8 @@ install -m 644 agent/mibgroup/util_funcs/*.h $RPM_BUILD_ROOT/usr/include/net-sn
%check
%if %{netsnmp_check}
# restore libtool, for unknown reason it does not work with the one without rpath
cp -f libtool.orig libtool
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}/%{_libdir} make test
%endif