Is there a way to distinguish between SLE and openSUSE in a spec file?


I would like to know how I can test if my spec file is being built in SLE 12/12-P1/12-P2 and I would like this test not to return true if the spec file is being built on openSUSE 42.x. I know that one can use the %{suse_version} and %{sle_version} macros to test openSUSE/SLE versions, but what I need is a macro that returns a value ONLY for SLE and returns no value for openSUSE build platforms. Is this possible? I am asking as when building my textadept package on SLE I get the error:

  147s] textadept-9.2-10.1.x86_64.rpm: directories not owned by a package:
  147s]  - /usr/share/licenses

while when the spec file is being built on openSUSE 42.x it does **not **return the same error. So I need a way to test whether the platform the spec file is being built on is SLE or openSUSE (i.e., I need to distinguish between these two platforms).

Thanks for your time,

I have found a macro that seems to be what I want, sort of. 0%{?is_opensuse} returns true if on openSUSE and false on SLE. So merely placing an explanation mark before it (!) will cause it return true on SLE and false on openSUSE.