File mari0.spec of Package mari0
#
# spec file for package mari0
#
# Copyright (c) 2019 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: mari0
Version: 1.6.2
Release: 0
Summary: Nintendo's Super Mario Bros and Valve's Portal
License: MIT
Group: Amusements/Games/Action/Other
Url: http://stabyourself.net/mari0/
Source0: https://github.com/Stabyourself/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
BuildRequires: update-desktop-files
BuildRequires: zip
Requires: love >= 0.10.2
BuildArch: noarch
%description
Two genre defining games from completely different eras:
Nintendo's Super Mario Bros. and Valve's Portal.
These two games managed to give Platformers and
First-Person Puzzle Games a solid place in the video
game world. But what if Nintendo teamed up with Valve
and recreated the famous Mario game with Portal gun mechanics?
%prep
%setup -q
# Create launcher file
echo -e "#!/bin/sh\nexec love %{_datadir}/%{name}/%{name}_%{version}.love \"$@\"\n" > %{name}
# Create .love archive, need to set the file dates and sort the file list to make sure zip output is reproducible
files=$(find . -not -path "./_DO NOT INCLUDE*" -exec touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" {} + -print | sort)
zip %{name}_%{version}.love $files
%build
# Nothing to do.
%install
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 "_DO NOT INCLUDE/icon.png" %{buildroot}%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -i %{name}
%files
%defattr(-,root,root)
%doc README.md
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}_%{version}.love
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog