]> granicus.if.org Git - docbook-dsssl/commitdiff
Prepare to support freshmeat-submit for next release
authorNorman Walsh <ndw@nwalsh.com>
Wed, 17 Dec 2003 14:57:33 +0000 (14:57 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 17 Dec 2003 14:57:33 +0000 (14:57 +0000)
xsl/Makefile
xsl/VERSION

index 1c870a09ae59372c4142e8ad4fa897c8ffd1e415..26c3c0226f2ea75b73f37e3767812bf1b7063497 100644 (file)
@@ -4,6 +4,9 @@ CVS2LOG=../cvstools/cvs2log
 NEXTVER=
 DIFFVER=
 ZIPVER=
+RELVER := $(shell grep "<fm:Version" VERSION | sed "s/ *<\/\?fm:Version>//g")
+CVSCHECK := $(shell cvs -n update 2>&1 | grep -v ^cvs | cut -c3-)
+SFRELID=
 
 DIRS=common html fo extensions htmlhelp javahelp
 
@@ -41,12 +44,19 @@ else
 endif
 
 newversion:
-ifeq ($(NEXTVER),)
-       $(NEXTVERSION)
+ifeq ($(CVSCHECK),)
+ifeq ($(NEXTVER),$(RELVER))
+       $(MAKE) DIFFVER=$(DIFFVER) distrib
 else
-       $(NEXTVERSION) -v $(NEXTVER)
+       @echo "VERSION $(RELVER) doesn't match specified version $(NEXTVER)."
 endif
-       make DIFFVER=$(DIFFVER) distrib
+else
+       @echo "CVS is not up-to-date! ($(CVSCHECK))"
+endif
+
+freshmeat:
+       $(XSLT) VERSION VERSION /tmp/fm-docbook-xsl sf-relid=$(SFRELID)
+       grep -v "<?xml" /tmp/fm-docbook-xsl | freshmeat-submit -N
 
 zip:
 ifeq ($(ZIPVER),)
index a49bd07f6d950ad5a151252fc880a565c57cfb06..dcce273b55c2b92e1302fff01ea151b736c37830 100644 (file)
@@ -1,6 +1,81 @@
-<?xml version='1.0'?>
+<?xml version='1.0'?> <!-- -*- nxml -*- -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
+               xmlns:sf="http://sourceforge.net/"
+               exclude-result-prefixes="fm sf"
                 version='1.0'>
-<xsl:param name="VERSION">1.64.0</xsl:param>
-</xsl:stylesheet>
 
+<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
+<xsl:param name="sf-relid" select="0"/>
+<xsl:strip-space elements="fm:*"/>
+
+<fm:project>
+  <fm:Project>DocBook</fm:Project>
+  <fm:Branch>DocBook XSL Stylesheets</fm:Branch>
+  <fm:Version>1.64.1</fm:Version>
+  <fm:Release-Focus>
+  <!-- initial freshmeat announcement -->
+  <!-- documentation -->
+  <!-- code cleanup -->
+  <!-- minor feature enhancements -->
+  <!-- major feature enhancements -->
+  minor bugfixes
+  <!-- major bugfixes -->
+  <!-- minor security fixes -->
+  <!-- major security fixes -->
+  </fm:Release-Focus>
+  <fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL>
+  <fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
+  <fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.zip?download</fm:Zipped-Tar-URL>
+  <fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL>
+  <fm:CVS-URL>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/xsl/</fm:CVS-URL>
+  <fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
+  <fm:Changes>Describe changes
+</fm:Changes>
+</fm:project>
+
+<xsl:template match="/" priority="-100">
+  <xsl:if test="$sf-relid = 0">
+    <xsl:message terminate="yes">
+      <xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
+    </xsl:message>
+  </xsl:if>
+
+  <xsl:apply-templates select="//fm:project"/>
+</xsl:template>
+
+<xsl:template match="fm:project">
+  <xsl:text>&#10;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:apply-templates select="fm:Changes" mode="text"/>
+</xsl:template>
+
+<xsl:template match="fm:Changes"/>
+
+<xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="substring-before(., '{VERSION}')"/>
+  <xsl:value-of select="$VERSION"/>
+  <xsl:value-of select="substring-after(., '{VERSION}')"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="fm:Changelog-URL">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="substring-before(., '{SFRELID}')"/>
+  <xsl:value-of select="$sf-relid"/>
+  <xsl:value-of select="substring-after(., '{SFRELID}')"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="fm:*">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="normalize-space(.)"/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>