diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-08-06 17:44:04 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-08-06 17:44:04 (EDT) |
commit | fab24d25f3dd4f1aa24dbe1ac02def2d4c10e816 (patch) | |
tree | 45cd8100fc688216b279a0319cd4e86174e1c830 | |
parent | 00491fdcc66e716d29e8091813c449935e2fcdf4 (diff) |
Manage SONAME link with update-alternatives
-rwxr-xr-x | build | 5 | ||||
-rw-r--r-- | changelog | 2 | ||||
-rw-r--r-- | libwolfssl.24-dbg.pkg/postinst | 8 | ||||
-rw-r--r-- | libwolfssl.24-dbg.pkg/prerm | 6 | ||||
-rw-r--r-- | libwolfssl.24.pkg/postinst | 8 | ||||
-rw-r--r-- | libwolfssl.24.pkg/prerm | 6 |
6 files changed, 25 insertions, 10 deletions
@@ -61,7 +61,10 @@ install_std install_dbg: build oh-fixperms -d $(destdir) set -e; \ lib="$$(ls $(destdir)/usr/lib/$(arch)/libwolfssl.so.$(abi_ver).*)"; \ - mv "$${lib}" "$${lib}.$(variant)" + mv "$${lib}" "$${lib}.$(variant)"; \ + rm -f $(destdir)/usr/lib/$(arch)/libwolfssl.so.$(abi_ver); \ + ln -sf "$${lib##*/}.$(variant)" \ + $(destdir)/usr/lib/$(arch)/libwolfssl.so.$(abi_ver).$(variant) set -e; if [ x"$(variant)" != x'dbg' ]; then \ oh-strip -d $(destdir); \ OPK_PACKAGES="\ @@ -10,7 +10,7 @@ wolfssl.24 (4.4.0-2) trunk libwolfssl.24-common. - Make libwolfssl.24-dbg depend on libwolfssl.24, instead of conflicting with, replacing, and providing it. - - Manage library file (provided by both libwolfssl.24 and + - Manage library file and SONAME link (provided by both libwolfssl.24 and libwolfssl.24-dbg) with update-alternatives. * libwolfssl.24-dbg: Include debugging symbols, as well as debugging messages which can be enabled by applications using diff --git a/libwolfssl.24-dbg.pkg/postinst b/libwolfssl.24-dbg.pkg/postinst index 9344a9f..7638dde 100644 --- a/libwolfssl.24-dbg.pkg/postinst +++ b/libwolfssl.24-dbg.pkg/postinst @@ -1,8 +1,12 @@ #!/bin/sh soname='libwolfssl.so.24' -lib="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +libfile="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +liblink="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24" if [ x"${1}" = x'configure' ]; then - update-alternatives --install "${lib}" "${soname}" "${lib}.dbg" 20 + update-alternatives --install "${libfile}" "${soname}" \ + "${libfile}.dbg" 20 + update-alternatives --install "${liblink}" "${soname}" \ + "${liblink}.dbg" 20 fi diff --git a/libwolfssl.24-dbg.pkg/prerm b/libwolfssl.24-dbg.pkg/prerm index 8f8fc95..7d26d18 100644 --- a/libwolfssl.24-dbg.pkg/prerm +++ b/libwolfssl.24-dbg.pkg/prerm @@ -1,8 +1,10 @@ #!/bin/sh soname='libwolfssl.so.24' -lib="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +libfile="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +liblink="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24" if [ x"${1}" = x'remove' ]; then - update-alternatives --remove "${soname}" "${lib}.dbg" + update-alternatives --remove "${soname}" "${libfile}.dbg" + update-alternatives --remove "${soname}" "${liblink}.dbg" fi diff --git a/libwolfssl.24.pkg/postinst b/libwolfssl.24.pkg/postinst index c0f8f53..ab80e84 100644 --- a/libwolfssl.24.pkg/postinst +++ b/libwolfssl.24.pkg/postinst @@ -1,8 +1,12 @@ #!/bin/sh soname='libwolfssl.so.24' -lib="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +libfile="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +liblink="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24" if [ x"${1}" = x'configure' ]; then - update-alternatives --install "${lib}" "${soname}" "${lib}.std" 10 + update-alternatives --install "${libfile}" "${soname}" \ + "${libfile}.std" 10 + update-alternatives --install "${liblink}" "${soname}" \ + "${liblink}.std" 10 fi diff --git a/libwolfssl.24.pkg/prerm b/libwolfssl.24.pkg/prerm index db50e77..a028b4c 100644 --- a/libwolfssl.24.pkg/prerm +++ b/libwolfssl.24.pkg/prerm @@ -1,8 +1,10 @@ #!/bin/sh soname='libwolfssl.so.24' -lib="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +libfile="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24.1.0" +liblink="/usr/lib/$(cat /etc/proteanos_arch)/libwolfssl.so.24" if [ x"${1}" = x'remove' ]; then - update-alternatives --remove "${soname}" "${lib}.std" + update-alternatives --remove "${soname}" "${libfile}.std" + update-alternatives --remove "${soname}" "${liblink}.std" fi |