File Jetpaca.spec of Package Jetpaca
#
# spec file for package Jetpaca
#
# Copyright (c) 2016 SUSE LINUX Products 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: Jetpaca
Version: 0.0+git.1464201911.88a9b35
Release: 0
# Code is MIT, Assets CC-BY 4.0, Fonts freeware and CC-BY-ND
%if 0%{?suse_version} == 1310
License: MIT and SUSE-Freeware
%else
License: MIT and SUSE-Freeware and CC-BY-ND-4.0
%endif
Summary: Game about the rocket alpaca
Url: https://github.com/KOBUGE-Games/jetpaca
Group: Amusements/Games/Other
Source0: %{name}-%{version}.tar.xz
BuildRequires: update-desktop-files
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: godot >= 2.0
BuildArch: noarch
%description
A colorful libre game about a rocket-powered flying alpaca,
using the MIT licensed Godot game engine.
%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.md
# 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 -dm755 %{buildroot}%{_datadir}/pixmaps
install -m644 -t %{buildroot}%{_datadir}/pixmaps art/jetpaca.png
install -dm755 %{buildroot}%{_datadir}/applications
%suse_update_desktop_file -c %{name} %{name} "Game with flying alpaca" %{name} jetpaca Game ArcadeGame
# Remove duplicates
%fdupes %{buildroot}%{_datadir}
%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/jetpaca.png
%changelog