$(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>
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
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))