From 92e341d632c094a9905b6135a79a02982232e911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Thu, 29 Jul 2021 21:49:18 +0200 Subject: ubus: backport SOVERSION support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a support for setting of new `ABIVERSION` CMake define which allows to control the SOVERSION used for the built shared library. This is needed for downstream packaging to properly track breaking ABI changes when updating to newer versions of the library. Signed-off-by: Felix Fietkau Signed-off-by: Petr Štetiar (backported from commit 8edb1797d55d259c6eda18c89784f152328436fc) --- package/system/ubus/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index d3fe452252..5e3bbd120d 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -8,6 +8,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git PKG_SOURCE_DATE:=2019-12-27 PKG_SOURCE_VERSION:=041c9d1c052bb4936fd03240f7d0dd64aedda972 PKG_MIRROR_HASH:=7febbe78dd178d8d7ccacff54c00fb2d19a53624005920db8cd85236f54f8324 +PKG_ABI_VERSION:=20191227 CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 @@ -36,7 +37,7 @@ define Package/libubus SECTION:=libs CATEGORY:=Libraries DEPENDS:=+libubox - ABI_VERSION:=20191227 + ABI_VERSION:=$(PKG_ABI_VERSION) TITLE:=OpenWrt RPC client library endef @@ -51,7 +52,8 @@ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -flto TARGET_LDFLAGS += -flto CMAKE_OPTIONS = \ - -DLUAPATH=/usr/lib/lua + -DLUAPATH=/usr/lib/lua \ + -DABIVERSION="$(PKG_ABI_VERSION)" define Package/ubus/install $(INSTALL_DIR) $(1)/bin @@ -65,7 +67,7 @@ endef define Package/libubus/install $(INSTALL_DIR) $(1)/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libubus.so.* $(1)/lib/ endef define Package/libubus-lua/install -- cgit v1.2.3