diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..16e5a27 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/iyfct-7fe93a4.tar.gz diff --git a/iyfct-appdata.patch b/iyfct-appdata.patch new file mode 100644 index 0000000..4fc6637 --- /dev/null +++ b/iyfct-appdata.patch @@ -0,0 +1,93 @@ +--- a/appdata/iyfct ++++ b/appdata/iyfct +@@ -0,0 +1,13 @@ ++#!/bin/sh ++if [ $# -ne 0 ] ++then ++ if [ "$1" == "-h" ]||[ "$1" == "--help" ] ++ then ++ man 6 iyfct ++ exit ++ fi ++ echo "Invalid option(s): $*" 1>&2 ++ echo Usage: `basename $0` [-h] 1>&2 ++ exit 1 ++fi ++love /usr/share/iyfct/iyfct.love +--- a/appdata/iyfct.6 ++++ b/appdata/iyfct.6 +@@ -0,0 +1,29 @@ ++.TH iyfct 6 "VERSION" "In Your Face City Trains" ++.SH NAME ++iyfct - In Your Face City Trains v VERSION ++.SH SYNOPSIS ++Side scrolling endless runner game ++.SH INSTRUCTIONS ++The goal of the game is to survive as long as you can. ++Jump over trains with closed doors and try (as much as possible) to run ++through trains with open doors to avoid birds and tunnels. Some open trains ++will give you coffee. When your coffee-meter is full, you have one extra life. ++.SH CONTROLS ++.IP Space ++Jump ++.IP R ++Restart ++.IP 1-4,F1-F4 ++Set zoom ++.IP P ++Pause game ++.IP M ++Mute sound ++.SH DESCRIPTION ++This game is made with LOVE. You can find more games and ++information about the author(s) at http://tangramgames.dk/ ++.SH OPTIONS ++.BR \-h ", " \-\-help ++Show manpage. ++.SH SEE ALSO ++.BR love(6) +--- a/appdata/iyfct.appdata.xml ++++ b/appdata/iyfct.appdata.xml +@@ -0,0 +1,31 @@ ++ ++ ++ iyfct.desktop ++ CC-BY-SA ++ GPL-3.0 ++ In Your Face City Trains ++ Side scrolling endless runner game ++ ++

++ The goal of the game is to survive as long as you can. ++ Jump over trains with closed doors and try (as much as possible) to run ++ through trains with open doors to avoid birds and tunnels. Some open trains ++ will give you coffee. When your coffee-meter is full, you have one extra life. ++

++

++ Space: Jump ++ R: Restart ++ 1-4 or F1-F4: Set zoom ++ P: Pause game ++ M: Mute sound ++

++
++ ++ ++ https://love2d.org/w/images/7/7f/iyfct.png ++ Example gameplay ++ ++ ++ https://github.com/SimonLarsen/iyfct ++ https://github.com/SimonLarsen/iyfct/issues ++
+--- a/appdata/iyfct.desktop ++++ b/appdata/iyfct.desktop +@@ -0,0 +1,8 @@ ++[Desktop Entry] ++Name=In Your Face City Trains ++Comment=Side scrolling endless runner game ++Exec=iyfct ++Type=Application ++Categories=Game;ArcadeGame; ++Terminal=false ++Icon=iyfct diff --git a/iyfct.spec b/iyfct.spec new file mode 100644 index 0000000..3b1938d --- /dev/null +++ b/iyfct.spec @@ -0,0 +1,77 @@ +%global commit 7fe93a494d4a3addd590585a9241a098e3faa509 +%global shortcommit 7fe93a4 +%global gitdate 20160510 + +Name: iyfct +Version: 1.0.2 +Release: %{gitdate}git.%{shortcommit}%{?dist} +Summary: Side scrolling endless runner game + +#See LICENSE file in source for details +#All code are GPLv3 +#All assets are CC-BY 3.0 +License: GPLv3 and CC-BY +URL: https://github.com/SimonLarsen/iyfct +Source0: https://github.com/SimonLarsen/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.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 + +#From README +%description +The goal of the game is to survive as long as you can. +Jump over trains with closed doors and try (as much as possible) to run +through trains with open doors to avoid birds and tunnels. + +%prep +%autosetup -p1 -n %{name}-%{commit} +sed -i 's/VERSION/%{version}/g' appdata/%{name}.6 +#Strip some formating out of the README +sed 's/h[[:digit:]]. //g' README.textile > README + +%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 -x README.textile +#Generate icon (based on splash.png) +convert gfx/splash.png -crop 128x52+0+0 -background "#ECF3C9" -gravity center -extent 128x128! %{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/%{name}.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 +%license LICENSE +%doc README +%{_mandir}/man6/%{name}.* +%{_bindir}/%{name} +%{_datadir}/%{name}/ +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/applications/%{name}.desktop +%{_datadir}/appdata/%{name}.appdata.xml + +%changelog +* Thu Aug 23 2018 Jeremy Newton - 1.0.2-20160510git.7fe93a4 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..8e06fef --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (iyfct-7fe93a4.tar.gz) = 4246da1876e824e0e940c164f0ea53f4c97ec6abb3596acab58f79d9b4292cf14ae1b260c06d47daf73d5e33b4d21bc749ffb15001d5652214c94f5063754675