[Pkg-jed-commit] [SCM] www branch, master, updated. 49bac2bb7e8e058a4c5836c03865d5571678eb40

Rafael Laboissiere rafael at debian.org
Sun Apr 26 14:26:58 UTC 2009


The following commit has been merged in the master branch:
commit b4703846cca98525fd857ca7bf5b5de839218405
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sun Apr 26 14:57:27 2009 +0200

    Adapt for using Git instead of SVN
    
    File index.html is now built from index.html.in and the necessary code for
    doing keyword ($Author$ and $Date$) substitution, which is not implemented
    in Git.  Also the SVN commands are dropped from the Makefile at the install
    rule.

diff --git a/Makefile b/Makefile
index 861227d..1187430 100644
--- a/Makefile
+++ b/Makefile
@@ -2,23 +2,24 @@
 #
 # Written by Rafael Laboissiere <rafael at debian.org>
 # Improved by Jörg Sommer <joerg at alea.gnuu.de>
-# $Id$
 
 GROUP = pkg-jed
 HOST = alioth.debian.org
 DIR = /org/alioth.debian.org/chroot/home/groups/pkg-jed/htdocs/
-SVNFILES = index.html DJG-Guidelines.txt earth.png djg.css	\
-	 guidelines.css Makefile 
-INSTALLFILES =  $(SVNFILES) DJG-Guidelines.html DJG-Guidelines.pdf
+INSTALLFILES = index.html DJG-Guidelines.txt earth.png djg.css	\
+	 guidelines.css DJG-Guidelines.html DJG-Guidelines.pdf
 
 install: $(INSTALLFILES)
-	svn ci $(SVNFILES)
-	svn up
 	@echo -n "Installing web site... "
 	@tar c --mode 664 $(INSTALLFILES) | \
 	  ssh $(HOST) 'cd $(DIR); umask 12; sg $(GROUP) -c "tar x"'
 	@echo done
 
+index.html: index.html.in
+	author=$$(git log $< | perl -ne 'if (/^Author: /) {/Author: ([^<]+) </; print "$$1\n"; last}') ; \
+	date=$$(git log $< | perl -ne 'if (/^Date: /) {/Date:\s+(.*)/; print "$$1\n"; last}') ; \
+	sed "s/\\\$$Date\\\$$/$$date/;s/\\\$$Author\\\$$/$$author/" < $< > $@
+
 %.html: %.txt guidelines.css
 	rst2html --no-toc-backlinks --stylesheet=guidelines.css \
 		--link-stylesheet $< $@
@@ -27,6 +28,6 @@ install: $(INSTALLFILES)
 	py.rest --topdf $<
 
 clean:
-	rm -f DJG-Guidelines.html *.pdf
+	rm -f *.html *.pdf
 
 .PHONY: install clean
diff --git a/index.html b/index.html.in
similarity index 100%
rename from index.html
rename to index.html.in

-- 
www



More information about the Pkg-jed-commit mailing list