Check whether a macro is undefined or has a specific value

Marco listaddr at
Tue Aug 16 11:22:20 UTC 2011


as the subject says: If macro %{__foo} is defined and has value 1, I'd
like to do something; otherwise (undefined or value != 1), skip.

In my spec file, I've tried

%if %{__foo}
# do something

%if %{__foo} = "1"
# do something

but they all fail. Thanks in advance for any help.

More information about the Rpm-list mailing list