From 089c905ebd7e365791112f8a9f1f2a44de5987a1 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 24 Oct 2010 23:06:08 +0100 Subject: Simplify and update webpage creation --- .gitignore | 3 +-- INSTALL | 9 +++++++++ Makefile | 16 ++++++++++------ README | 10 ---------- doap.ttl | 27 +++++++++++++++++++++++++++ screenshot.png | Bin 0 -> 2280 bytes small.png | Bin 0 -> 362 bytes summary.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ web/doap.ttl | 27 --------------------------- web/footer.html | 1 - web/header.html | 16 ---------------- web/index.txt | 37 ------------------------------------- web/screen.png | Bin 2280 -> 0 bytes web/small.png | Bin 362 -> 0 bytes web/summary.sh | 40 ---------------------------------------- webheader.html | 16 ++++++++++++++++ 16 files changed, 107 insertions(+), 139 deletions(-) create mode 100644 INSTALL create mode 100644 doap.ttl create mode 100644 screenshot.png create mode 100644 small.png create mode 100644 summary.sh delete mode 100644 web/doap.ttl delete mode 100644 web/footer.html delete mode 100644 web/header.html delete mode 100644 web/index.txt delete mode 100644 web/screen.png delete mode 100644 web/small.png delete mode 100644 web/summary.sh create mode 100644 webheader.html diff --git a/.gitignore b/.gitignore index 34b5629..f7aa3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *.o spout -web/index.html -web/releases +index.html diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..1faf38a --- /dev/null +++ b/INSTALL @@ -0,0 +1,9 @@ +Dependencies +------------ + +* libSDL + +Install +------- + +Edit config.mk to your liking, then run 'make install' diff --git a/Makefile b/Makefile index e3cc21b..a97a441 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ OBJ = $(SRC:.c=.o) MAN = $(TARGETS:=.1) HEADERS = spout.h config.def.h font.h sintable.h -WEB = web/index.html +WEB = index.html include config.mk @@ -28,13 +28,17 @@ config.h: @echo creating $@ from config.def.h @cp config.def.h $@ -$(WEB): web/index.txt web/header.html web/footer.html web/doap.ttl +$(WEB): README webheader.html doap.ttl @echo making webpage - @cat web/header.html > $@ - @sed 's/VERSION/$(VERSION)/g' < web/index.txt | smu >> $@ + @cat webheader.html > $@ + @sed 5q < README | smu >> $@ + @echo '![Screenshot of Spout](screenshot.png)' | smu >> $@ + @echo '

Download Spout $(VERSION)
' >> $@ + @echo 'GPG signature

