File duckmarines.spec of Package duckmarines

#
# spec file for package duckmarines
#
# Copyright (c) 2019, Martin Hauke <mardnh@gmx.de>
#
# 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:           duckmarines
Version:        1.0c
Release:        0
Summary:        Remake of ChuChu Rocket
License:        Zlib AND MIT AND CC-BY-SA-3.0
Group:          Amusements/Games/Action/Other
URL:            http://tangramgames.dk/games/duckmarines/
Source0:        https://github.com/SimonLarsen/%{name}/archive/v%{version}.tar.gz
Source1:        https://github.com/SimonLarsen/%{name}/releases/download/v%{version}/%{name}-%{version}.love
BuildRequires:  ImageMagick
BuildRequires:  hicolor-icon-theme
BuildRequires:  love >= 0.10.0
BuildRequires:  update-desktop-files
BuildRequires:  zip
Requires:       love >= 0.10.0
BuildArch:      noarch

%description
Duck Marines is a cross-platform free software PC remake of Sonic
Team's ChuChu Rocket.
Duck Marines attempts to recreate the magic from the local multiplayer
of ChuChu Rocket while adding new elements like mini games, a level
editor, colorful pixel art and more.

%prep
%setup -q

%build
zip -X %{name}_%{version}.love `find -type f | sort` -x LICENSE.md README.md

%install
cat >"%{name}" <<-EOF
	#!/bin/sh
	exec love %{_datadir}/%{name}/%{name}_%{version}.love
EOF
install -D -m 0644 %{name}_%{version}.love %{buildroot}%{_datadir}/%{name}/%{name}_%{version}.love
install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 res/icons/vector.svg %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%suse_update_desktop_file -c %{name} "Remake of ChuChu Rocket" "Arcade 2D Actiongame" %{name} %{name} Game ArcadeGame

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

%changelog
openSUSE Build Service is sponsored by