1################################################################################ 2# 3# domoticz 4# 5################################################################################ 6 7DOMOTICZ_VERSION = 2021.1 8DOMOTICZ_SITE = https://github.com/domoticz/domoticz 9DOMOTICZ_SITE_METHOD = git 10DOMOTICZ_GIT_SUBMODULES = YES 11DOMOTICZ_LICENSE = GPL-3.0 12DOMOTICZ_LICENSE_FILES = License.txt 13DOMOTICZ_CPE_ID_VENDOR = domoticz 14DOMOTICZ_DEPENDENCIES = \ 15 boost \ 16 cereal \ 17 fmt \ 18 host-pkgconf \ 19 jsoncpp \ 20 libcurl \ 21 lua \ 22 mosquitto \ 23 openssl \ 24 sqlite \ 25 zlib 26 27# Disable precompiled header as it needs cmake >= 3.16 28DOMOTICZ_CONF_OPTS = -DUSE_PRECOMPILED_HEADER=OFF 29 30# Due to the dependency on mosquitto, domoticz depends on 31# !BR2_STATIC_LIBS so set USE_STATIC_BOOST and USE_OPENSSL_STATIC to OFF 32DOMOTICZ_CONF_OPTS += \ 33 -DUSE_STATIC_BOOST=OFF \ 34 -DUSE_OPENSSL_STATIC=OFF 35 36# Do not use any built-in libraries which are enabled by default for 37# jsoncpp, fmt, sqlite and mqtt 38DOMOTICZ_CONF_OPTS += \ 39 -DUSE_BUILTIN_JSONCPP=OFF \ 40 -DUSE_BUILTIN_LIBFMT=OFF \ 41 -DUSE_BUILTIN_SQLITE=OFF \ 42 -DUSE_BUILTIN_MQTT=OFF 43 44ifeq ($(BR2_PACKAGE_LIBUSB),y) 45DOMOTICZ_DEPENDENCIES += libusb 46DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=ON 47else 48DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=OFF 49endif 50 51ifeq ($(BR2_PACKAGE_OPENZWAVE),y) 52DOMOTICZ_DEPENDENCIES += openzwave 53 54# Due to the dependency on mosquitto, domoticz depends on 55# !BR2_STATIC_LIBS so set USE_STATIC_OPENZWAVE to OFF otherwise 56# domoticz will not find the openzwave library as it searches by 57# default a static library. 58DOMOTICZ_CONF_OPTS += -DUSE_STATIC_OPENZWAVE=OFF 59endif 60 61ifeq ($(BR2_PACKAGE_PYTHON3),y) 62DOMOTICZ_DEPENDENCIES += python3 63DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=ON 64else 65DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=OFF 66endif 67 68# Install domoticz in a dedicated directory (/opt/domoticz) as 69# domoticz expects by default that all its subdirectories (www, 70# Config, scripts, ...) are in the binary directory. 71DOMOTICZ_TARGET_DIR = /opt/domoticz 72DOMOTICZ_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=$(DOMOTICZ_TARGET_DIR) 73 74# Delete License.txt and updatedomo files installed by domoticz in target 75# directory 76# Do not delete History.txt as it is used in source code 77define DOMOTICZ_REMOVE_UNNEEDED_FILES 78 $(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/License.txt 79 $(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/updatedomo 80endef 81 82DOMOTICZ_POST_INSTALL_TARGET_HOOKS += DOMOTICZ_REMOVE_UNNEEDED_FILES 83 84# Use dedicated init scripts for systemV and systemd instead of using 85# domoticz.sh as it is not compatible with buildroot init system 86define DOMOTICZ_INSTALL_INIT_SYSV 87 $(INSTALL) -D -m 0755 package/domoticz/S99domoticz \ 88 $(TARGET_DIR)/etc/init.d/S99domoticz 89endef 90 91define DOMOTICZ_INSTALL_INIT_SYSTEMD 92 $(INSTALL) -D -m 644 package/domoticz/domoticz.service \ 93 $(TARGET_DIR)/usr/lib/systemd/system/domoticz.service 94endef 95 96$(eval $(cmake-package)) 97