Update buidlroot to version 2016.08.1
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
From f0da50118f7bd01ed7fa97e75b790a8232d8d4dc Mon Sep 17 00:00:00 2001
|
||||
From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
|
||||
Date: Thu, 25 Aug 2016 17:23:38 +0530
|
||||
Subject: [PATCH] add proper check for detecting header <execinfo.h>
|
||||
|
||||
domoticz.cpp currently assumes that on GNU/Linux systems header
|
||||
<execinfo.h> is available. But that is not true. Since it provided by
|
||||
C library and uClibc can be built without backtrace support. And in
|
||||
such cases we get following build error.
|
||||
|
||||
domoticz-3.4834/main/domoticz.cpp:48:22: fatal error: execinfo.h: No such file or directory
|
||||
#include <execinfo.h>
|
||||
^
|
||||
compilation terminated.
|
||||
|
||||
Instead of depending on __gnu_linux__, add check for detecting
|
||||
presence of <execinfo.h> and guard code for dumpstack accordingly.
|
||||
|
||||
This build failure is detected by Buildroot autobuilder.
|
||||
http://autobuild.buildroot.net/results/393/393f839e160b51ca12ac36058718ad2f0c1b50a6/
|
||||
|
||||
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
|
||||
---
|
||||
CMakeLists.txt | 7 +++++++
|
||||
main/domoticz.cpp | 2 +-
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: b/CMakeLists.txt
|
||||
===================================================================
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -61,6 +61,13 @@
|
||||
"Where to put the executables for Domoticz"
|
||||
)
|
||||
|
||||
+INCLUDE(CheckIncludeFiles)
|
||||
+CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
|
||||
+
|
||||
+IF(HAVE_EXECINFO_H)
|
||||
+ ADD_DEFINITIONS(-DHAVE_EXECINFO_H)
|
||||
+ENDIF(HAVE_EXECINFO_H)
|
||||
+
|
||||
#set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
|
||||
# Macro for setting up precompiled headers. Usage:
|
||||
Index: b/main/domoticz.cpp
|
||||
===================================================================
|
||||
--- a/main/domoticz.cpp
|
||||
+++ b/main/domoticz.cpp
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
-#ifdef __gnu_linux__
|
||||
+#ifdef HAVE_EXECINFO_H
|
||||
#include <execinfo.h>
|
||||
static void dumpstack(void) {
|
||||
// Notes :
|
||||
31
bsp/buildroot/package/domoticz/Config.in
Normal file
31
bsp/buildroot/package/domoticz/Config.in
Normal file
@@ -0,0 +1,31 @@
|
||||
config BR2_PACKAGE_DOMOTICZ
|
||||
bool "domoticz"
|
||||
depends on BR2_USE_MMU # mosquitto
|
||||
depends on !BR2_STATIC_LIBS # mosquitto
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_PACKAGE_LUA_5_2 || BR2_PACKAGE_LUA_5_3
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
select BR2_PACKAGE_BOOST_THREAD
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_MOSQUITTO
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_SQLITE
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Domoticz is a Home Automation System that lets you monitor
|
||||
and configure various devices like: Lights, Switches,
|
||||
various sensors/meters like Temperature, Rain, Wind, UV,
|
||||
Electra, Gas, Water and much more. Notifications/Alerts can
|
||||
be sent to any mobile device.
|
||||
|
||||
http://domoticz.com
|
||||
|
||||
comment "domoticz needs lua >= 5.2 and a toolchain w/ C++, threads, wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_USE_WCHAR || BR2_STATIC_LIBS || \
|
||||
!(BR2_PACKAGE_LUA_5_2 || BR2_PACKAGE_LUA_5_3)
|
||||
38
bsp/buildroot/package/domoticz/S99domoticz
Normal file
38
bsp/buildroot/package/domoticz/S99domoticz
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME=domoticz
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
DAEMON=/opt/domoticz/$NAME
|
||||
DAEMON_ARGS="-daemon -www 8080 -sslwww 443"
|
||||
|
||||
start() {
|
||||
printf "Starting $NAME: "
|
||||
start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping $NAME: "
|
||||
start-stop-daemon -K -q -p $PIDFILE
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
2
bsp/buildroot/package/domoticz/domoticz.hash
Normal file
2
bsp/buildroot/package/domoticz/domoticz.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 02b4cdde8e376258aeae3d5621edf8bb6b3563c34282e50194db343fcec9c0f5 domoticz-3.4834.tar.gz
|
||||
77
bsp/buildroot/package/domoticz/domoticz.mk
Normal file
77
bsp/buildroot/package/domoticz/domoticz.mk
Normal file
@@ -0,0 +1,77 @@
|
||||
################################################################################
|
||||
#
|
||||
# domoticz
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DOMOTICZ_VERSION = 3.4834
|
||||
DOMOTICZ_SITE = $(call github,domoticz,domoticz,$(DOMOTICZ_VERSION))
|
||||
DOMOTICZ_LICENSE = GPLv3
|
||||
DOMOTICZ_LICENSE_FILES = License.txt
|
||||
DOMOTICZ_DEPENDENCIES = \
|
||||
boost \
|
||||
host-pkgconf \
|
||||
libcurl \
|
||||
lua \
|
||||
mosquitto \
|
||||
openssl \
|
||||
sqlite \
|
||||
zlib
|
||||
|
||||
# Due to the dependency on mosquitto, domoticz depends on
|
||||
# !BR2_STATIC_LIBS so set USE_STATIC_BOOST to OFF
|
||||
DOMOTICZ_CONF_OPTS += -DUSE_STATIC_BOOST=OFF
|
||||
|
||||
# Do not use any built-in libraries which are enabled by default for
|
||||
# lua, sqlite and mqtt
|
||||
DOMOTICZ_CONF_OPTS += \
|
||||
-DUSE_BUILTIN_LUA=OFF \
|
||||
-DUSE_BUILTIN_SQLITE=OFF \
|
||||
-DUSE_BUILTIN_MQTT=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
||||
DOMOTICZ_DEPENDENCIES += libusb
|
||||
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
|
||||
|
||||
# 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
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/domoticz.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/domoticz.service
|
||||
endef
|
||||
|
||||
$(eval $(cmake-package))
|
||||
10
bsp/buildroot/package/domoticz/domoticz.service
Normal file
10
bsp/buildroot/package/domoticz/domoticz.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Domoticz Home Automation System
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/domoticz/domoticz -daemon -www 8080 -sslwww 443
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user