* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
92 lines
2.7 KiB
Makefile
92 lines
2.7 KiB
Makefile
################################################################################
|
|
#
|
|
# domoticz
|
|
#
|
|
################################################################################
|
|
|
|
DOMOTICZ_VERSION = 2020.1
|
|
DOMOTICZ_SITE = $(call github,domoticz,domoticz,$(DOMOTICZ_VERSION))
|
|
DOMOTICZ_LICENSE = GPL-3.0
|
|
DOMOTICZ_LICENSE_FILES = License.txt
|
|
DOMOTICZ_DEPENDENCIES = \
|
|
boost \
|
|
host-pkgconf \
|
|
jsoncpp \
|
|
libcurl \
|
|
lua \
|
|
mosquitto \
|
|
openssl \
|
|
sqlite \
|
|
zlib
|
|
|
|
# Disable precompiled header as it needs cmake >= 3.16
|
|
DOMOTICZ_CONF_OPTS = -DUSE_PRECOMPILED_HEADER=OFF
|
|
|
|
# Due to the dependency on mosquitto, domoticz depends on
|
|
# !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
|
|
|
|
# Do not use any built-in libraries which are enabled by default for
|
|
# jsoncpp, lua, sqlite and mqtt
|
|
DOMOTICZ_CONF_OPTS += \
|
|
-DUSE_BUILTIN_JSONCPP=OFF \
|
|
-DUSE_BUILTIN_LUA=OFF \
|
|
-DUSE_BUILTIN_SQLITE=OFF \
|
|
-DUSE_BUILTIN_MQTT=OFF
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
|
DOMOTICZ_DEPENDENCIES += libusb
|
|
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=ON
|
|
else
|
|
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=OFF
|
|
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
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
DOMOTICZ_DEPENDENCIES += python3
|
|
DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=ON
|
|
else
|
|
DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=OFF
|
|
endif
|
|
|
|
# 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))
|