Can't figure out the rest of this *.spec file

My long-term goal is an appimage of this game, but I’m stuck on the spec file. It does not have a ‘make install’ target. I think I have it so it will compile, but I’m not sure what to do next. An arch pkgbuild is available here, this is what I have so far

#
# spec file for package my-first-obs-package
#
# -- Copyright omitted --

Name:           Bugdom 

Version:        1.3.0

Release:        0 

License:        CC BY-NC-SA 4.0

Group:          Amusements/Games/3D 

Summary:        Save Bugdom from Thorax's evil Fire Ants

Url:            https://github.com/jorio/Bugdom/ 

Source:         Bugdom-%{version}.tar.gz 

BuildRequires:  gcc-c++

BuildRequires:  cmake 

BuildRequires: SDL2-devel

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description 
You are Rollie McFly, the only remaining bug capable of saving the Lady Bugs and restoring peace to the Bugdom. Rollie has been hiding in the Lawn area of the Bugdom and will need to travel far to get to the Ant Hill where the battle with King Thorax must take place. There will be water to cross, bugs to ride, and plenty of enemy forces to defeat, but once the Fire Ants and King Thorax have been defeated, you will become the new ruler of the Bugdom and peace will be restored. 

%prep 


%setup -q -n %{name}-%{version}


%build 

cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release
cmake --build build-release

%install 

install -Dm 755 build-release/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm 755 Data %{buildroot}%{_bindir}/Data

%files 



%changelog 


My full obs directory is available here

spec files do not use make or have targets. If you mean that makefile that comes with your software does not have install target - just copy files from build directory into the correct location in %install section.

Yes, I meant the makefile from the project. Anyway, I got it, it compiles for tumbleweed, fedora, & mageia. However, it fails when setting Leap as the target

82s] /home/abuild/rpmbuild/BUILD/Bugdom-1.3.0/extern/Pomme/src/PommeDebug.cpp: In function ‘std::__cxx11::string Pomme::FourCCString(uint32_t, char)’:
82s] /home/abuild/rpmbuild/BUILD/Bugdom-1.3.0/extern/Pomme/src/PommeDebug.cpp:47:7: error: ‘reverse’ is not a member of ‘std’
82s] std::reverse(b, b + 4);
82s] ^~~~~~~
83s] gmake[2]: *** [extern/Pomme/CMakeFiles/Pomme.dir/build.make:93: extern/Pomme/CMakeFiles/Pomme.dir/src/PommeDebug.cpp.o] Error 1
83s] gmake[1]: *** [CMakeFiles/Makefile2:189: extern/Pomme/CMakeFiles/Pomme.dir/all] Error 2
83s] gmake: *** [Makefile:101: all] Error 2
83s] error: Bad exit status from /var/tmp/rpm-tmp.zQdgLQ (%build)

I’m at a loss, is there anything I can do?

Hi
Missing header in PommeDebug.cpp need to add a patch…


#include <algorithm> // std::reverse

Thanks, so now I get

9s] /home/abuild/rpmbuild/BUILD/Bugdom-1.3.0/extern/Pomme/src/Files/HostVolume.cpp:191:40: error: no member named 'ends_with' in '

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >’

So, I added ‘#include <string_view>’ to HostVolume.cpp, but still get the same result. These are fairly new functions to c++, is gcc-c++ for Leap 15.3 just not new enough? Is there a way to use clang or a newer gcc with OBS? I had to guess and find similar games to get the requirement list, is there an easier way to do this?

Hi
What version, default is 7, gcc8-c++, gcc9-c++ or gcc10-c++ rather than gcc-c++ you may have to export the CC and CXX flags…

I got it to compile, by adding


%if "%{_repository}" == "openSUSE_Leap_15.3"
BuildRequires:  gcc10-c++
%else
BuildRequires:  gcc-c++
%endif

%if "%_repository" == "openSUSE_Leap_15.3"
export CXX=gcc-10
export CC=gcc-10
%endif

Now, I get

104s] [100%] Linking CXX executable Bugdom
104s] /usr/lib64/gcc/x86_64-suse-linux/10/…/…/…/…/x86_64-suse-linux/bin/ld: …/extern/Quesa/SDK/Libraries/Linux/x86_64/Release/l
ibQuesa_SDL.a(QD3DCamera.cpp.o): undefined reference to symbol ‘asinf@@GLIBC_2.2.5
104s] /usr/lib64/gcc/x86_64-suse-linux/10/…/…/…/…/x86_64-suse-linux/bin/ld: /lib64/libm.so.6: error adding symbols: DSO missing
from command line
104s] collect2: error: ld returned 1 exit status
104s] gmake[2]: *** [CMakeFiles/Bugdom.dir/build.make:1398: Bugdom] Error 1
104s] gmake[1]: *** [CMakeFiles/Makefile2:135: CMakeFiles/Bugdom.dir/all] Error 2
104s] gmake: *** [Makefile:101: all] Error 2
104s] error: Bad exit status from /var/tmp/rpm-tmp.02N6zB (%build)
104s]
104s]
104s] RPM build errors:
104s] Bad exit status from /var/tmp/rpm-tmp.02N6zB (%build)
104s]
104s] localhost.localdomain failed “build Bugdom.spec” at Fri Apr 16 18:13:50 UTC 2021.
104s]

Thanks for all your help. I think I’ll take a break for a while
https://github.com/jpenguin/Bugdom/blob/master/Bugdom.spec

Hi
Missing the -lm (that’s a lower case L) in your linking flags…