python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / domoticz / domoticz.mk
blobf43dbda49ebfabeebe37c24983ff698fb05a30d1
1 ################################################################################
3 # domoticz
5 ################################################################################
7 DOMOTICZ_VERSION = 3.5877
8 DOMOTICZ_SITE = $(call github,domoticz,domoticz,$(DOMOTICZ_VERSION))
9 DOMOTICZ_LICENSE = GPLv3
10 DOMOTICZ_LICENSE_FILES = License.txt
11 DOMOTICZ_DEPENDENCIES = \
12 boost \
13 host-pkgconf \
14 libcurl \
15 lua \
16 mosquitto \
17 openssl \
18 sqlite \
19 zlib
21 # Due to the dependency on mosquitto, domoticz depends on
22 # !BR2_STATIC_LIBS so set USE_STATIC_BOOST to OFF
23 DOMOTICZ_CONF_OPTS += -DUSE_STATIC_BOOST=OFF
25 # Do not use any built-in libraries which are enabled by default for
26 # lua, sqlite and mqtt
27 DOMOTICZ_CONF_OPTS += \
28 -DUSE_BUILTIN_LUA=OFF \
29 -DUSE_BUILTIN_SQLITE=OFF \
30 -DUSE_BUILTIN_MQTT=OFF
32 ifeq ($(BR2_PACKAGE_LIBUSB),y)
33 DOMOTICZ_DEPENDENCIES += libusb
34 endif
36 ifeq ($(BR2_PACKAGE_OPENZWAVE),y)
37 DOMOTICZ_DEPENDENCIES += openzwave
39 # Due to the dependency on mosquitto, domoticz depends on
40 # !BR2_STATIC_LIBS so set USE_STATIC_OPENZWAVE to OFF otherwise
41 # domoticz will not find the openzwave library as it searches by
42 # default a static library.
43 DOMOTICZ_CONF_OPTS += -DUSE_STATIC_OPENZWAVE=OFF
44 endif
46 # Install domoticz in a dedicated directory (/opt/domoticz) as
47 # domoticz expects by default that all its subdirectories (www,
48 # Config, scripts, ...) are in the binary directory.
49 DOMOTICZ_TARGET_DIR = /opt/domoticz
50 DOMOTICZ_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=$(DOMOTICZ_TARGET_DIR)
52 # Delete License.txt and updatedomo files installed by domoticz in target
53 # directory
54 # Do not delete History.txt as it is used in source code
55 define DOMOTICZ_REMOVE_UNNEEDED_FILES
56 $(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/License.txt
57 $(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/updatedomo
58 endef
60 DOMOTICZ_POST_INSTALL_TARGET_HOOKS += DOMOTICZ_REMOVE_UNNEEDED_FILES
62 # Use dedicated init scripts for systemV and systemd instead of using
63 # domoticz.sh as it is not compatible with buildroot init system
64 define DOMOTICZ_INSTALL_INIT_SYSV
65 $(INSTALL) -D -m 0755 package/domoticz/S99domoticz \
66 $(TARGET_DIR)/etc/init.d/S99domoticz
67 endef
69 define DOMOTICZ_INSTALL_INIT_SYSTEMD
70 $(INSTALL) -D -m 644 package/domoticz/domoticz.service \
71 $(TARGET_DIR)/usr/lib/systemd/system/domoticz.service
72 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
73 ln -sf ../../../../usr/lib/systemd/system/domoticz.service \
74 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/domoticz.service
75 endef
77 $(eval $(cmake-package))