Last patch of the patchset concerning the doc and the build.

Thanks in advance.
From e3f520ebd4f23fe42a1068ee2d9b42fd529241e8 Mon Sep 17 00:00:00 2001
From: David Carlier <[email protected]>
Date: Fri, 21 Jan 2022 20:57:27 +0000
Subject: [PATCH 3/3] MEDIUM: deviceatlas doc and build update.

Mentions of the new service and update of the build.
---
 Makefile                             |  5 ++++-
 doc/DeviceAtlas-device-detection.txt | 14 +++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index af0f5cc87..e6f2e04ad 100644
--- a/Makefile
+++ b/Makefile
@@ -653,11 +653,14 @@ endif
 ifneq ($(USE_PCRE2),)
 OPTIONS_CFLAGS  += -DDA_REGEX_HDR=\"dac_pcre2.c\" -DDA_REGEX_TAG=2
 endif
+OPTIONS_OBJS	+= $(DEVICEATLAS_LIB)/Os/daunix.o
+OPTIONS_OBJS	+= $(DEVICEATLAS_LIB)/dadwcom.o
+OPTIONS_OBJS	+= $(DEVICEATLAS_LIB)/dasch.o
 OPTIONS_OBJS	+= $(DEVICEATLAS_LIB)/json.o
 OPTIONS_OBJS	+= $(DEVICEATLAS_LIB)/dac.o
 endif
 OPTIONS_OBJS	+= addons/deviceatlas/da.o
-OPTIONS_CFLAGS += $(if $(DEVICEATLAS_INC),-I$(DEVICEATLAS_INC))
+OPTIONS_CFLAGS  += $(if $(DEVICEATLAS_INC),-I$(DEVICEATLAS_INC))
 endif
 
 ifneq ($(USE_51DEGREES),)
diff --git a/doc/DeviceAtlas-device-detection.txt b/doc/DeviceAtlas-device-detection.txt
index 9a1c9b594..0045448f5 100644
--- a/doc/DeviceAtlas-device-detection.txt
+++ b/doc/DeviceAtlas-device-detection.txt
@@ -9,7 +9,8 @@ The build supports the USE_PCRE and USE_PCRE2 options. Once extracted :
 
 Optionally DEVICEATLAS_INC and DEVICEATLAS_LIB may be set to override the path
 to the include files and libraries respectively if they're not in the source
-directory.
+directory. However, if the API had been installed beforehand, DEVICEATLAS_SRC
+can be omitted. Note that the DeviceAtlas C API version supported is the 2.4.0 at minimum.
 
 For HAProxy developers who need to verify that their changes didn't accidentally
 break the DeviceAtlas code, it is possible to build a dummy library provided in
@@ -62,5 +63,16 @@ Single HTTP header
 
     acl device_type_tablet req.fhdr(User-Agent),da-csv-conv(primaryHardwareType) "Tablet"
 
+Optionally a JSON download scheduler is provided to allow a data file being fetched automatically in a daily basis without
+restarting HAProxy :
+
+    $ cd addons/deviceatlas && make [DEVICEATLAS_SRC=<path to the API root folder>]
+
+Similarly, if the DeviceAtlas API is installed, DEVICEATLAS_SRC can be omitted.
+
+    $ ./dadwsch -u JSON data file URL e.g. "https://deviceatlas.com/getJSON?licencekey=<your licence key>&format=zip&data=my&index=web" [-p download directory path /tmp by default] [-d scheduled hour of download, hour when the service is launched by default]
+
+Noted it needs to be started before HAProxy.
+
 
 Please find more information about DeviceAtlas and the detection methods at https://deviceatlas.com/resources .
-- 
2.30.2

Reply via email to