]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
manual: Add version information and copyright to manual
authorAlistair Thomas <astavale@yahoo.co.uk>
Fri, 3 Mar 2017 19:11:24 +0000 (19:11 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 12 Mar 2017 13:15:41 +0000 (14:15 +0100)
The documentation is downloaded from the GNOME wiki. So the same copyright
notice is used. The wiki states (c) The GNOME Project at the bottom of each
page. The license for all new documentation is CC-BY-SA 4.0. See
https://wiki.gnome.org/DocumentationProject/Guide/Licensing

configure.ac
doc/manual/.gitignore
doc/manual/Makefile.am
doc/manual/default.css
doc/manual/version.xml.in [new file with mode: 0644]
doc/manual/xhtml.xsl

index 67d649ce9ee9df461df5d0f0cd0c4ef2857def95..030957e463613b474f40bee3f87584c4c47f6c9a 100644 (file)
@@ -113,6 +113,7 @@ AC_CONFIG_FILES([Makefile
            tests/Makefile
            doc/Makefile
            doc/manual/Makefile
+           doc/manual/version.xml
            gobject-introspection/Makefile
            vapigen/vapigen.pc
            vapigen/Makefile
index 34a65b647e5a6c2cf561a5392e4bb977343f6b26..944f5eeeaddb591929c3384edef2783c50dcfe42 100644 (file)
@@ -1,2 +1,3 @@
+version.xml
 html/
 devhelp/
index 7a26f26706fc9e6465e4848a1fe5967682df6c37..08ec8182bb07356077b0c2df2f34d79db80227a0 100644 (file)
@@ -11,26 +11,25 @@ book_DATA = \
 endif
 
 $(builddir)/devhelp/*: devhelp
-devhelp: manual.xml devhelp.xsl xhtml.xsl
+devhelp: manual.xml version.xml devhelp.xsl xhtml.xsl
        @$(MKDIR_P) $@
        $(AM_V_GEN)$(XSLTPROC) \
-               --xinclude $(srcdir)/devhelp.xsl \
-               $(srcdir)/manual.xml \
-               > $(builddir)/devhelp/$(BOOK_NAME).devhelp2
+               --xinclude \
+               --output $@/$(BOOK_NAME).devhelp2 \
+               $(srcdir)/devhelp.xsl \
+               $(srcdir)/manual.xml
        @$(XSLTPROC) \
                --xinclude \
-               --stringparam outdir $@ \
                --output $@/index.html \
                $(srcdir)/xhtml.xsl \
                $(srcdir)/manual.xml
        @cp $(srcdir)/default.css $@
        @touch $@
 
-html: manual.xml xhtml.xsl
+html: manual.xml version.xml xhtml.xsl
        @$(MKDIR_P) $@
        $(AM_V_GEN)$(XSLTPROC) \
                --xinclude \
-               --stringparam outdir $@ \
                --output $@/index.html \
                $(srcdir)/xhtml.xsl \
                $(srcdir)/manual.xml
@@ -41,6 +40,10 @@ mostlyclean-local:
        rm -rf devhelp
        rm -rf html
 
+CLEANFILES = \
+       version.xml \
+       $(NULL)
+
 EXTRA_DIST = \
        common.xsl \
        default.css \
index ee76427f930aab32de3004d20ee648ad4439777a..3c432ccb455c9c5c397cad834c2c3b69cfc20592 100644 (file)
@@ -120,6 +120,14 @@ pre {
        white-space: pre-wrap;
 }
 
+.c-document_version { border: solid 2px #ccc;
+       border-radius: 4px;
+       width: 100%;
+       font-sizde: 95%;
+}
+.c-document_version tr td:first-child { text-align: right; }
+.c-document_version tr:nth-child(odd) { background-color: #f0f0f0; }
+
 blockquote span.literal {
        font-family: monospace;
        font-weight: bold;
diff --git a/doc/manual/version.xml.in b/doc/manual/version.xml.in
new file mode 100644 (file)
index 0000000..e896768
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'>
+<articleinfo>
+<abstract>
+<para>The Vala programming language is a high level language that produces binaries for the native platform. The binaries maintain the C Application Binary Interface (ABI) and so can be built as either an application or a library.</para>
+<para>The Vala Reference Manual gives details on Vala's syntax and type system, including polymorphism using interfaces and type parameters (generics). Vala includes additional code generation routines, for example D-Bus inter-process communication and GTK+3 composite templates, these are only referred to in the Attributes section. The reference manual does not provide a tutorial for these features.</para>
+<para>Vala is developed in a collaborative and self-supporting way by its users. They provide bug reports, documentation, patches, patch reviews and core development. Following this model of development the manual has an editable version at <ulink url="https://wiki.gnome.org/Projects/Vala/Manual">https://wiki.gnome.org/Projects/Vala/Manual</ulink> .</para>
+</abstract>
+<edition>@PACKAGE_SUFFIX@</edition>
+<releaseinfo>@VERSION@
+<remark>Draft, document contains omissions and might contain errors</remark>
+</releaseinfo>
+<copyright><holder>The GNOME Project</holder></copyright>
+<legalnotice><ulink url="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</ulink></legalnotice>
+</articleinfo>
index 43420bc320b595d944207504481111b44ef2d5bd..97338467c84070a36997907237496259ede81f88 100644 (file)
@@ -4,8 +4,9 @@
   version="1.0"
   xmlns:str="http://exslt.org/strings"
   xmlns:exsl="http://exslt.org/common"
+  xmlns:date="http://exslt.org/dates-and-times"
   extension-element-prefixes="exsl"
-  exclude-result-prefixes="str"
+  exclude-result-prefixes="str date"
 >
 
   <xsl:import href="common.xsl"/>
 
   <xsl:template match="article/section" mode="toc">
       <xsl:apply-templates select="title"/>
+      <xsl:apply-templates select="document('version.xml')/articleinfo" mode="toc"/>
       <ul class="toc">
         <xsl:for-each select="section">
           <li>
       <xsl:apply-templates select="section"/>
   </xsl:template>
 
+  <xsl:template match="articleinfo" mode="toc">
+    <xsl:apply-templates select="abstract"/>
+    <table class="c-document_version">
+    <tr><td>Vala version:</td><td><xsl:apply-templates select="str:replace(edition, '-', '')"/></td></tr>
+    <tr><td>Release:</td><td><xsl:apply-templates select="releaseinfo/text()"/></td></tr>
+    <tr><td>Status:</td><td><xsl:apply-templates select="releaseinfo/remark"/></td></tr>
+    <tr><td>Copyright:</td>
+    <td>
+    <xsl:text>&#169;&#32;</xsl:text>
+    <xsl:apply-templates select="copyright/holder"/>
+    <xsl:text>&#32;</xsl:text>
+    <xsl:value-of select="date:year()"/>
+    </td>
+    </tr>
+    <tr><td>License:</td><td><xsl:apply-templates select="legalnotice"/></td></tr>
+    </table>
+  </xsl:template>
+
   <xsl:template match="article/section/section/title">
     <h2><xsl:value-of select="."/></h2>
   </xsl:template>