hal-backend-service: Add json configs for various build profiles 89/320989/12
authorSangYoun Kwak <sy.kwak@samsung.com>
Wed, 12 Mar 2025 02:22:48 +0000 (11:22 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 19 Mar 2025 02:12:01 +0000 (02:12 +0000)
To support various build profiles, json config files are added for
profiles. Also, 'if statement' is added to the spec file to use
appropriate json config file by the build profile.

Change-Id: I3989207849471031d98df8438841d3fb1b1cef75
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
hal-backend-service/config/hal-backend-service-config-da.json [new file with mode: 0644]
hal-backend-service/config/hal-backend-service-config-vd.json [new file with mode: 0644]
packaging/hal-api-common.spec

diff --git a/hal-backend-service/config/hal-backend-service-config-da.json b/hal-backend-service/config/hal-backend-service-config-da.json
new file mode 100644 (file)
index 0000000..c0aca11
--- /dev/null
@@ -0,0 +1,14 @@
+{
+       "process": [
+               {
+                       "type": "systemd",
+                       "property": {
+                               "name": "hal-backend-service-device"
+                       },
+                       "thread": [
+                               { "hal_module_name": [ "device_display" ] },
+                               { "hal_module_name": [ "device_led" ] }
+                       ]
+               }
+       ]
+}
diff --git a/hal-backend-service/config/hal-backend-service-config-vd.json b/hal-backend-service/config/hal-backend-service-config-vd.json
new file mode 100644 (file)
index 0000000..e69de29
index b2b5e32da4fb4a3d6726ac0dbdfa7cf094603fc0..f68335cb85f92b61ce8d7f1c2e8fe32b6bd8c04a 100644 (file)
@@ -87,11 +87,22 @@ Haltests for hal-api-common
 %setup -q
 
 %if %{enable_hal_backend_service}
-hal-backend-service/hal-backend-service-generator.py \
+       # Use different json config file depending on the build profile
+       %define hal_backend_service_config "hal-backend-service-config.json"
+
+       %if "%{WITH_DA}" == "1"
+               %define hal_backend_service_config "hal-backend-service-config-da.json"
+       %endif
+
+       %if "%{WITH_VD}" == "1" || "%{WITH_VD_MV}" == "1"
+               %define hal_backend_service_config "hal-backend-service-config-vd.json"
+       %endif
+
+       hal-backend-service/hal-backend-service-generator.py \
                --enable \
-               --config=hal-backend-service-config.json
+               --config=%{hal_backend_service_config}
 %else
-hal-backend-service/hal-backend-service-generator.py --disable
+       hal-backend-service/hal-backend-service-generator.py --disable
 %endif
 
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \