File re3.spec of Package re3

#
# spec file for package re3
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

Name:           re3
Version:        0~git20210903.3233ffe1
Release:        0
Summary:        A Grand Theft Auto III game engine
#https://github.com/GTAmodding/re3#license
License:        NonFree
Group:          Amusements/Games/Action/Arcade
#Git-Clone:     https://github.com/GTAmodding/re3.git
URL:            https://github.com/GTAmodding/re3
Source:         %{name}-%{version}.tar.xz
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glfw3)
BuildRequires:  pkgconfig(libmpg123)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(sndfile)
ExclusiveArch:  %{ix86} x86_64 %{arm} aarch64

%description
An open-source Grand Theft Auto III game engine.

NOTE:
To play GTA III with with re3 you need the original game files!

Copy the stuff from %{_datadir}/re3/gamefiles/ into the original
game files directory an start the game from there.

%prep
%setup -q

%build
mkdir build
./premake5Linux --with-librw gmake2
cd build
# parallel build is broken
%ifarch x86_64
make config=release_linux-amd64-librw_gl3_glfw-oal all
%endif
%ifarch i586
# parallel build is broken
make config=release_linux-x86-librw_gl3_glfw-oal all
%endif
%ifarch aarch64
# parallel build is broken
make config=release_linux-arm64-librw_gl3_glfw-oal all
%endif
%ifarch %{arm}
# parallel build is broken
make config=release_linux-arm-librw_gl3_glfw-oal all
%endif

%install
install -Dm0755 bin/linux-*/Release/re3 %{buildroot}%{_bindir}/re3
install -d %{buildroot}%{_datadir}/re3
cp -arv gamefiles/ %{buildroot}%{_datadir}/re3/

%files
%doc README.md
%{_bindir}/re3
%{_datadir}/re3/

%changelog
openSUSE Build Service is sponsored by