2016-05-19 13:35:10 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# domoticz
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-03-22 17:21:23 +01:00
|
|
|
DOMOTICZ_VERSION = 2020.1
|
2016-05-19 13:35:10 +02:00
|
|
|
DOMOTICZ_SITE = $(call github,domoticz,domoticz,$(DOMOTICZ_VERSION))
|
2017-03-30 15:43:33 +02:00
|
|
|
DOMOTICZ_LICENSE = GPL-3.0
|
2016-05-19 13:35:10 +02:00
|
|
|
DOMOTICZ_LICENSE_FILES = License.txt
|
2021-01-15 07:53:58 +01:00
|
|
|
DOMOTICZ_CPE_ID_VENDOR = domoticz
|
2016-06-30 08:37:40 +02:00
|
|
|
DOMOTICZ_DEPENDENCIES = \
|
|
|
|
boost \
|
|
|
|
host-pkgconf \
|
2020-03-22 17:21:23 +01:00
|
|
|
jsoncpp \
|
2016-06-30 08:37:40 +02:00
|
|
|
libcurl \
|
|
|
|
lua \
|
|
|
|
mosquitto \
|
|
|
|
openssl \
|
|
|
|
sqlite \
|
|
|
|
zlib
|
2016-05-19 13:35:10 +02:00
|
|
|
|
2020-03-23 18:42:21 +01:00
|
|
|
# Disable precompiled header as it needs cmake >= 3.16
|
|
|
|
DOMOTICZ_CONF_OPTS = -DUSE_PRECOMPILED_HEADER=OFF
|
|
|
|
|
2016-05-19 13:35:10 +02:00
|
|
|
# Due to the dependency on mosquitto, domoticz depends on
|
2018-08-30 18:38:26 +02:00
|
|
|
# !BR2_STATIC_LIBS so set USE_STATIC_BOOST and USE_OPENSSL_STATIC to OFF
|
|
|
|
DOMOTICZ_CONF_OPTS += \
|
|
|
|
-DUSE_STATIC_BOOST=OFF \
|
|
|
|
-DUSE_OPENSSL_STATIC=OFF
|
2016-05-19 13:35:10 +02:00
|
|
|
|
|
|
|
# Do not use any built-in libraries which are enabled by default for
|
2020-03-22 17:21:23 +01:00
|
|
|
# jsoncpp, lua, sqlite and mqtt
|
2016-05-19 13:35:10 +02:00
|
|
|
DOMOTICZ_CONF_OPTS += \
|
2020-03-22 17:21:23 +01:00
|
|
|
-DUSE_BUILTIN_JSONCPP=OFF \
|
2016-05-19 13:35:10 +02:00
|
|
|
-DUSE_BUILTIN_LUA=OFF \
|
|
|
|
-DUSE_BUILTIN_SQLITE=OFF \
|
2018-07-07 18:09:18 +02:00
|
|
|
-DUSE_BUILTIN_MQTT=OFF
|
2016-05-19 13:35:10 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
|
|
|
DOMOTICZ_DEPENDENCIES += libusb
|
2020-05-08 00:37:20 +02:00
|
|
|
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=ON
|
|
|
|
else
|
|
|
|
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=OFF
|
2016-05-19 13:35:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENZWAVE),y)
|
|
|
|
DOMOTICZ_DEPENDENCIES += openzwave
|
|
|
|
|
|
|
|
# Due to the dependency on mosquitto, domoticz depends on
|
|
|
|
# !BR2_STATIC_LIBS so set USE_STATIC_OPENZWAVE to OFF otherwise
|
|
|
|
# domoticz will not find the openzwave library as it searches by
|
|
|
|
# default a static library.
|
|
|
|
DOMOTICZ_CONF_OPTS += -DUSE_STATIC_OPENZWAVE=OFF
|
|
|
|
endif
|
|
|
|
|
2017-10-30 11:37:26 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
|
|
DOMOTICZ_DEPENDENCIES += python3
|
|
|
|
DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=ON
|
|
|
|
else
|
|
|
|
DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=OFF
|
|
|
|
endif
|
|
|
|
|
2016-05-19 13:35:10 +02:00
|
|
|
# Install domoticz in a dedicated directory (/opt/domoticz) as
|
|
|
|
# domoticz expects by default that all its subdirectories (www,
|
|
|
|
# Config, scripts, ...) are in the binary directory.
|
|
|
|
DOMOTICZ_TARGET_DIR = /opt/domoticz
|
|
|
|
DOMOTICZ_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=$(DOMOTICZ_TARGET_DIR)
|
|
|
|
|
|
|
|
# Delete License.txt and updatedomo files installed by domoticz in target
|
|
|
|
# directory
|
|
|
|
# Do not delete History.txt as it is used in source code
|
|
|
|
define DOMOTICZ_REMOVE_UNNEEDED_FILES
|
|
|
|
$(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/License.txt
|
|
|
|
$(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/updatedomo
|
|
|
|
endef
|
|
|
|
|
|
|
|
DOMOTICZ_POST_INSTALL_TARGET_HOOKS += DOMOTICZ_REMOVE_UNNEEDED_FILES
|
|
|
|
|
|
|
|
# Use dedicated init scripts for systemV and systemd instead of using
|
|
|
|
# domoticz.sh as it is not compatible with buildroot init system
|
|
|
|
define DOMOTICZ_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/domoticz/S99domoticz \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S99domoticz
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DOMOTICZ_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/domoticz/domoticz.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/domoticz.service
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(cmake-package))
|