[source] libubox: add host build

LEDE Commits lede-commits at lists.infradead.org
Sat Apr 8 05:49:46 PDT 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/293c54c5677cb7db21a53df7fae0a1fd2f663b04

commit 293c54c5677cb7db21a53df7fae0a1fd2f663b04
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Fri Feb 17 10:49:14 2017 +0100

    libubox: add host build
    
    Our opkg fork requires libubox to build, so add a host build for it.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/libs/libubox/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index 71c53ae..8eeb935 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -18,6 +18,7 @@ PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_BUILD_DEPENDS:=lua
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libubox
@@ -90,8 +91,21 @@ define Package/libubox-lua/install
 	$(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
 endef
 
+
+CMAKE_HOST_OPTIONS += \
+	-DBUILD_LUA=OFF \
+	-DBUILD_EXAMPLES=OFF \
+
+define Host/Install
+	$(INSTALL_DIR) $(STAGING_DIR_HOST)/include/libubox
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/*.h $(STAGING_DIR_HOST)/include/libubox/
+	$(INSTALL_DIR) $(STAGING_DIR_HOST)/lib
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/libubox.{a,so} $(STAGING_DIR_HOST)/lib/
+endef
+
 $(eval $(call BuildPackage,libubox))
 $(eval $(call BuildPackage,libblobmsg-json))
 $(eval $(call BuildPackage,jshn))
 $(eval $(call BuildPackage,libjson-script))
 $(eval $(call BuildPackage,libubox-lua))
+$(eval $(call HostBuild))



More information about the lede-commits mailing list