File Herbi.spec of Package Herbi
#
# spec file for package Herbi
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
Name: Herbi
Version: 0.9
Release: 0
Summary: A retro platformer
# Code is MIT, Font CC BY-SA 3.0
License: MIT and CC-BY-SA-3.0
Group: Amusements/Games/Other
Url: https://kobuge-games.github.io/Herbi/
Source0: https://github.com/KOBUGE-Games/Herbi/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: update-desktop-files
Requires: godot >= 2.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
A retro platformer which you have to collect all diamonds presented in levels.
%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} README.md 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} "Retro platformer 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