File signus-data.spec of Package signus-data
#
# spec file for package signus-data
#
# Copyright (c) 2021 SUSE LLC
#
# 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 http://bugs.opensuse.org/
#
%define sig_ver 1.96.0
Name: signus-data
Version: 1.96
Release: 0
Summary: Turn-based strategy game
License: GPL-2.0
Group: Amusements/Games/Strategy/Turn Based
URL: https://github.com/signus-game/signus
Source0: %{url}/releases/download/v%{sig_ver}/signus-data-%{version}.tar.bz2
Source1: https://raw.githubusercontent.com/signus-game/signus/v%{sig_ver}/COPYING
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libpng)
BuildRequires: font(freesans)
BuildRequires: font(nimbussansl)
Requires: font(freesans)
Requires: font(nimbussansl)
Supplements: %{name} >= %{version}
BuildArch: noarch
%description
Classic turn-based strategy war game similar to the old Battle Isle series.
%prep
%setup -q
cp %{SOURCE1} .
%build
# Required for gcc11, see: https://github.com/signus-game/signus/releases/tag/v1.96.0
export CXXFLAGS="%{optflags} -std=c++11"
%configure
%make_build
%install
%make_install
# Unbundle fonts
rm -v %{buildroot}%{_datadir}/signus/%{version}/nolang/{FreeSans.ttf,nimbus_sans.pfb}
ln -s %{_datadir}/fonts/truetype/FreeSans.ttf %{buildroot}%{_datadir}/signus/%{version}/nolang/FreeSans.ttf
ln -s %{_datadir}/fonts/truetype/NimbusSanL-Regu.ttf %{buildroot}%{_datadir}/signus/%{version}/nolang/nimbus_sans.pfb
# Remove duplicates
%fdupes %{buildroot}%{_datadir}/signus
%files
%license COPYING
%{_datadir}/signus
%changelog