Issue with 0%{?suse_version} in %if statement

Hi all,

I’ve having trouble getting the OBS to recognise an if statement using the %suse_version variable in a spec file.
The if statements that are giving me trouble begin on line 14 and 88 in the spec file.

As far as I can tell, %suse_version for OpenSUSE 13.2 and Leap 42.1 are 1320 and 1315, respectively, so I have no clue as to why the if statements are not running correctly. Would anyone know what I’ve done wrong here?

Spec file location: https://build.opensuse.org/package/view_file/home:breed808/dolphin-emu/dolphin-emu.spec?expand=1
Build log: https://build.opensuse.org/package/live_build_log/home:breed808/dolphin-emu/openSUSE_Leap_42.1/x86_64

This:

%elseif 0%{?suse_version} == 1315

There is no %elseif, this will silently be ignored.

Replace it with %else %if (and a second %endif), although you could also omit the %else altogether.
I.e. like this:

%if 0%{?suse_version} == 1320
BuildRequires:  gcc49
BuildRequires:  gcc49-c++
%else
%if 0%{?suse_version} == 1315
BuildRequires:  gcc5
BuildRequires:  gcc5-c++
%endif
%endif

or, this should also work as only one %if applies in any case:

%if 0%{?suse_version} == 1320
BuildRequires:  gcc49
BuildRequires:  gcc49-c++
%endif
%if 0%{?suse_version} == 1315
BuildRequires:  gcc5
BuildRequires:  gcc5-c++
%endif

Ah, my mistake. I had assumed that since spec files support %if and %else, %elseif would also be supported.
Many thanks for pointing that out, I would never have solved that on my own.