summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-29 21:27:38 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-29 21:27:38 (EDT)
commit8a5a2d7b372624965cb0a84a627c7013fc073735 (patch)
treee22d4e2088e35ad22a9340f9171677087d9686c5
parent66d2fbb21c1fc21a88bcfbb1bdd2a60159476a72 (diff)
build: Update version handling (x.y -> x.y.z)
-rwxr-xr-xbuild21
1 files changed, 12 insertions, 9 deletions
diff --git a/build b/build
index 0740378..50fd39f 100755
--- a/build
+++ b/build
@@ -3,10 +3,10 @@
include ../source.mk
TCL_V = $$(sed -n 's/Tcl-Version: //p' ../substvars)
-V = $(OPK_SOURCE_VERSION_UPSTREAM)
-V_M = $$(printf '%s\n' '$(V)' | sed 's/\..*$$//')
-SONAME = libexpect.so.$(OPK_SOURCE_VERSION_UPSTREAM)
-
+VVV = $(OPK_SOURCE_VERSION_UPSTREAM)
+VV = $$(printf '%s\n' '$(VVV)' | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$$/\1/')
+V = $$(printf '%s\n' '$(VVV)' | sed 's/^\([0-9][0-9]*\).*$$/\1/')
+SONAME = libexpect.so.$(VV)
nop:
@:
@@ -23,20 +23,23 @@ configure:
build: configure
oh-autobuild -- \
- LDFLAGS_DEFAULT='-Wl,--export-dynamic -Wl,-soname=$(SONAME)'
+ LDFLAGS_DEFAULT="-Wl,--export-dynamic -Wl,-soname=$(SONAME)"
touch $@
install: build
oh-autoinstall
- mv dest/usr/lib/$(OPK_HOST_ARCH)/expect$(V)/libexpect$(V).so \
+ mv dest/usr/lib/$(OPK_HOST_ARCH)/expect$(VVV)/libexpect$(VVV).so \
+ dest/usr/lib/$(OPK_HOST_ARCH)/libexpect.so.$(VVV)
+ [ 'x$(VVV)' != 'x$(VV)' ] && \
+ ln -sf libexpect.so.$(VVV) \
+ dest/usr/lib/$(OPK_HOST_ARCH)/libexpect.so.$(VV)
+ ln -sf libexpect.so.$(VV) \
dest/usr/lib/$(OPK_HOST_ARCH)/libexpect.so.$(V)
ln -sf libexpect.so.$(V) \
- dest/usr/lib/$(OPK_HOST_ARCH)/libexpect.so.$(V_M)
- ln -sf libexpect.so.$(V_M) \
dest/usr/lib/$(OPK_HOST_ARCH)/libexpect.so
# Move pkgIndex.tcl.
mkdir -p dest/usr/share/tcltk
- mv dest/usr/lib/$(OPK_HOST_ARCH)/expect$(V) dest/usr/share/tcltk
+ mv dest/usr/lib/$(OPK_HOST_ARCH)/expect$(VVV) dest/usr/share/tcltk
mv dest/usr/bin/mkpasswd dest/usr/bin/mkpasswd.expect
oh-fixperms
oh-strip