DOC: deviceatlas build clarifications
authorDavid Carlier <dcarlier@deviceatlas.com>
Wed, 2 Jul 2025 13:11:30 +0000 (14:11 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Oct 2025 13:40:37 +0000 (15:40 +0200)
Update accordingly the related documentation, removing/clarifying confusing
parts as it was more complicated than it needed to be.

(cherry picked from commit e7c59a7a8435fa58377400aa88c241bfa111409e)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 2d6d7f335091a36f278f31a24ad2661ab66d9090)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 8f01f82423f1da7a47f06a51bff54d185572c16a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

doc/DeviceAtlas-device-detection.txt

index 9df9783..26b5cb3 100644 (file)
@@ -3,7 +3,9 @@ DeviceAtlas Device Detection
 
 In order to add DeviceAtlas Device Detection support, you would need to download
 the API source code from https://deviceatlas.com/deviceatlas-haproxy-module.
-Once extracted :
+Once extracted, two modes are supported :
+
+1/ Build HAProxy and DeviceAtlas in one command
 
     $ make TARGET=<target> USE_DEVICEATLAS=1 DEVICEATLAS_SRC=<path to the API root folder>
 
@@ -14,10 +16,6 @@ directory. Also, in the case the api cache support is not needed and/or a C++ to
 
     $ make TARGET=<target> USE_DEVICEATLAS=1 DEVICEATLAS_SRC=<path to the API root folder> DEVICEATLAS_NOCACHE=1
 
-However, if the API had been installed beforehand, DEVICEATLAS_SRC
-can be omitted. Note that the DeviceAtlas C API version supported is from the 3.x
-releases series (3.2.1 minimum recommended).
-
 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
 the addons/deviceatlas/dummy directory and to use it as an alternative for the
@@ -27,6 +25,29 @@ validate API changes :
 
     $ make TARGET=<target> USE_DEVICEATLAS=1 DEVICEATLAS_SRC=$PWD/addons/deviceatlas/dummy
 
+2/ Build and install DeviceAtlas according to https://docs.deviceatlas.com/apis/enterprise/c/<release version>/README.html
+
+For example :
+In the deviceatlas library folder :
+    $ cmake .
+    $ make
+    $ sudo make install
+
+In the HAProxy folder :
+    $ make TARGET=<target> USE_DEVICEATLAS=1
+
+Note that if the -DCMAKE_INSTALL_PREFIX cmake option had been used, it is necessary to set as well DEVICEATLAS_LIB and
+DEVICEATLAS_INC as follow :
+    $ make TARGET=<target> USE_DEVICEATLAS=1 DEVICEATLAS_INC=<CMAKE_INSTALL_PREFIX value>/include DEVICEATLAS_LIB=<CMAKE_INSTALL_PREFIX value>/lib
+
+For example :
+    $ cmake -DCMAKE_INSTALL_PREFIX=/opt/local
+    $ make
+    $ sudo make install
+    $ make TARGET=<target> USE_DEVICEATLAS=1 DEVICEATLAS_INC=/opt/local/include DEVICEATLAS_LIB=/opt/local/lib
+
+Note that DEVICEATLAS_SRC is omitted in this case.
+
 These are supported DeviceAtlas directives (see doc/configuration.txt) :
   - deviceatlas-json-file <path to the DeviceAtlas JSON data file>.
   - deviceatlas-log-level <number> (0 to 3, level of information returned by