Commit 4563c371 authored by Karel Hanák's avatar Karel Hanák
Browse files

Daemon: update to 2.3.7


Signed-off-by: Karel Hanák's avatarKarel Hanák <karel.hanak@iqrf.org>
parent 4994e2fd
From f9b14d4ffa27e34ff58973014ef27fae81681d42 Mon Sep 17 00:00:00 2001 From 76c8227dabc2aee067454e8e311112230207cc34 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com> From: =?UTF-8?q?Karel=20Han=C3=A1k?= <karel.hanak@iqrf.org>
Date: Tue, 6 Oct 2020 22:03:24 +0200 Date: Sat, 26 Jun 2021 08:56:29 +0200
Subject: [PATCH] First working verion Subject: [PATCH] f
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Karel Hanák <karel.hanak@iqrf.org>
--- ---
CMakeLists.txt | 28 +++++- CMakeLists.txt | 26 +++-
buildMake.sh | 24 ++--- buildMake.sh | 24 ++--
cmake/Component.hxx.in | 23 +++++ cmake/Component.hxx.in | 23 ++++
cmake/ShapeComponentDeclaration.cmake | 168 +++++++++++++++++++++++++++++++ cmake/ShapeComponentDeclaration.cmake | 168 +++++++++++++++++++++++
cmake/StartUp.in | 1 + cmake/StartUp.in | 1 +
src/BufferedMqttMessaging/CMakeLists.txt | 2 +- src/BufferedMqttMessaging/CMakeLists.txt | 2 +-
src/JsCache/CMakeLists.txt | 2 +- src/JsCache/CMakeLists.txt | 2 +-
src/MonitorService/CMakeLists.txt | 2 - src/MonitorService/CMakeLists.txt | 2 +-
src/SchedulerMessaging/CMakeLists.txt | 2 - src/SchedulerMessaging/CMakeLists.txt | 2 +-
src/WebsocketMessaging/CMakeLists.txt | 2 +- src/WebsocketMessaging/CMakeLists.txt | 2 +-
10 files changed, 228 insertions(+), 26 deletions(-) 10 files changed, 228 insertions(+), 24 deletions(-)
create mode 100644 cmake/Component.hxx.in create mode 100644 cmake/Component.hxx.in
create mode 100644 cmake/ShapeComponentDeclaration.cmake create mode 100644 cmake/ShapeComponentDeclaration.cmake
create mode 100644 cmake/StartUp.in create mode 100644 cmake/StartUp.in
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a65905..12af75f 100644 index 1f808a2b..73232602 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.0) @@ -17,6 +17,13 @@ cmake_minimum_required(VERSION 3.0)
project(iqrf-gateway-daemon) project(iqrf-gateway-daemon)
...@@ -38,7 +41,7 @@ index 2a65905..12af75f 100644 ...@@ -38,7 +41,7 @@ index 2a65905..12af75f 100644
set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -81,13 +88,28 @@ endif() @@ -96,13 +103,26 @@ endif()
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>) set_directory_properties(PROPERTIES COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>)
...@@ -47,7 +50,6 @@ index 2a65905..12af75f 100644 ...@@ -47,7 +50,6 @@ index 2a65905..12af75f 100644
+# HINTS "/usr/local/Debug/shape/lib") +# HINTS "/usr/local/Debug/shape/lib")
+find_path(SHAPE_INCLUDE_DIR Args.h) +find_path(SHAPE_INCLUDE_DIR Args.h)
+ +
+
+message("!!!!SHAPE LIB: ${SHAPE_LIBRARY} - ${SHAPE_INCLUDE_DIR}") +message("!!!!SHAPE LIB: ${SHAPE_LIBRARY} - ${SHAPE_INCLUDE_DIR}")
+ +
+include_directories(${SHAPE_INCLUDE_DIR}) +include_directories(${SHAPE_INCLUDE_DIR})
...@@ -55,8 +57,7 @@ index 2a65905..12af75f 100644 ...@@ -55,8 +57,7 @@ index 2a65905..12af75f 100644
+#find_library(SHAPEWARE_LIBRARY NAMES libCommandLineService.so +#find_library(SHAPEWARE_LIBRARY NAMES libCommandLineService.so
+# HINTS "/usr/local/Debug/shapeware/lib") +# HINTS "/usr/local/Debug/shapeware/lib")
+find_path(SHAPEWARE_INCLUDE_DIR IBufferService.h +find_path(SHAPEWARE_INCLUDE_DIR IBufferService.h
+ HINTS "/usr/local/include/shapeware" ) + HINTS "/usr/local/include/shapeware")
+
+ +
+message("!!!!SHAPEWARE LIB: ${SHAPEWARE_LIBRARY} - ${SHAPEWARE_INCLUDE_DIR}") +message("!!!!SHAPEWARE LIB: ${SHAPEWARE_LIBRARY} - ${SHAPEWARE_INCLUDE_DIR}")
+ +
...@@ -71,11 +72,11 @@ index 2a65905..12af75f 100644 ...@@ -71,11 +72,11 @@ index 2a65905..12af75f 100644
add_definitions( add_definitions(
-DRAPIDJSON_HAS_STDSTRING -DRAPIDJSON_HAS_STDSTRING
diff --git a/buildMake.sh b/buildMake.sh diff --git a/buildMake.sh b/buildMake.sh
index a8ccb37..31223dc 100755 index 048eb1bd..b5d10098 100755
--- a/buildMake.sh --- a/buildMake.sh
+++ b/buildMake.sh +++ b/buildMake.sh
@@ -1,12 +1,14 @@ @@ -17,12 +17,14 @@
#!/bin/bash
# Script for building IQRF daemon on Linux machine # Script for building IQRF daemon on Linux machine
+rm -rf build +rm -rf build
...@@ -90,18 +91,18 @@ index a8ccb37..31223dc 100755 ...@@ -90,18 +91,18 @@ index a8ccb37..31223dc 100755
LIB_DIRECTORY=.. LIB_DIRECTORY=..
currentdir=$PWD currentdir=$PWD
@@ -14,24 +16,14 @@ builddir=./${buildexp} @@ -30,24 +32,14 @@ builddir=./${buildexp}
mkdir -p ${builddir} mkdir -p ${builddir}
-#get path to shape libs -#get path to shape libs
-shape=../../shape/${buildexp} -shape=../shape/${buildexp}
-pushd ${shape} -pushd ${shape}
-shape=$PWD -shape=$PWD
-popd -popd
- -
-#get path to shapeware libs -#get path to shapeware libs
-shapeware=../../shapeware/${buildexp} -shapeware=../shapeware/${buildexp}
-pushd ${shapeware} -pushd ${shapeware}
-shapeware=$PWD -shapeware=$PWD
-popd -popd
...@@ -122,7 +123,7 @@ index a8ccb37..31223dc 100755 ...@@ -122,7 +123,7 @@ index a8ccb37..31223dc 100755
+#cmake --build ${builddir} --config Release --target install +#cmake --build ${builddir} --config Release --target install
diff --git a/cmake/Component.hxx.in b/cmake/Component.hxx.in diff --git a/cmake/Component.hxx.in b/cmake/Component.hxx.in
new file mode 100644 new file mode 100644
index 0000000..97ad171 index 00000000..c227ea7d
--- /dev/null --- /dev/null
+++ b/cmake/Component.hxx.in +++ b/cmake/Component.hxx.in
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
...@@ -143,7 +144,7 @@ index 0000000..97ad171 ...@@ -143,7 +144,7 @@ index 0000000..97ad171
+ *typehash = std::type_index(typeid(shape::ComponentMeta)).hash_code(); + *typehash = std::type_index(typeid(shape::ComponentMeta)).hash_code();
+ +
+ static shape::ComponentMetaTemplate<@COMPONENT@> component("@COMPONENT@"); + static shape::ComponentMetaTemplate<@COMPONENT@> component("@COMPONENT@");
+ +
+@PROVIDED_INTERFACES@ +@PROVIDED_INTERFACES@
+@REQUIRED_INTERFACES@ +@REQUIRED_INTERFACES@
+ return &component; + return &component;
...@@ -151,7 +152,7 @@ index 0000000..97ad171 ...@@ -151,7 +152,7 @@ index 0000000..97ad171
+} +}
diff --git a/cmake/ShapeComponentDeclaration.cmake b/cmake/ShapeComponentDeclaration.cmake diff --git a/cmake/ShapeComponentDeclaration.cmake b/cmake/ShapeComponentDeclaration.cmake
new file mode 100644 new file mode 100644
index 0000000..fe47549 index 00000000..fe47549f
--- /dev/null --- /dev/null
+++ b/cmake/ShapeComponentDeclaration.cmake +++ b/cmake/ShapeComponentDeclaration.cmake
@@ -0,0 +1,168 @@ @@ -0,0 +1,168 @@
...@@ -325,17 +326,17 @@ index 0000000..fe47549 ...@@ -325,17 +326,17 @@ index 0000000..fe47549
+endfunction() +endfunction()
diff --git a/cmake/StartUp.in b/cmake/StartUp.in diff --git a/cmake/StartUp.in b/cmake/StartUp.in
new file mode 100644 new file mode 100644
index 0000000..cc4a0b1 index 00000000..b6c2fe8c
--- /dev/null --- /dev/null
+++ b/cmake/StartUp.in +++ b/cmake/StartUp.in
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+@_EXE@ @_ARGS@ ++@_EXE@ @_ARGS@
\ No newline at end of file
diff --git a/src/BufferedMqttMessaging/CMakeLists.txt b/src/BufferedMqttMessaging/CMakeLists.txt diff --git a/src/BufferedMqttMessaging/CMakeLists.txt b/src/BufferedMqttMessaging/CMakeLists.txt
index c928c00..998989b 100644 index 88d92c10..623fdaaf 100644
--- a/src/BufferedMqttMessaging/CMakeLists.txt --- a/src/BufferedMqttMessaging/CMakeLists.txt
+++ b/src/BufferedMqttMessaging/CMakeLists.txt +++ b/src/BufferedMqttMessaging/CMakeLists.txt
@@ -1,6 +1,6 @@ @@ -15,7 +15,7 @@
project(BufferedMqttMessaging) project(BufferedMqttMessaging)
-FIND_PACKAGE(shapeware REQUIRED) -FIND_PACKAGE(shapeware REQUIRED)
...@@ -344,10 +345,10 @@ index c928c00..998989b 100644 ...@@ -344,10 +345,10 @@ index c928c00..998989b 100644
set(COMPONENT iqrf::BufferedMqttMessaging) set(COMPONENT iqrf::BufferedMqttMessaging)
DeclareShapeComponent(${COMPONENT}) DeclareShapeComponent(${COMPONENT})
diff --git a/src/JsCache/CMakeLists.txt b/src/JsCache/CMakeLists.txt diff --git a/src/JsCache/CMakeLists.txt b/src/JsCache/CMakeLists.txt
index f466cf2..f50dfb6 100644 index 9d544597..12a6a6e3 100644
--- a/src/JsCache/CMakeLists.txt --- a/src/JsCache/CMakeLists.txt
+++ b/src/JsCache/CMakeLists.txt +++ b/src/JsCache/CMakeLists.txt
@@ -3,7 +3,7 @@ project(JsCache) @@ -18,7 +18,7 @@ project(JsCache)
find_package(Boost REQUIRED COMPONENTS filesystem ) find_package(Boost REQUIRED COMPONENTS filesystem )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(LIBZIP REQUIRED) find_package(LIBZIP REQUIRED)
...@@ -357,34 +358,37 @@ index f466cf2..f50dfb6 100644 ...@@ -357,34 +358,37 @@ index f466cf2..f50dfb6 100644
set(COMPONENT iqrf::JsCache) set(COMPONENT iqrf::JsCache)
DeclareShapeComponent(${COMPONENT}) DeclareShapeComponent(${COMPONENT})
diff --git a/src/MonitorService/CMakeLists.txt b/src/MonitorService/CMakeLists.txt diff --git a/src/MonitorService/CMakeLists.txt b/src/MonitorService/CMakeLists.txt
index 8a3ea14..5d766d7 100644 index fd0b1767..16454a00 100644
--- a/src/MonitorService/CMakeLists.txt --- a/src/MonitorService/CMakeLists.txt
+++ b/src/MonitorService/CMakeLists.txt +++ b/src/MonitorService/CMakeLists.txt
@@ -1,7 +1,5 @@ @@ -15,7 +15,7 @@
project(MonitorService) project(MonitorService)
-FIND_PACKAGE(shapeware REQUIRED) -FIND_PACKAGE(shapeware REQUIRED)
- +#FIND_PACKAGE(shapeware REQUIRED)
set(COMPONENT iqrf::MonitorService) set(COMPONENT iqrf::MonitorService)
DeclareShapeComponent(${COMPONENT}) DeclareShapeComponent(${COMPONENT})
AddShapeProvidedInterface(${COMPONENT} iqrf::IMonitorService)
diff --git a/src/SchedulerMessaging/CMakeLists.txt b/src/SchedulerMessaging/CMakeLists.txt diff --git a/src/SchedulerMessaging/CMakeLists.txt b/src/SchedulerMessaging/CMakeLists.txt
index 9ca2983..3602d27 100644 index 2840b11a..ab188d33 100644
--- a/src/SchedulerMessaging/CMakeLists.txt --- a/src/SchedulerMessaging/CMakeLists.txt
+++ b/src/SchedulerMessaging/CMakeLists.txt +++ b/src/SchedulerMessaging/CMakeLists.txt
@@ -1,7 +1,5 @@ @@ -15,7 +15,7 @@
project(SchedulerMessaging) project(SchedulerMessaging)
-FIND_PACKAGE(shapeware REQUIRED) -FIND_PACKAGE(shapeware REQUIRED)
- +#FIND_PACKAGE(shapeware REQUIRED)
set(COMPONENT iqrf::SchedulerMessaging) set(COMPONENT iqrf::SchedulerMessaging)
DeclareShapeComponent(${COMPONENT}) DeclareShapeComponent(${COMPONENT})
AddShapeProvidedInterface(${COMPONENT} iqrf::IMessagingService)
diff --git a/src/WebsocketMessaging/CMakeLists.txt b/src/WebsocketMessaging/CMakeLists.txt diff --git a/src/WebsocketMessaging/CMakeLists.txt b/src/WebsocketMessaging/CMakeLists.txt
index e35de5e..020e027 100644 index b636b98d..955ea42f 100644
--- a/src/WebsocketMessaging/CMakeLists.txt --- a/src/WebsocketMessaging/CMakeLists.txt
+++ b/src/WebsocketMessaging/CMakeLists.txt +++ b/src/WebsocketMessaging/CMakeLists.txt
@@ -1,6 +1,6 @@ @@ -15,7 +15,7 @@
project(WebsocketMessaging) project(WebsocketMessaging)
-FIND_PACKAGE(shapeware REQUIRED) -FIND_PACKAGE(shapeware REQUIRED)
...@@ -393,5 +397,5 @@ index e35de5e..020e027 100644 ...@@ -393,5 +397,5 @@ index e35de5e..020e027 100644
set(COMPONENT iqrf::WebsocketMessaging) set(COMPONENT iqrf::WebsocketMessaging)
DeclareShapeComponent(${COMPONENT}) DeclareShapeComponent(${COMPONENT})
-- --
2.7.4 2.25.1
...@@ -7,9 +7,9 @@ Type=simple ...@@ -7,9 +7,9 @@ Type=simple
User=root User=root
Group=root Group=root
WorkingDirectory=/usr/bin WorkingDirectory=/usr/bin
ExecStart=/usr/bin/iqrfgd2 /etc/iqrf-gateway-daemon/config.json ExecStart=/usr/bin/iqrfgd2 -c /etc/iqrf-gateway-daemon/config.json
StandardOutput=syslog StandardOutput=journal
StandardError=syslog StandardError=journal
RestartSec=5 RestartSec=5
Restart=always Restart=always
......
LICENSE = "Apache-2.0" LICENSE = "Apache-2.0"
HOMEPAGE = "https://gitlab.iqrf.org/open-source/iqrf-gateway-daemon" HOMEPAGE = "https://gitlab.iqrf.org/open-source/iqrf-gateway-daemon"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" LIC_FILES_CHKSUM = "file://LICENSE;md5=d48c120b6d5a80de1e5836ba755d8b1f"
inherit cmake systemd python3native inherit cmake systemd python3native
...@@ -8,8 +8,8 @@ DEPENDS = "shape shapeware python3-native python3-requests-native libzip" ...@@ -8,8 +8,8 @@ DEPENDS = "shape shapeware python3-native python3-requests-native libzip"
RDEPEND_${PN} += "shape shapeware" RDEPEND_${PN} += "shape shapeware"
SRC_URI = "gitsm://gitlab.iqrf.org/open-source/iqrf-gateway-daemon.git;protocol=https;tag=v${PV};branch=release/v2.3;name=daemon \ SRC_URI = "gitsm://gitlab.iqrf.org/open-source/iqrf-gateway-daemon.git;protocol=https;tag=v${PV};branch=release/v2.3;name=daemon \
file://0001-First-working-verion.patch \ file://0001-cmake.patch \
file://0002-wip.patch \ file://0002-cmake.patch \
file://iqrf-gateway-daemon.service \ file://iqrf-gateway-daemon.service \
" "
...@@ -73,8 +73,9 @@ do_install_append() { ...@@ -73,8 +73,9 @@ do_install_append() {
cp ${l} ${D}${libdir}/iqrf-gateway-daemon cp ${l} ${D}${libdir}/iqrf-gateway-daemon
done done
# replace some configs from iqd-gw-01 repo # default uart
#install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/config.json ${D}${sysconfdir}/iqrf-gateway-daemon #install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/config.json ${D}${sysconfdir}/iqrf-gateway-daemon
# custom for iqube
install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/iqrf__IqrfSpi.json ${D}${sysconfdir}/iqrf-gateway-daemon install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/iqrf__IqrfSpi.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/iqrf__IqrfUart.json ${D}${sysconfdir}/iqrf-gateway-daemon install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/iqrf__IqrfUart.json ${D}${sysconfdir}/iqrf-gateway-daemon
install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/iqrf__MqttMessaging.json ${D}${sysconfdir}/iqrf-gateway-daemon install -m 644 ${WORKDIR}/iqd-gw-01/conf/iqrf-gateway-daemon/iqrf__MqttMessaging.json ${D}${sysconfdir}/iqrf-gateway-daemon
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment