diff --git a/openldap.spec b/openldap.spec index 49d14b7..ded3292 100644 --- a/openldap.spec +++ b/openldap.spec @@ -7,7 +7,7 @@ Name: openldap Version: 2.4.56 -Release: 2%{?dist} +Release: 4%{?dist} Summary: LDAP support libraries License: OpenLDAP URL: http://www.openldap.org/ @@ -69,7 +69,11 @@ customized LDAP clients. Summary: Package providing legacy non-threded libldap Requires: openldap%{?_isa} = %{version}-%{release} # since libldap is manually linked from libldap_r, the provides is not generated automatically +%ifarch armv7hl i686 +Provides: libldap-2.4.so.%{so_ver} +%else Provides: libldap-2.4.so.%{so_ver}()(%{__isa_bits}bit) +%endif %description compat The openldap-compat package contains non-threaded variant of libldap @@ -279,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 @@ -501,7 +520,13 @@ exit 0 %{_libdir}/libldap-2.4*.so.* %changelog -* Wed Nov 18 2020 Simon Pichugin - 2.4.56-2 +* Thu Nov 26 2020 Simon Pichugin - 2.4.56-4 +- Use gcc to link libldap_r to libldap (#1537260) + +* Fri Nov 20 2020 Simon Pichugin - 2.4.56-3 +- Fix 32-bit libraries build (#1537260) + +* Fri Nov 20 2020 Simon Pichugin - 2.4.56-2 - Drop non-threaded libldap (#1537260) * Wed Nov 18 2020 Simon Pichugin - 2.4.56-1