diff options
-rw-r--r-- | SConstruct | 20 | ||||
-rw-r--r-- | www/index.html.in | 6 | ||||
-rwxr-xr-x | www/upload.in (renamed from www/upload) | 2 |
3 files changed, 17 insertions, 11 deletions
@@ -28,9 +28,15 @@ libgps_minor = 0 libgps_age = 0 # Release identification ends here +# Hosting information (mainly used for templating web pages) begins here +website = "http://catb.org/gpsd" +mainpage = "https://savannah.nongnu.org/projects/gpsd/" +uploadto = "login.ibiblio.org:/public/html/catb/gpsd" +# Hosting information ends here + EnsureSConsVersion(1,2,0) -import copy, os, sys, commands, glob, re, platform +import copy, os, sys, commands, glob, re, platform, time from distutils import sysconfig from distutils.util import get_platform import SCons @@ -969,6 +975,10 @@ def substituter(target, source, env): ('@prefix@', env['prefix']), ('@libdir@', env['libdir']), ('@PYTHON@', sys.executable), + ('@DATE@', time.asctime()), + ('@WEBSITE@', website), + ('@MAINPAGE@',mainpage), + ('@UPLOADTO@',uploadto), ) with open(str(source[0])) as sfp: content = sfp.read() @@ -977,8 +987,8 @@ def substituter(target, source, env): with open(str(target[0]), "w") as tfp: tfp.write(content) -templated = ("packaging/rpm/gpsd.spec.in", "libgps.pc.in", "libgpsd.pc.in", - "jsongen.py.in", "maskaudit.py.in", "valgrind-audit.py.in") +templated = glob.glob("*.in") + glob.glob("www/*.in") + \ + ["packaging/rpm/gpsd.spec.in"] for fn in templated: builder = env.Command(source=fn, target=fn[:-3], action=substituter) @@ -1367,10 +1377,6 @@ if htmlbuilder: # Doesn't capture dependencies on the subpages env.HTML('www/internals.html', '$SRCDIR/doc/explanation.xml') -# The index page -env.Command('www/index.html', 'www/index.html.in', - ['sed -e "/@DATE@/s//`date \'+%B %d, %Y\'`/" <$SOURCE >$TARGET']) - # The hardware page env.Command('www/hardware.html', ['gpscap.py', 'www/hardware-head.html', diff --git a/www/index.html.in b/www/index.html.in index 29bbc4fd..9f59a803 100644 --- a/www/index.html.in +++ b/www/index.html.in @@ -199,8 +199,8 @@ version) rather than the latest released stable version.</p> <h1 id='downloads'>Repository, Downloads and Packages</h1> <dl> -<dt><a href='http://developer.berlios.de/projects/gpsd/'>Project page</a> -<dd>The main project page on Berlios</dd> +<dt><a href='@MAINPAGE@'>Project page</a> +<dd>The main project page</dd> <dt><a href="http://developer.berlios.de/project/showfiles.php?group_id=2116">Releases</a> @@ -551,6 +551,6 @@ Here</a>.</font></td></tr></table></td></tr></table></noscript> <!-- Local Variables: -compile-command: "(cd ..; make website; cd www; scp index.html shell.berlios.de:/home/groups/gpsd/htdocs)" +compile-command: "(cd ..; scons website; cd www; scp index.html '@WEBSITE@')" End: --> diff --git a/www/upload b/www/upload.in index 74de49fd..19069216 100755 --- a/www/upload +++ b/www/upload.in @@ -5,7 +5,7 @@ # # No CGI copy yet, hosting site won't let us send mail # -webdir=login.ibiblio.org:/public/html/catb/gpsd +webdir=@UPLOADTO@ #cgidir=shell.berlios.de:/home/groups/gpsd/cgi-bin # Ensure all derived HTML and checksums are up to date. |