Use gcc to link libldap_r to libldap
This commit is contained in:
parent
cf3a5b608f
commit
3664d0fd7b
@ -7,7 +7,7 @@
|
||||
|
||||
Name: openldap
|
||||
Version: 2.4.56
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: LDAP support libraries
|
||||
License: OpenLDAP
|
||||
URL: http://www.openldap.org/
|
||||
@ -283,11 +283,26 @@ for lib in liblber libldap libldap_r libslapi; do
|
||||
ln -s ${lib}-${version}.so.%{so_ver} ${lib}.so
|
||||
done
|
||||
|
||||
# provide only libldap_r and symlink libldap to it
|
||||
# provide only libldap_r and copy it to libldap, make a versioned lib link
|
||||
rm -f libldap.so
|
||||
ln -s libldap{_r,}.so
|
||||
ln -s libldap_r.so "%{buildroot}%{_libdir}/libldap.so"
|
||||
rm -f libldap-*.so.*
|
||||
ln -s libldap{_r,}-${version}.so.%{so_ver}
|
||||
for lib in $(ls | grep libldap_r-); do
|
||||
IFS='.'
|
||||
read -r -a libsplit <<< "$lib"
|
||||
if [ -z "${libsplit[4]}" ]
|
||||
then
|
||||
so_ver_short="${libsplit[3]}"
|
||||
unset IFS
|
||||
gcc -shared -o "%{buildroot}%{_libdir}/libldap-${version}.so.${so_ver_short}" -Wl,--no-as-needed \
|
||||
-Wl,-soname -Wl,libldap-${version}.so.${so_ver_short} -L "%{buildroot}%{_libdir}" -lldap_r
|
||||
else
|
||||
so_ver_full="${libsplit[3]}.${libsplit[4]}.${libsplit[5]}"
|
||||
unset IFS
|
||||
fi
|
||||
done
|
||||
ln -s libldap-${version}.so.{${so_ver_short},${so_ver_full}}
|
||||
|
||||
popd
|
||||
|
||||
# tweak permissions on the libraries to make sure they're correct
|
||||
@ -505,8 +520,11 @@ exit 0
|
||||
%{_libdir}/libldap-2.4*.so.*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 26 2020 Simon Pichugin <spichugi@redhat.com> - 2.4.56-4
|
||||
- Use gcc to link libldap_r to libldap (#1537260)
|
||||
|
||||
* Fri Nov 20 2020 Simon Pichugin <spichugi@redhat.com> - 2.4.56-3
|
||||
- Fix 32-bit libraries build
|
||||
- Fix 32-bit libraries build (#1537260)
|
||||
|
||||
* Fri Nov 20 2020 Simon Pichugin <spichugi@redhat.com> - 2.4.56-2
|
||||
- Drop non-threaded libldap (#1537260)
|
||||
|
Loading…
Reference in New Issue
Block a user