%global githash 84c2c9672181e7ef6b9dd573cf4be301d7a77691 %global shortcommit %(c=%{githash}; echo ${c:0:7}) Name: orthorobot Version: 1.1 Release: 3%{?dist} Summary: A perspective based puzzle game License: WTFPL URL: http://stabyourself.net/orthorobot/ Source0: https://github.com/Stabyourself/%{name}/archive/%{githash}.tar.gz#/%{name}-%{shortcommit}.tar.gz #Source1 is a copy of the license, straight from wtfpl.net Source1: http://www.wtfpl.net/txt/copying #Patch for appdata, manpage, execution script, and desktop file Patch0: %{name}-%{version}-appdata.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildArch: noarch Requires: love #From the website (see URL above) %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. This game is made with LOVE. %prep %setup -q -n %{name}-%{githash} %patch0 -p1 #Fix line encoding for license file: sed 's/\r$//' %{SOURCE1} > ./LICENSE %build #love "binary" files are just zipped sources, but should exclude appdata zip -r %{name}.love . -x appdata %install #Install love file install -p -D -m 0644 %{name}.love \ %{buildroot}/%{_datadir}/%{name}/%{name}.love #Install execution script install -p -D -m 0755 appdata/%{name} \ %{buildroot}/%{_bindir}/%{name} #Install manpage install -p -D -m 0644 appdata/%{name}.6 \ %{buildroot}/%{_mandir}/man6/%{name}.6 #Install appdata.xml and verify install -p -D -m 0644 appdata/%{name}.appdata.xml \ %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml appstream-util validate-relax --nonet \ %{buildroot}/%{_datadir}/appdata/*.appdata.xml #Install desktop, icon: desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ appdata/%{name}.desktop install -p -D -m 0644 helpplayer.png \ %{buildroot}/%{_datadir}/pixmaps/%{name}.png %files %doc LICENSE %{_mandir}/man6/%{name}.* %{_bindir}/%{name} %{_datadir}/%{name}/ %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/*.appdata.xml %changelog * Mon Feb 22 2016 Jeremy Newton - 1.1-3 - Adding appdata and basic manpage via patch - Moving desktop and script to appdata patch * Fri Feb 19 2016 Jeremy Newton - 1.1-2 - Adding license file - Fixing source0 - Generate desktop file similar to the execution script - Forgot to exclude zipping the execution script - Removed duplicate package file * Mon Nov 30 2015 Jeremy Newton - 1.1-1 - Initial package