Add gbs option to enable the TZ backend support
authorPawel Kowalski <p.kowalski2@partner.samsung.com>
Wed, 28 Nov 2018 10:39:49 +0000 (11:39 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 3 Dec 2018 14:34:54 +0000 (15:34 +0100)
To enable the TZ backend support add following option to the gbs build:
--define "tz_backend ON". If the option is not set or is set to value
different than ON, the TZ backend support is disabled (it is disabled by
default).

Change-Id: If6ebd2625ea7b559df52c8fc6da659a99e53a9f9

packaging/key-manager.spec

index 24fc5ac..c5f8212 100644 (file)
@@ -1,7 +1,7 @@
 %global watchdog_enabled 1
 %global watchdog_timeout_sec 60
 %global watchdog_notify_sec  20
-%global tz_backend_enabled 0
+%global tz_backend_enabled %{?tz_backend:%tz_backend}%{!?tz_backend:OFF}
 
 Name:       key-manager
 Summary:    Central Key Manager and utilities
@@ -36,7 +36,7 @@ BuildRequires: pkgconfig(argos_watchdog)
 %endif
 BuildRequires: boost-devel
 BuildRequires: ca-certificates-devel
-%if %{tz_backend_enabled} == 1
+%if %{tz_backend_enabled} == ON
 BuildRequires: key-manager-ta-devel
 BuildRequires: key-manager-ta-serialization-devel
 BuildRequires: pkgconfig(tef-libteec)
@@ -176,7 +176,7 @@ export LDFLAGS+="-Wl,--rpath=%{_libdir},-Bsymbolic-functions "
         -DWATCHDOG_TIMEOUT_SEC=%{watchdog_timeout_sec} \
         -DWATCHDOG_NOTIFY_SEC=%{watchdog_notify_sec} \
 %endif
-%if %{tz_backend_enabled} == 1
+%if %{tz_backend_enabled} == ON
         -DTZ_BACKEND_ENABLED=ON \
 %else
         -DTZ_BACKEND_ENABLED=OFF \