aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-02-12 09:56:56 +0100
committerFelix Fietkau <nbd@nbd.name>2021-02-14 19:41:51 +0100
commitb12288fa69b171f7c9405518c9bed3581a06f7ce (patch)
treedb40d7bf49aa76eb0cb6be8c0cacb9e2cbebe79d /rules.mk
parent8597da20acce8533a538d436a536795a61b2e8e0 (diff)
downloadupstream-b12288fa69b171f7c9405518c9bed3581a06f7ce.tar.gz
upstream-b12288fa69b171f7c9405518c9bed3581a06f7ce.tar.bz2
upstream-b12288fa69b171f7c9405518c9bed3581a06f7ce.zip
build: add support for fixing up library soname
This makes it possible to declare a package ABI_VERSION independent from the upstream soname by setting PKG_ABI_VERSION in the package makefile. The library filename is fixed up for files installed to packages and to the staging dir. References to the original from executables within the same package are also fixed up Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index cbe1b0cb4c..c6bd7327c5 100644
--- a/rules.mk
+++ b/rules.mk
@@ -339,6 +339,10 @@ else
$(SCRIPT_DIR)/rstrip.sh
endif
+SET_ABI_VERSION= \
+ PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \
+ $(SCRIPT_DIR)/set-abi-version.sh
+
ifeq ($(CONFIG_IPV6),y)
DISABLE_IPV6:=
else
@@ -428,6 +432,8 @@ $(shell \
)
endef
+abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))
+
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))