Name: mrrescue
Version: 1.02e
Release: 8%{?dist}
Summary: Arcade-style fire fighting game
#See LICENSE file in source for details
#All code is zlib, excluding slam, AnAL and TSerial, which are MIT
#All assets are CC-BY-SA
License: zlib and CC-BY-SA and MIT
URL: http://tangramgames.dk/games/mrrescue
Source0: https://github.com/SimonLarsen/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
#Patch for appdata, manpage, execution script, and desktop file
Patch0: %{name}-appdata.patch
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: ImageMagick
BuildArch: noarch
Requires: love
# List the arches that love builds on prior to f28
%if 0%{?fedora} < 28
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 ppc64
%endif
#From the website (see URL above)
%description
Mr. Rescue is an arcade styled 2d action game centered around evacuating
civilians from burning buildings. The game features fast paced fire
extinguishing action, intense boss battles, a catchy soundtrack and lots of
throwing people around in pseudo-randomly generated buildings.
%prep
%autosetup -p1
sed -i 's/VERSION/%{version}/g' appdata/%{name}.6
%build
#love "binary" files are just zipped sources, but should exclude appdata/docs
zip -r %{name}.love . -x appdata/* -x appdata/ -x LICENSE -x README.md
#Generate icon (modified splash.png)
convert data/splash.png -crop 256x205+0+0 -background none -gravity center -extent 256x256! %{name}.png
%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 %{name}.png \
%{buildroot}/%{_datadir}/pixmaps/%{name}.png
%files
%doc README.md
%license LICENSE
%{_mandir}/man6/%{name}.*
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/*.appdata.xml
%changelog
* Mon Mar 19 2018 Jeremy Newton <alexjnewt at hotmail dot com> - 1.02e-8
- Remove more unnecessary files from love binary
* Sat Mar 17 2018 Jeremy Newton <alexjnewt at hotmail dot com> - 1.02e-7
- Add ppc64le build for f28+
- Add README.md to docs
- Remove docs from love binary
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.02e-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.02e-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.02e-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Dec 22 2016 Jeremy Newton <alexjnewt at hotmail dot com> - 1.02e-3
- More Appdata fixes
* Wed Nov 23 2016 Jeremy Newton <alexjnewt at hotmail dot com> - 1.02e-2
- Appdata fixes
* Sun Nov 20 2016 Jeremy Newton <alexjnewt at hotmail dot com> - 1.02e-1
- Initial package