File dragonmemory.spec of Package Dragonmemory
#
# spec file for package dragonmemory
#
# 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 oname DragonMemory
Name: dragonmemory
Version: 1.0
Release: 0
Summary: A memory game where you have to match identical chips
License: GPL-3.0-only
Group: Amusements/Games/Board/Puzzle
URL: https://sourceforge.net/projects/dragonmemory/
Source0: https://prdownloads.sourceforge.net/dragonmemory/DragonMemory-source.tgz
Source1: dragonmemory.png
Patch0: dragonmemory-1.0-linuxpath.patch
Patch1: dragonmemory-1.0-makefile.patch
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: gcc-c++
BuildRequires: update-desktop-files
%description
Dragon Memory is a memory game where you have to match identical chips from
a board. The game has very detailed graphics and a lot of levels to play.
%prep
%setup -q -n %{oname}
%patch -P 0 -p1 -b .path
%patch -P 1 -p1 -b .makefile
%build
export CPPFLAGS="%{optflags}"
%make_build
%install
mkdir -p %{buildroot}%{_bindir}
cp %{name} %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -r fonts %{buildroot}%{_datadir}/%{name}/
cp -r gfx %{buildroot}%{_datadir}/%{name}/
cp -r music %{buildroot}%{_datadir}/%{name}/
cp -r sounds %{buildroot}%{_datadir}/%{name}/
cp -r themes %{buildroot}%{_datadir}/%{name}/
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{name}.desktop << EOF
[Desktop Entry]
Name=Dragon Memory
Comment=Dragon Memory is a memory game
Comment[de]=Dragon Memory ist ein Memory-Spiel
Exec=%{name}
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
Categories=Game;LogicGame;
EOF
%if 0%{?suse_version}
%suse_update_desktop_file -i %{name}
%endif
%files
%license License.txt
%doc Authors.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog