diff --git a/domoticz-openzwave.patch b/domoticz-openzwave.patch index e819762..84cabdb 100644 --- a/domoticz-openzwave.patch +++ b/domoticz-openzwave.patch @@ -2,15 +2,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 42082192..f16726f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -598,7 +598,7 @@ endif() +@@ -682,7 +682,7 @@ endif() IF(OpenZWave) message(STATUS ${OpenZWave}) target_link_libraries(domoticz ${OpenZWave}) - include_directories(${CMAKE_SOURCE_DIR}/hardware/openzwave) + include_directories(${OPENZWAVE_INCLUDE_DIRS}) add_definitions(-DWITH_OPENZWAVE) - # open-zwave needs libudev - IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # open-zwave needs libudev if statically linked + IF(USE_STATIC_OPENZWAVE) diff --git a/hardware/openzwave/control_panel/ozwcp.cpp b/hardware/openzwave/control_panel/ozwcp.cpp index ffd8d742..79c708ce 100644 --- a/hardware/openzwave/control_panel/ozwcp.cpp @@ -19,11 +19,11 @@ index ffd8d742..79c708ce 100644 #include #include #include --#include "Options.h" --#include "Manager.h" --#include "Node.h" --#include "Group.h" --#include "Notification.h" +-#include "../Options.h" +-#include "../Manager.h" +-#include "../Node.h" +-#include "../Group.h" +-#include "../Notification.h" +#include +#include +#include diff --git a/domoticz-tinyxpath.patch b/domoticz-tinyxpath.patch index 6d4fe3f..bb24e7c 100644 --- a/domoticz-tinyxpath.patch +++ b/domoticz-tinyxpath.patch @@ -6,13 +6,13 @@ Subject: [PATCH] build: Detect and allow external tinyxpath library usage Signed-off-by: Michael Cronenworth --- CMakeLists.txt | 57 +++++++++++++++++++++--------- - hardware/AnnaThermostat.cpp | 3 +- - hardware/RAVEn.cpp | 3 +- - hardware/openzwave/control_panel/ozwcp.cpp | 3 +- - hardware/plugins/PluginManager.cpp | 3 +- - hardware/plugins/Plugins.cpp | 3 +- - main/LuaCommon.cpp | 7 +++- - main/LuaHandler.cpp | 3 +- + removed from Fedora patch hardware/AnnaThermostat.cpp | 3 +- + removed from Fedora patch hardware/RAVEn.cpp | 3 +- + removed from Fedora patch hardware/openzwave/control_panel/ozwcp.cpp | 3 +- + removed from Fedora patch hardware/plugins/PluginManager.cpp | 3 +- + removed from Fedora patch hardware/plugins/Plugins.cpp | 3 +- + removed from Fedora patch main/LuaCommon.cpp | 7 +++- + removed from Fedora patch main/LuaHandler.cpp | 3 +- removed from Fedora patch msbuild/domoticz.vcxproj | 6 ++-- 9 files changed, 62 insertions(+), 26 deletions(-) @@ -20,7 +20,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index bc231d8f6..334f203a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -451,22 +451,6 @@ webserver/proxyclient.cpp +@@ -512,22 +512,6 @@ json/json_reader.cpp json/json_value.cpp json/json_writer.cpp @@ -43,9 +43,9 @@ index bc231d8f6..334f203a6 100644 ) add_executable(domoticz ${domoticz_SRCS}) -@@ -538,6 +522,47 @@ else() - MESSAGE(STATUS "==== LibUSB not found, support for TE923/Voltcraft disabled!") - ENDIF(LIBUSB_FOUND) +@@ -658,6 +642,47 @@ + ENDIF(LIBUSB_FOUND) + endif(WITH_LIBUSB) +option(USE_BUILTIN_TINYXPATH "Use builtin tinyxpath library" YES) +IF(USE_BUILTIN_TINYXPATH) @@ -88,133 +88,27 @@ index bc231d8f6..334f203a6 100644 + ENDIF(TinyXML_FOUND) +ENDIF(USE_BUILTIN_TINYXPATH) + - # - # Find MD5/RMD160/SHA library - # -diff --git a/hardware/AnnaThermostat.cpp b/hardware/AnnaThermostat.cpp -index 9c8cf26ef..9c91513ba 100644 ---- a/hardware/AnnaThermostat.cpp -+++ b/hardware/AnnaThermostat.cpp -@@ -8,7 +8,8 @@ + ## support lua popen on Linux platforms + #IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + # SET(OperatingSystem "Linux") +--- a/hardware/OnkyoAVTCP.cpp 2018-06-23 09:18:06.000000000 -0500 ++++ b/hardware/OnkyoAVTCP.cpp 2018-07-08 14:21:06.884163094 -0500 +@@ -3,16 +3,16 @@ + #include "../main/Logger.h" + #include "../main/Helper.h" #include "../main/SQLHelper.h" - #include "../httpclient/HTTPClient.h" - #include "../main/mainworker.h" --#include "../tinyxpath/tinyxml.h" -+ -+#include - - #define round(a) ( int ) ( a + .5 ) - -diff --git a/hardware/RAVEn.cpp b/hardware/RAVEn.cpp -index 3ffe4f724..36f97bffb 100644 ---- a/hardware/RAVEn.cpp -+++ b/hardware/RAVEn.cpp -@@ -6,7 +6,8 @@ - #include "../main/RFXtrx.h" +-#include #include "../main/localtime_r.h" #include "../main/mainworker.h" --#include "../tinyxpath/tinyxml.h" -+ -+#include - - //Rainforest RAVEn USB ZigBee Smart Meter Adapter - //https://rainforestautomation.com/rfa-z106-raven/ -diff --git a/hardware/openzwave/control_panel/ozwcp.cpp b/hardware/openzwave/control_panel/ozwcp.cpp -index 9a948c976..8fd4f77f0 100644 ---- a/hardware/openzwave/control_panel/ozwcp.cpp -+++ b/hardware/openzwave/control_panel/ozwcp.cpp -@@ -45,11 +45,10 @@ - #include "Group.h" - #include "Notification.h" - --#include "../../tinyxpath/tinyxml.h" -- - #include - #include - #include -+#include - - //#include "microhttpd.h" - #include "ozwcp.h" -diff --git a/hardware/plugins/PluginManager.cpp b/hardware/plugins/PluginManager.cpp -index ea7bbe48a..9af41e42e 100644 ---- a/hardware/plugins/PluginManager.cpp -+++ b/hardware/plugins/PluginManager.cpp -@@ -5,6 +5,8 @@ - // - #ifdef ENABLE_PYTHON - -+#include -+ - #include "PluginManager.h" - #include "Plugins.h" - #include "PluginMessages.h" -@@ -17,7 +19,6 @@ - #include "../main/mainworker.h" - #include "../main/EventSystem.h" + #include "../hardware/hardwaretypes.h" #include "../json/json.h" -#include "../tinyxpath/tinyxml.h" - #include "../main/localtime_r.h" - #ifdef WIN32 - # include -diff --git a/hardware/plugins/Plugins.cpp b/hardware/plugins/Plugins.cpp -index dc2420d6a..8cba255a2 100644 ---- a/hardware/plugins/Plugins.cpp -+++ b/hardware/plugins/Plugins.cpp -@@ -5,6 +5,8 @@ - // - #ifdef ENABLE_PYTHON + #include "../main/WebServer.h" ++#include + #include + #include +#include -+ - #include "Plugins.h" - #include "PluginMessages.h" - #include "PluginProtocols.h" -@@ -15,7 +17,6 @@ - #include "../main/Logger.h" - #include "../main/SQLHelper.h" - #include "../main/mainworker.h" --#include "../tinyxpath/tinyxml.h" - #include "../main/localtime_r.h" - #include "../../notifications/NotificationHelper.h" -diff --git a/main/LuaCommon.cpp b/main/LuaCommon.cpp -index ec99429a5..76085aed6 100644 ---- a/main/LuaCommon.cpp -+++ b/main/LuaCommon.cpp -@@ -16,7 +16,8 @@ extern "C" { - #endif - } + #define RETRY_DELAY 30 --#include "../tinyxpath/xpath_processor.h" -+#include -+ - #include "../json/json.h" - #include "SQLHelper.h" - #include "mainworker.h" -@@ -44,7 +45,11 @@ int CLuaCommon::l_domoticz_applyXPath(lua_State* lua_state) - return 0; - } - TinyXPath::xpath_processor processor(root, xpath.c_str()); -+#ifdef WITH_EXTERNAL_TINYXPATH -+ TIXML_STRING xresult = processor.S_compute_xpath(); -+#else - TiXmlString xresult = processor.S_compute_xpath(); -+#endif - lua_pushstring(lua_state, xresult.c_str()); - return 1; - } -diff --git a/main/LuaHandler.cpp b/main/LuaHandler.cpp -index 8fdcb278b..a66cafee7 100644 ---- a/main/LuaHandler.cpp -+++ b/main/LuaHandler.cpp -@@ -16,7 +16,8 @@ extern "C" { - #endif - } - --#include "../tinyxpath/xpath_processor.h" -+#include -+ - #include "../json/json.h" - #include "SQLHelper.h" - #include "mainworker.h" diff --git a/domoticz.spec b/domoticz.spec index 121fbb8..09408c8 100644 --- a/domoticz.spec +++ b/domoticz.spec @@ -1,6 +1,6 @@ Name: domoticz -Version: 3.8153 -Release: 7%{?dist} +Version: 4.9700 +Release: 1%{?dist} Summary: Open source Home Automation System License: GPLv3+ and ASL 2.0 and Boost and BSD and MIT @@ -9,23 +9,16 @@ Source0: https://github.com/domoticz/domoticz/archive/%{version}.tar.gz#/%{name} Source1: %{name}.service Source2: %{name}.conf -# Source says its version 3.5876, but it's really 3.8153 -Patch1: %{name}-version.patch # Use system tinyxpath (https://github.com/domoticz/domoticz/pull/1759) -Patch2: %{name}-tinyxpath.patch +Patch1: %{name}-tinyxpath.patch # Use system openzwave includes -Patch3: %{name}-openzwave.patch +Patch2: %{name}-openzwave.patch # Work against Dev branch of OpenZWave upstream -Patch4: %{name}-openzwave-Dev.patch +Patch3: %{name}-openzwave-Dev.patch # Fix python detection (https://github.com/domoticz/domoticz/pull/1749) -Patch5: %{name}-python.patch -# Add OpenZWave Barrier support (https://github.com/jowerg/domoticz) -Patch6: %{name}-ozw-barrier-support-0001.patch -Patch7: %{name}-ozw-barrier-support-0002.patch -# Boost 1.66 support (https://github.com/domoticz/domoticz/issues/2034) -Patch8: %{name}-boost-1.66.patch +Patch4: %{name}-python.patch # OZWCP bug with empty list values -Patch9: %{name}-cp-js.patch +Patch5: %{name}-cp-js.patch BuildRequires: boost-devel BuildRequires: cmake @@ -91,15 +84,11 @@ any mobile device %prep %setup -q -%patch1 -p1 -b.version -%patch2 -p1 -b.tinyxpath -%patch3 -p1 -b.openzwave -%patch4 -p1 -b.openzwave-Dev -%patch5 -p1 -b.python -%patch6 -p1 -b.ozw-barrier1 -%patch7 -p1 -b.ozw-barrier2 -%patch8 -p1 -b.boost-166 -%patch9 -p1 -b.ozwcp-cp-js +%patch1 -p1 -b.tinyxpath +%patch2 -p1 -b.openzwave +%patch3 -p1 -b.openzwave-Dev +%patch4 -p1 -b.python +%patch5 -p1 -b.ozwcp-cp-js rm -f hardware/openzwave/*.h rm -rf hardware/openzwave/aes rm -rf hardware/openzwave/command_classes @@ -113,6 +102,7 @@ rm -rf tinyxpath/ %cmake \ -DUSE_STATIC_LIBSTDCXX=NO \ -DUSE_STATIC_OPENZWAVE=NO \ + -DUSE_OPENSSL_STATIC=NO \ -DUSE_BUILTIN_LUA=NO \ -DUSE_BUILTIN_MQTT=NO \ -DUSE_BUILTIN_SQLITE=NO \ @@ -195,6 +185,9 @@ usermod -G domoticz,dialout domoticz %changelog +* Sun Jul 08 2018 Michael Cronenworth - 4.9700-1 +- Version update + * Tue Jun 19 2018 Miro HronĨok - 3.8153-7 - Rebuilt for Python 3.7