PKG_BUILD_DEPENDS:=lua
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libubox
$(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))