Fix build with updated RPM tool 27/251227/3 accepted/tizen/unified/20210113.121022 submit/tizen/20210112.121630 submit/tizen/20210113.004724
authorTomasz Swierczek <t.swierczek@samsung.com>
Mon, 11 Jan 2021 06:05:08 +0000 (07:05 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 12 Jan 2021 12:03:25 +0000 (13:03 +0100)
Pre-4.14 RPM tools used to compile the spec file properly when
this syntax:

(1) %if %{build_type}

was used in Requires section and this syntax:

(2) %if "%{build_type}"

was used in %files/%packages section.

In RPM 4.14 version, this doesn't compile. Similarly, removing the ""
in (2) doesn't work in pre-4.14 RPM, just like adding "" in (1).

This patch changes combination of syntax in these %if statements
that can be succesfully compiled under both: pre-4.14 and 4.14 RPM in Tizen.

Change-Id: If8bf4410623a8fc693dda169fea467283c6f4cfc

packaging/yaca.spec

index 038d98a..08a88c2 100644 (file)
@@ -1,4 +1,4 @@
-%{!?build_type:%define build_type "RELEASE"}
+%{!?build_type:%define build_type RELEASE}
 
 Name:               yaca
 Version:            0.0.6
@@ -12,7 +12,7 @@ BuildRequires:      python3 >= 3.4
 BuildRequires:      pkgconfig(capi-base-common)
 BuildRequires:      pkgconfig(openssl1.1)
 BuildRequires:      boost-devel
-%if %{build_type} == "COVERAGE"
+%if "%build_type" == "COVERAGE"
 BuildRequires:      lcov
 %endif
 Requires(post):     /sbin/ldconfig
@@ -102,7 +102,7 @@ The package provides Yet Another Crypto API bindings for Python3.
 %{python3_sitelib}/%{name}
 
 ## Coverage Package ###########################################################
-%if "%{build_type}" == "COVERAGE"
+%if "%build_type" == "COVERAGE"
 %package coverage
 Summary:        Yet Another Crypto API code coverage data
 Group:          Security/Other