libubox: use build system variable to specify ABI version
authorFelix Fietkau <nbd@nbd.name>
Mon, 15 Feb 2021 17:07:51 +0000 (18:07 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 15 Feb 2021 17:47:19 +0000 (18:47 +0100)
This removes the need to patch it afterwards

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/libs/libubox/Makefile

index 19d91455097e70542bc31151c7139728728c69e9..4d582eacfd231e77504f51dc3feaa7bab088c8d7 100644 (file)
@@ -68,16 +68,17 @@ endef
 
 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
 CMAKE_OPTIONS = \
-       -DLUAPATH=/usr/lib/lua
+       -DLUAPATH=/usr/lib/lua \
+       -DABIVERSION="$(PKG_ABI_VERSION)"
 
 define Package/libubox/install
        $(INSTALL_DIR) $(1)/lib/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so.* $(1)/lib/
 endef
 
 define Package/libblobmsg-json/install
        $(INSTALL_DIR) $(1)/lib/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so.* $(1)/lib/
 endef
 
 define Package/jshn/install
@@ -88,7 +89,7 @@ endef
 
 define Package/libjson-script/install
        $(INSTALL_DIR) $(1)/lib/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so.* $(1)/lib/
 endef
 
 define Package/libubox-lua/install