File Dolphin-Island-2.spec of Package Dolphin-Island-2

#
# spec file for package Dolphin-Island-2
#
# Copyright (c) 2020 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:           Dolphin-Island-2
Version:        20160410
Release:        0
Summary:        A retro jump and run game
License:        MIT
Group:          Amusements/Games/Other
URL:            https://aldiansolkai.itch.io/dolphin-island-2
# Github: https://github.com/janmarcano/Dolphin-Island-2
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Requires:       godot < 3
Requires:       godot >= 2.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
A retro jump and run game with a female main character.

%prep
%setup -q

%build

%install
# Install game files
install -dm755 %{buildroot}%{_datadir}/%{name}
cp -R -t %{buildroot}%{_datadir}/%{name} *

# Install License and Readme (for legal reasons is the very important)
install -d -m755 %{buildroot}%{_docdir}/%{name}
install -m644 -t %{buildroot}%{_docdir}/%{name} LICENSE

# Install Gamewrapper
install -dm755 %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/%{name} << EOF
#!/bin/sh
godot -path "%{_datadir}/%{name}" $@
EOF
chmod 755 %{buildroot}%{_bindir}/%{name}

# Install Icon and Desktop files
install -Dm644 icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -dm755   %{buildroot}%{_datadir}/applications
%suse_update_desktop_file -c %{name} %{name} "A Jump and Run Game" %{name} %{name} Game ArcadeGame

# Remove duplicates
%fdupes %{buildroot}%{_datadir}

%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by