LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mari0.spec of Package mari0 (Project games)

# spec file for package mari0
# Copyright (c) 2018 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.1
Release:        0
Summary:        Nintendo's Super Mario Bros and Valve's Portal
License:        Zlib
Group:          Amusements/Games/Action/Other
Url:            http://stabyourself.net/mari0/
Source0:        https://github.com/Stabyourself/mari0/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:        %{name}.desktop
# PATCH-FIX-UPSTREAM -- support for love 0.10.2, picked from upstream (replace math.mod() by math.fmod()).
Patch0:         mari0-1.6.1-love-1.10.2.patch
BuildRequires:  update-desktop-files
BuildRequires:  zip
Requires:       love >= 0.10.2
BuildArch:      noarch

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?

%setup -q
%patch0 -p1

# 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

# Nothing to do.

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}

%doc README.md
%dir %{_datadir}/%{name}