summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-08-06 16:09:07 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-08-06 17:28:21 (EDT)
commit00491fdcc66e716d29e8091813c449935e2fcdf4 (patch)
tree8d8484d76d5b92137b0b366b96bb19a67c0212fd /build
parent4dadcda71517ac646f4f70192ac69d4f7f6bb88d (diff)
Manage library file with update-alternatives
Diffstat (limited to 'build')
-rwxr-xr-xbuild29
1 files changed, 14 insertions, 15 deletions
diff --git a/build b/build
index 5024d50..7b9d931 100755
--- a/build
+++ b/build
@@ -17,18 +17,14 @@ common_opts = \
--disable-aescbc \
--disable-md5 \
--enable-maxstrength
-build_client_opts = $(common_opts) \
+build_std_opts = $(common_opts) \
--disable-errorstrings
-build_full_opts = $(common_opts) \
- --disable-errorstrings
-build_dbg_opts = $(common_opts) \
+build_dbg_opts = $(common_opts) \
--enable-debug
common_cflags = \
-DNO_SESSION_CACHE
-build_client_cflags = $(common_cflags) \
- -DNO_WOLFSSL_SERVER
-build_full_cflags = $(common_cflags)
-build_dbg_cflags = $(common_cflags)
+build_std_cflags = $(common_cflags)
+build_dbg_cflags = $(common_cflags)
arch = $(OPK_HOST_ARCH)
@@ -48,14 +44,14 @@ fix:
touch src/aclocal.m4 src/configure src/Makefile.in src/config.in
touch $@
-build_client build_full build_dbg: fix
+build_std build_dbg: fix
oh-autoconfigure -B $(builddir) -- $($@_opts) CFLAGS='$($@_cflags)'
oh-autobuild -B $(builddir)
touch $@
-build: build_client build_full build_dbg
+build: build_std build_dbg
-install_client install_full install_dbg: build
+install_std install_dbg: build
oh-autoinstall -B $(builddir) -d $(destdir)
rm -Rf \
$(destdir)/usr/lib/$(arch)/libwolfssl.la \
@@ -63,11 +59,14 @@ install_client install_full install_dbg: build
$(destdir)/usr/share/doc/wolfssl/README.txt \
$(destdir)/usr/share/doc/wolfssl/taoCert.txt
oh-fixperms -d $(destdir)
+ set -e; \
+ lib="$$(ls $(destdir)/usr/lib/$(arch)/libwolfssl.so.$(abi_ver).*)"; \
+ mv "$${lib}" "$${lib}.$(variant)"
set -e; if [ x"$(variant)" != x'dbg' ]; then \
oh-strip -d $(destdir); \
OPK_PACKAGES="\
- libwolfssl.$(abi_ver)-$(variant) \
- libwolfssl.$(abi_ver)-$(variant)-dev \
+ libwolfssl.$(abi_ver) \
+ libwolfssl.$(abi_ver)-dev \
" oh-installfiles -d $(destdir); \
else \
rm -Rf \
@@ -76,9 +75,9 @@ install_client install_full install_dbg: build
$(destdir)/usr/lib/$(arch)/pkgconfig/wolfssl.pc \
$(destdir)/usr/bin/wolfssl-config; \
OPK_PACKAGES="\
- libwolfssl.$(abi_ver)-$(variant) \
+ libwolfssl.$(abi_ver)-dbg \
" oh-installfiles -d $(destdir); \
fi
-install: install_client install_full install_dbg
+install: install_std install_dbg
oh-shlibdeps