' >> $@ + @sed '1,6d' < README | smu >> $@ @echo '
' >> $@ - @sh web/summary.sh web/doap.ttl | smu >> $@ - @cat web/footer.html >> $@ + @sh summary.sh doap.ttl | smu >> $@ + @echo '' >> $@ clean: rm -f -- $(TARGETS) $(WEB) $(OBJ) $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION).tar.bz2.sig diff --git a/README b/README index 91bc43c..9e3c017 100644 --- a/README +++ b/README @@ -4,16 +4,6 @@ Spout Spout is a simple caveflying game. The aim is to get as high as possible, avoiding or destroying obstacles. -Requirements ------------- - -* libSDL - -Install -------- - -Edit config.mk to your liking, then run 'make install' - Controls -------- diff --git a/doap.ttl b/doap.ttl new file mode 100644 index 0000000..3957c24 --- /dev/null +++ b/doap.ttl @@ -0,0 +1,27 @@ +@prefix rdf: . +@prefix doap: . +@prefix foaf: . +@prefix : . + +:p a doap:Project; + doap:name "Spout"; + doap:shortdesc "A simple caveflying game"; + doap:description "Spout is a simple caveflying game. The aim is to get as high as possible avoiding or destroying obstacles."; + doap:homepage ; + doap:repository :repo; + doap:programming-language "C"; + doap:license ; + doap:release :v1.4; + doap:maintainer . + + a foaf:Person; + foaf:name "Nick White"; + foaf:homepage . + +:repo a doap:GitRepository; + doap:location . + +:v1.4 a doap:Version; + doap:revision "1.4"; + doap:created "2010-10-24"; + doap:file-release . diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..6a20078 Binary files /dev/null and b/screenshot.png differ diff --git a/small.png b/small.png new file mode 100644 index 0000000..39e79a6 Binary files /dev/null and b/small.png differ diff --git a/summary.sh b/summary.sh new file mode 100644 index 0000000..c274443 --- /dev/null +++ b/summary.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +test $# -ne 1 && echo "usage: $0 doap" && exit 1 + +rdf="$1" + +q="PREFIX doap: +PREFIX foaf: +SELECT ?home ?repo ?license ?maintainer ?maintainerhome ?lang ?repotype +WHERE { +?p a doap:Project; + doap:homepage ?home; + doap:repository ?r; + doap:license ?license; + doap:programming-language ?lang; + doap:maintainer ?m. +?r a ?repotype; + doap:location ?repo. +?m foaf:name ?maintainer; + foaf:homepage ?maintainerhome. +}" + +roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \ +| while read r; do + home=`echo $r | awk -F , '{print $2}'| sed -e 's/uri(\(.*\))/\1/'` + repo=`echo $r | awk -F , '{print $3}'| sed -e 's/uri(\(.*\))/\1/'` + licenseuri=`echo $r | awk -F , '{print $4}'| sed -e 's/uri(\(.*\))/\1/'` + maint=`echo $r | awk -F , '{print $5}'| sed -e 's/"\(.*\)"/\1/'` + mainthome=`echo $r | awk -F , '{print $6}'| sed -e 's/uri(\(.*\))/\1/'` + lang=`echo $r | awk -F , '{print $7}'| sed -e 's/"\(.*\)"/\1/'` + test "$licenseuri" = "http://www.gnu.org/licenses/gpl.html" && license="GPL" + test "$licenseuri" = "http://www.gnu.org/licenses/agpl.html" && license="AGPL" + test "$licenseuri" = "http://creativecommons.org/licenses/MIT/" && license="MIT" + repotype=`echo $r | awk -F , '{print $8}'| sed -e 's/uri(\(.*\))/\1/'` + test "$repotype" = "http://usefulinc.com/ns/doap#GitRepository" && repocmd="git clone" + + cat <<- _EOF_ +- Project homepage: [$home]($home) +- Code repository: $repocmd $repo +- Maintainer: [$maint]($mainthome) +- Language: $lang +- License: [$license]($licenseuri) +_EOF_ +done diff --git a/web/doap.ttl b/web/doap.ttl deleted file mode 100644 index b15337f..0000000 --- a/web/doap.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rdf: . -@prefix doap: . -@prefix foaf: . -@prefix : . - -:p a doap:Project; - doap:name "Spout"; - doap:shortdesc "A simple caveflying game"; - doap:description "Spout is a simple caveflying game. The aim is to get as high as possible avoiding or destroying obstacles."; - doap:homepage ; - doap:repository :repo; - doap:programming-language "C"; - doap:license ; - doap:release :v1.4; - doap:maintainer . - - a foaf:Person; - foaf:name "Nick White"; - foaf:homepage . - -:repo a doap:GitRepository; - doap:location . - -:v1.4 a doap:Version; - doap:revision "1.4"; - doap:created "2010-10-24"; - doap:file-release . diff --git a/web/footer.html b/web/footer.html deleted file mode 100644 index 62b274f..0000000 --- a/web/footer.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/web/header.html b/web/header.html deleted file mode 100644 index fed7a0b..0000000 --- a/web/header.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Spout - A simple caveflying game - diff --git a/web/index.txt b/web/index.txt deleted file mode 100644 index 1217b91..0000000 --- a/web/index.txt +++ /dev/null @@ -1,37 +0,0 @@ -Spout -======================================================================= - -About ------ - -Spout is a simple caveflying game. The aim is to get as high as -possible avoiding or destroying obstacles. - -![Screenshot of Spout](screen.png) - -It should work on any *nix system with SDL libraries installed. - -Spout is free software released under the terms of the MIT license. - -### [Download Spout 1.4](releases/spout-VERSION.tar.bz2) -### ([GPG signature](releases/spout-VERSION.tar.bz2.sig)) - -History -------- - -Spout was originally written for a handheld by kuni, and soon -afterwards was ported to Windows using cygwin and sdl and released -under the MIT license. - -In 2004 a 'unix version' was released, which mostly just slapped -autotools into the windows version and infringed the license. - -This is a new unix version, based on the original Windows code by -kuni, which aims to add useful features and simplify the code. - -Development ------------ - -Please send any patches, bugs or general thoughts to me by -[email](http://njw.me.uk/contact). A list of current issues to -work on can be found in the TODO file in the repository. diff --git a/web/screen.png b/web/screen.png deleted file mode 100644 index 6a20078..0000000 Binary files a/web/screen.png and /dev/null differ diff --git a/web/small.png b/web/small.png deleted file mode 100644 index 39e79a6..0000000 Binary files a/web/small.png and /dev/null differ diff --git a/web/summary.sh b/web/summary.sh deleted file mode 100644 index ef58225..0000000 --- a/web/summary.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -test $# -ne 1 && echo "usage: $0 doap" && exit 1 - -rdf="$1" - -q="PREFIX doap: -PREFIX foaf: -SELECT ?home ?repo ?license ?maintainer ?maintainerhome ?lang -WHERE { -?p a doap:Project; - doap:homepage ?home; - doap:repository ?r; - doap:license ?license; - doap:programming-language ?lang; - doap:maintainer ?m. -?r doap:location ?repo. -?m foaf:name ?maintainer; - foaf:homepage ?maintainerhome. -}" - -roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \ -| while read r; do - home=`echo $r | awk -F , '{print $2}'| sed -e 's/uri(\(.*\))/\1/'` - repo=`echo $r | awk -F , '{print $3}'| sed -e 's/uri(\(.*\))/\1/'` - licenseuri=`echo $r | awk -F , '{print $4}'| sed -e 's/uri(\(.*\))/\1/'` - maint=`echo $r | awk -F , '{print $5}'| sed -e 's/"\(.*\)"/\1/'` - mainthome=`echo $r | awk -F , '{print $6}'| sed -e 's/uri(\(.*\))/\1/'` - lang=`echo $r | awk -F , '{print $7}'| sed -e 's/"\(.*\)"/\1/'` - test "$licenseuri" = "http://www.gnu.org/licenses/gpl.html" && license="GPL" - test "$licenseuri" = "http://creativecommons.org/licenses/MIT/" && license="MIT" - - cat <<- _EOF_ -- Project homepage: [$home]($home) -- Code repository: [$repo]($repo) -- Maintainer: [$maint]($mainthome) -- Language: $lang -- License: [$license]($licenseuri) -_EOF_ -done diff --git a/webheader.html b/webheader.html new file mode 100644 index 0000000..fed7a0b --- /dev/null +++ b/webheader.html @@ -0,0 +1,16 @@ + + + +Spout - A simple caveflying game + -- cgit v1.2.3