Trickery to handle unset @BUILD_FLAVOR@

OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=13
This commit is contained in:
Nicolas Morey-Chaisemartin 2017-07-03 13:38:38 +00:00 committed by Git OBS Bridge
parent 8f0431bdfd
commit 56f5ea6ff5

View File

@ -16,8 +16,10 @@
#
%global flavor @BUILD_FLAVOR@%nil
%define unset_flavor BUILD_FLAVOR
%if "%{flavor}" == ""
# Tricker to detect if BUILD_FLAVOR was not replaced and handle it gracefully
%if "%{flavor}" == "" || "%{flavor}" == "@%{unset_flavor}@"
%define pack_suff %{nil}
%else
%define pack_suff -%{flavor}