]> granicus.if.org Git - docbook-dsssl/commitdiff
Reworking builds; support freshmeat target
authorNorman Walsh <ndw@nwalsh.com>
Mon, 22 Dec 2003 15:03:15 +0000 (15:03 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 22 Dec 2003 15:03:15 +0000 (15:03 +0000)
slides/Makefile
slides/VERSION

index 1409ad48772abb8c2abb66518dc2393ad427c52e..3ab1ef60dd72d912a69098b05102273c2a079ec4 100644 (file)
@@ -1,7 +1,14 @@
 include ../cvstools/Makefile.incl
-ZIPVER=
-DIFFVER=
+
+CVS2LOG=../cvstools/cvs2log
 NEXTVER=
+DIFFVER=
+ZIPVER=
+CVSCHECK := $(shell cvs -n update 2>&1 | grep -v ^cvs | cut -c3-)
+RELVER := $(shell grep "<fm:Version" VERSION | sed "s/ *<\/\?fm:Version>//g")
+TAGVER := $(shell echo "V$(RELVER)" | sed "s/\.//g")
+SFRELID=
+FMGO=-N
 
 all:
        $(MAKE) -C schema
@@ -15,13 +22,6 @@ check:
 test: check
        $(SAXON) test.xml xsl/slides.xsl
 
-#doc:
-#      perl /projects/src/dtdparse/dtdparse.pl \
-#              --title "Slides" --output slides.xml \
-#              --decl /usr/lib/sgml/declaration/xml.dcl \
-#              --nounexpanded slides.dtd
-#      dtdformat --html slides.xml
-
 distrib: check
        $(MAKE) -C doc all
        $(CVS2LOG) -w
@@ -32,12 +32,28 @@ else
 endif
 
 newversion:
-ifeq ($NEXTVER),)
-       $(NEXTVERSION)
+ifeq ($(CVSCHECK),)
+ifeq ($(DIFFVER),)
+       @echo "DIFFVER must be specified."
+else
+ifeq ($(NEXTVER),$(RELVER))
+       cvs tag $(TAGVER)
+       $(MAKE) DIFFVER=$(DIFFVER) distrib
+else
+       @echo "VERSION $(RELVER) doesn't match specified version $(NEXTVER)."
+endif
+endif
+else
+       @echo "CVS is not up-to-date! ($(CVSCHECK))"
+endif
+
+freshmeat:
+ifeq ($(SFRELID),)
+       @echo "You must specify the sourceforge release identifier in SFRELID"
 else
-       $(NEXTVERSION) -v $(NEXTVER)
+       $(XSLT) VERSION VERSION /tmp/fm-docbook-slides sf-relid=$(SFRELID)
+       grep -v "<?xml" /tmp/fm-docbook-slides | freshmeat-submit $(FMGO)
 endif
-       make distrib
 
 zip:
 ifeq ($(ZIPVER),)
index a4f52a5dbb5a6ad929239d21c3c77812a5862540..ad9da11405322d9b09831f33f9df030f64cce7a9 100644 (file)
@@ -1 +1,110 @@
-3.2.0
\ No newline at end of file
+<?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="SLIDES-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>Slides</fm:Branch>
+  <fm:Version>3.3.0</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/slides-{VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
+  <fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/slides-{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/slides/</fm:CVS-URL>
+  <fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
+  <fm:Changes>This is an experimental release. It includes many
+patches and enhancements, updated browser JavaScript, and is now
+based on Simplified DocBook V1.1b1 which is based on DocBook XML
+V4.3CR2.
+</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:*">
+  <xsl:value-of select="local-name(.)"/>
+  <xsl:text>: </xsl:text>
+  <xsl:call-template name="value">
+    <xsl:with-param name="text" select="normalize-space(.)"/>
+  </xsl:call-template>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template name="value">
+  <xsl:param name="text"/>
+
+  <xsl:variable name="sub-version">
+    <xsl:call-template name="string.subst">
+      <xsl:with-param name="string" select="$text"/>
+      <xsl:with-param name="target" select="'{VERSION}'"/>
+      <xsl:with-param name="replacement" select="$SLIDES-VERSION"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:call-template name="string.subst">
+    <xsl:with-param name="string" select="$sub-version"/>
+    <xsl:with-param name="target" select="'{SFRELID}'"/>
+    <xsl:with-param name="replacement" select="$sf-relid"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="string.subst">
+  <xsl:param name="string"/>
+  <xsl:param name="target"/>
+  <xsl:param name="replacement"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($string, $target)">
+      <xsl:variable name="rest">
+        <xsl:call-template name="string.subst">
+          <xsl:with-param name="string" select="substring-after($string, $target)"/>
+          <xsl:with-param name="target" select="$target"/>
+          <xsl:with-param name="replacement" select="$replacement"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="concat(substring-before($string, $target),
+                                   $replacement,
+                                   $rest)"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$string"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>