File open-supaplex.spec of Package open-supaplex
#
# spec file for package open-supaplex
#
# Copyright (c) 2024 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/
#
%define name1 opensupaplex
Name: open-supaplex
Version: 7.1.2
Release: 0
Summary: Open Supaplex game
License: MIT and GPL-3.0-or-later
URL: https://github.com/sergiou87/open-supaplex
Source: https://github.com/sergiou87/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE open-supaplex-data-folder.patch set data dir path
Patch0: open-supaplex-data-folder.patch
BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(sdl2)
BuildRequires: libvorbis-devel
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
%description
OpenSupaplex is a 1:1 reimplementation of the original game in C and SDL, with
just a few changes to make it easy to use with game controllers, and also easy
to port to any platform.
%prep
%autosetup
%build
cd linux
%make_build
%install
install -d %{buildroot}/%{_bindir}
install -Dm0755 linux/%{name1} %{buildroot}/%{_bindir}
install -Dm0644 windows/OpenSupaplex.ico %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/%{name1}.ico
install -d %{buildroot}/%{_datadir}/OpenSupaplex
mv resources/* %{buildroot}/%{_datadir}/OpenSupaplex
%suse_update_desktop_file -c %{name1} %{name1} "Games" %{name1} %{name1} Game
%files
%license README.md
%{_bindir}/%{name1}
%{_datadir}/OpenSupaplex
%{_datadir}/applications/%{name1}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name1}.ico
%changelog