From 6d865ed960b954e2eaf5f5a01c033012ba6825ba Mon Sep 17 00:00:00 2001 From: Reidar Cederqvist Date: Fri, 1 Dec 2017 11:08:36 +0100 Subject: [PATCH] OWSD build system compatible with openWRT build system --- owsd/Config.in | 17 +++++++++++++++++ owsd/Makefile | 22 ++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 owsd/Config.in diff --git a/owsd/Config.in b/owsd/Config.in new file mode 100644 index 000000000..8ee214ff8 --- /dev/null +++ b/owsd/Config.in @@ -0,0 +1,17 @@ +choice + prompt "Select Bus" + default OWSD_USE_UBUS + depends on PACKAGE_owsd + help + Select which bus to compile owsd for + +config OWSD_USE_DBUS + bool "Use DBUS" + +config OWSD_USE_UBUS + bool "Use UBUS" + +config OWSD_USE_DBUS_UBUS + bool "Use UBUS and DBUS" + +endchoice diff --git a/owsd/Makefile b/owsd/Makefile index 72cbc5b93..95f0bae26 100644 --- a/owsd/Makefile +++ b/owsd/Makefile @@ -13,12 +13,21 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO=git PKG_SOURCE_URL:=http://public.inteno.se/owsd.git -PKG_SOURCE_VERSION:=ab4558b85aa6172cc8c8ac483dcfca3ec5cb2318 +PKG_SOURCE_VERSION:=92fd4b78994c87dac2bd2debf909a9bb3b19f4d6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION} PKG_MAINTAINER:=Sartura Support for Inteno PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS + +USE_UBUS-y:=-DWSD_HAVE_UBUS=ON +USE_DBUS-y:=-DWSD_HAVE_DBUS=ON +USE_BOTH-y:=${USE_UBUS-y} ${USE_DBUS-y} + +CMAKE_OPTIONS:=${USE_UBUS-${CONFIG_OWSD_USE_UBUS}} \ + ${USE_DBUS-${CONFIG_OWSD_USE_DBUS}} \ + ${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}} include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -26,8 +35,17 @@ include $(INCLUDE_DIR)/cmake.mk define Package/owsd SECTION:=net CATEGORY:=Network - DEPENDS:=+ubus +ubox +libjson-c +libblobmsg-json +rpcd +libwebsockets +libdbus +libxml2 +dbus + DEPENDS:=+libjson-c +libblobmsg-json +libwebsockets +ubox \ + +(OWSD_USE_UBUS||OWSD_USE_DBUS_UBUS):ubus \ + +(OWSD_USE_DBUS||OWSD_USE_DBUS_UBUS):libdbus \ + +(OWSD_USE_DBUS||OWSD_USE_DBUS_UBUS):libxml2 \ + +(OWSD_USE_DBUS||OWSD_USE_DBUS_UBUS):dbus TITLE:=owsd daemon + MENU:=1 +endef + +define Package/owsd/config + source "$(SOURCE)/Config.in" endef define Package/owsd/install