From 8a5a2d7b372624965cb0a84a627c7013fc073735 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 29 Apr 2019 21:27:38 -0400 Subject: build: Update version handling (x.y -> x.y.z) --- (limited to 'build') 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 -- cgit v0.9.1