File mc2.spec of Package mc2

#
# spec file for package mc2
#
# Copyright (c) 2021-2025, 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:           mc2
Version:        0.1.1
Release:        0
Summary:        Mech Commander 2 game engine
# Original game was released under Shared Source Limited Permission License (please refer to EULA.txt)
License:        GPL-3.0-or-later
URL:            https://alariq.github.io/mc2-website/
#Git-Clone:     https://github.com/alariq/mc2.git
Source:         %{name}-%{version}.tar.xz
#Patch0:         x.patch
#Patch1:         y.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(zlib)

%description
Mech Commander 2 game engine.

# FIXME: game does not work yet since we cannot create the datafiles
#         https://github.com/alariq/mc2srcdata/issues/1

%prep
%autosetup -p1

%build
mkdir build
cd build
cmake ..
%make_build

%install
install -D -m0755 build/mc2 %{buildroot}/%{_bindir}/mc2
install -D -m0755 build/out/res/libmc2res_64.so %{buildroot}%{_libdir}/libmc2res_64.so
# tools needed to build the data datafiles (mc2srcdata)
install -D -m0755 build/out/data_tools/aseconv %{buildroot}/%{_bindir}/aseconv
install -D -m0755 build/out/data_tools/makefst %{buildroot}/%{_bindir}/makefst
install -D -m0755 build/out/data_tools/makersp %{buildroot}/%{_bindir}/makersp
install -D -m0755 build/out/data_tools/pak %{buildroot}/%{_bindir}/pak
install -D -m0755 build/out/text_tool/text_tool %{buildroot}/%{_bindir}/text_tool
#

%files
%license EULA.txt license.txt
%doc README.md
%{_bindir}/mc2
%{_libdir}/libmc2res_64.so
# tools
%{_bindir}/aseconv
%{_bindir}/makefst
%{_bindir}/makersp
%{_bindir}/pak
%{_bindir}/text_tool

%changelog
openSUSE Build Service is sponsored by