File tome4.spec of Package tome4
#
# spec file for package tome4
#
# Copyright (c) 2022 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 https://bugs.opensuse.org/
#
Name: tome4
Version: 1.7.4
Release: 0
Summary: Roguelike turn-based RPG
License: GPL-3.0-only AND SUSE-Freeware
Group: Amusements/Games/RPG
URL: https://te4.org/
Source: https://te4.org/dl/t-engine/t-engine4-src-%{version}.tar.bz2
Source1: tome4.sh
Source2: tome4.desktop
# PATCH-FIX-OPENSUSE Don't use a bundled version of SDL2
Patch1: system-SDL2.patch
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: premake4
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(SDL2_ttf)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(vorbis)
ExcludeArch: aarch64
%description
A roguelike RPG in the original sense, featuring tactical turn-based combat and advanced character building.
%prep
%setup -q -n t-engine4-src-%{version}
%patch1 -p1
%build
premake4 gmake
# Building in parallel occasionally causes this build failure:
# ../src/luajit2/src/host/buildvm.c:73:10: fatal error: buildvm_arch.h: No such file or directory
%make_build -j1 config=release
%install
unzip -oj -qq game/engines/te4-%{version}.teae data/gfx/te4-icon.png -d .
install -Dm644 te4-icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dm755 t-engine %{buildroot}%{_libexecdir}/tome4/t-engine
install -Dm755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/applications/%{name}.desktop
cp -r bootstrap %{buildroot}%{_libexecdir}/%{name}
cp -r game %{buildroot}%{_libexecdir}/%{name}
%fdupes %{buildroot}%{_libexecdir}/%{name}
%files
%license COPYING
%doc COPYING-MEDIA CREDITS CONTRIBUTING
%{_bindir}/%{name}
%{_libexecdir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog