Fix link creation or RPM doesn't install it

This commit is contained in:
Andreas Schneider 2018-08-16 16:15:05 +02:00
parent ecde94ff04
commit 443155895a

View File

@ -1,6 +1,6 @@
Name: libssh
Version: 0.8.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A library implementing the SSH protocol
License: LGPLv2+
URL: http://www.libssh.org
@ -71,7 +71,12 @@ make DESTDIR=%{buildroot} install/fast -C obj
pushd %{buildroot}%{_libdir}
for i in libssh.so.4*;
do
ln -s "${i}" "${i%libssh*}libssh_threads${i##*libssh}"
_target="${i}"
_link_name="${i%libssh*}libssh_threads${i##*libssh}"
if [ -L "${i}" ]; then
_target="$(readlink ${i})"
fi
ln -s "${_target}" "${_link_name}"
done;
popd
@ -98,6 +103,9 @@ popd
%{_libdir}/libssh.so
%changelog
* Thu Aug 16 2018 Andreas Schneider <asn@redhat.com> - 0.8.1-4
- Fix link creation or RPM doesn't install it
* Wed Aug 15 2018 Andreas Schneider <asn@redhat.com> - 0.8.1-3
- Add missing so version for libssh_threads.so.4