File orthorobot.spec of Package orthorobot

#
# spec file for package orthorobot
#
# 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:           orthorobot
Version:        1.1.1
Release:        0
Summary:        A perspective based puzzle game
License:        Zlib
Group:          Amusements/Games/Action/Arcade
Url:            http://stabyourself.net/orthorobot/
Source:         https://github.com/Stabyourself/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  zip
Requires:       love >= 0.9.2
BuildArch:      noarch

%description
Literally bridging the gap between 2D and 3D games, Ortho Robot is a perspective
based puzzle game, where you flatten the view to move across gaps. Your
objective is to reach the ending green block (either by standing directly on it
or standing on it in relative space). For some extra challenge, try to collect
all coins and perfect your time, steps and number of warps.

%prep
%setup -q

# Create launcher file
echo -e "#!/bin/sh\nexec love %{_datadir}/%{name}/%{name}.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 . -exec touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" {} + -print | sort)
zip %{name}.love ${files}

%build
# Nothing to do

%install
install -D -m 0644 %{name}.love %{buildroot}%{_datadir}/%{name}/%{name}.love
install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}

%files
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}/

%changelog
openSUSE Build Service is sponsored by