File glsmac.spec of Package glsmac

#
# spec file for package glsmac
#
# Copyright (c) 2023-2024, 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:           glsmac
Version:        0.3+git20240622
Release:        0
Summary:        Reimplementation of Sid Meier's Alpha Centauri
License:        AGPL-3.0
Group:          Amusements/Games/Strategy/Other
URL:            https://github.com/afwbkbc/glsmac
Source:         %{name}-%{version}.tar.xz
Patch0:         glsmac-cmake-git-commit.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(ossp-uuid)
BuildRequires:  pkgconfig(yaml-cpp)
#
BuildRequires:  git-core
#

%description
Unofficial open-source OpenGL/SDL2 reimplementation of
Sid Meier's Alpha Centauri ( + Alien Crossfire ).

NOTE: To play Sid Meier's Alpha Centauri with glsmac you need
the original game files.

%prep
%setup -q
%autopatch -p1

%build
echo '#define GLSMAC_LAST_COMMIT "%{version}"' > src/tmp/last_commit.h
%cmake -DCMAKE_BUILD_TYPE=Release
%cmake_build

%install
install -Dm0755 build/bin/GLSMAC %{buildroot}%{_bindir}/glsmac

# FIXME:
# also needs 'gse'-directory in the working directory
# -> build a wrapper
  

%check

%files
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/glsmac

%changelog
openSUSE Build Service is sponsored by