libopen62541: preserve symlinks on install
authorJordan Ngako <redacted>
Thu, 25 Dec 2025 19:04:47 +0000 (20:04 +0100)
committerJosef Schlehofer <redacted>
Mon, 29 Dec 2025 22:15:25 +0000 (23:15 +0100)
$(INSTALL_BIN) follows symlinks, causing the .so to be copied multiple times.
Use $(CP) instead to preserve symlinks and cut package size by ~2/3.
OpenWrt libraries don’t need to be executable, so $(INSTALL_BIN) isn’t required.

Signed-off-by: Jordan Ngako <redacted>
libs/libopen62541/Makefile

index 0182e3a3960f26b1794ac6991c85060d8ff84b7a..e35434b5634c1104c320340b6a13daf14beba54c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libopen62541
 PKG_VERSION:=1.3.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/open62541/open62541.git
@@ -102,7 +102,7 @@ endif
 
 define Package/libopen62541/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libopen62541.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopen62541.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libopen62541))
git clone https://git.99rst.org/PROJECT