Mystro256 667d842
%global commit ac4555d1f4af4c3755d058a34da126acb9fc58d2
Mystro256 667d842
%global shortcommit ac4555d
Mystro256 667d842
%global gitdate 20180819
Mystro256 70162b0
Mystro256 70162b0
Name:           iyfct
Mystro256 70162b0
Version:        1.0.2
Mystro256 70162b0
Release:        %{gitdate}git.%{shortcommit}%{?dist}
Mystro256 70162b0
Summary:        Side scrolling endless runner game
Mystro256 70162b0
Mystro256 70162b0
#See LICENSE file in source for details
Mystro256 70162b0
#All code are GPLv3
Mystro256 70162b0
#All assets are CC-BY 3.0
Mystro256 70162b0
License:        GPLv3 and CC-BY
Mystro256 70162b0
URL:            https://github.com/SimonLarsen/iyfct
Mystro256 70162b0
Source0:        https://github.com/SimonLarsen/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
Mystro256 70162b0
#Patch for appdata, manpage, execution script, and desktop file
Mystro256 70162b0
Patch0:         %{name}-appdata.patch
Mystro256 70162b0
Mystro256 70162b0
BuildRequires:  desktop-file-utils
Mystro256 70162b0
BuildRequires:  libappstream-glib
Mystro256 70162b0
BuildRequires:  ImageMagick
Mystro256 70162b0
BuildArch:      noarch
Mystro256 70162b0
Requires:       love
Mystro256 70162b0
Mystro256 70162b0
#From README
Mystro256 70162b0
%description
Mystro256 70162b0
The goal of the game is to survive as long as you can.
Mystro256 70162b0
Jump over trains with closed doors and try (as much as possible) to run
Mystro256 70162b0
through trains with open doors to avoid birds and tunnels.
Mystro256 70162b0
Mystro256 70162b0
%prep
Mystro256 70162b0
%autosetup -p1 -n %{name}-%{commit}
Mystro256 70162b0
sed -i 's/VERSION/%{version}/g' appdata/%{name}.6
Mystro256 70162b0
#Strip some formating out of the README
Mystro256 70162b0
sed 's/h[[:digit:]]. //g' README.textile > README
Mystro256 70162b0
Mystro256 70162b0
%build
Mystro256 70162b0
#love "binary" files are just zipped sources, but should exclude appdata/docs
Mystro256 70162b0
zip -r %{name}.love . -x appdata/* -x appdata/ -x LICENSE -x README -x README.textile
Mystro256 70162b0
#Generate icon (based on splash.png)
Mystro256 70162b0
convert gfx/splash.png -crop 128x52+0+0 -background "#ECF3C9" -gravity center -extent 128x128! %{name}.png
Mystro256 70162b0
Mystro256 70162b0
%install
Mystro256 70162b0
#Install love file
Mystro256 70162b0
install -p -D -m 0644 %{name}.love \
Mystro256 70162b0
  %{buildroot}/%{_datadir}/%{name}/%{name}.love
Mystro256 70162b0
#Install execution script
Mystro256 70162b0
install -p -D -m 0755 appdata/%{name} \
Mystro256 70162b0
  %{buildroot}/%{_bindir}/%{name}
Mystro256 70162b0
#Install manpage
Mystro256 70162b0
install -p -D -m 0644 appdata/%{name}.6 \
Mystro256 70162b0
  %{buildroot}/%{_mandir}/man6/%{name}.6
Mystro256 70162b0
#Install appdata.xml and verify
Mystro256 70162b0
install -p -D -m 0644 appdata/%{name}.appdata.xml \
Mystro256 70162b0
  %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
Mystro256 70162b0
appstream-util validate-relax --nonet \
Mystro256 70162b0
  %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
Mystro256 70162b0
#Install desktop, icon:
Mystro256 70162b0
desktop-file-install \
Mystro256 70162b0
  --dir %{buildroot}%{_datadir}/applications \
Mystro256 70162b0
  appdata/%{name}.desktop
Mystro256 70162b0
install -p -D -m 0644 %{name}.png \
Mystro256 70162b0
  %{buildroot}/%{_datadir}/pixmaps/%{name}.png
Mystro256 70162b0
Mystro256 70162b0
%files
Mystro256 70162b0
%license LICENSE
Mystro256 70162b0
%doc README
Mystro256 70162b0
%{_mandir}/man6/%{name}.*
Mystro256 70162b0
%{_bindir}/%{name}
Mystro256 70162b0
%{_datadir}/%{name}/
Mystro256 70162b0
%{_datadir}/pixmaps/%{name}.png
Mystro256 70162b0
%{_datadir}/applications/%{name}.desktop
Mystro256 70162b0
%{_datadir}/appdata/%{name}.appdata.xml
Mystro256 70162b0
Mystro256 70162b0
%changelog
Mystro256 667d842
* Sat Aug 25 2018 Jeremy Newton <alexjnewt at hotmail dot com> - 1.0.2-20180819git.ac4555d
Mystro256 667d842
- Bump snapshot for Love 11 (f29+)
Mystro256 667d842
Mystro256 70162b0
* Thu Aug 23 2018 Jeremy Newton <alexjnewt at hotmail dot com> - 1.0.2-20160510git.7fe93a4
Mystro256 70162b0
- Initial package