[29265] trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 19 13:21:29 PDT 2007
Revision: 29265
http://trac.macosforge.org/projects/macports/changeset/29265
Author: simon at macports.org
Date: 2007-09-19 13:21:29 -0700 (Wed, 19 Sep 2007)
Log Message:
-----------
Copied the new guide from /trunk/doc to /trunk/doc-new.
Added new directory "man" which stores the new docbook xml man files.
Added new Makefile which generates the guide and the man files.
Added Paths:
-----------
trunk/doc-new/
trunk/doc-new/Makefile
trunk/doc-new/README
trunk/doc-new/guide/
trunk/doc-new/man/
trunk/doc-new/man/resources/
trunk/doc-new/man/resources/macports.xsl
trunk/doc-new/man/xml/
Added: trunk/doc-new/Makefile
===================================================================
--- trunk/doc-new/Makefile (rev 0)
+++ trunk/doc-new/Makefile 2007-09-19 20:21:29 UTC (rev 29265)
@@ -0,0 +1,53 @@
+# $Id$
+# Makefile to generate the macports html guide and the man pages.
+# The ports 'docbook-xsl' and 'docbook-xml' have to be installed.
+
+# If your macports isn't installed in /opt/local you have to change PREFIX
+# here and update resources/macports.xsl to use your port installation!
+
+
+# prefix of the macports installation:
+PREFIX ?= /opt/local
+
+# data directories:
+GUIDE ?= guide
+MAN ?= man
+# result directories:
+GUIDE-RESULT ?= $(GUIDE)/html
+MAN-RESULT ?= $(MAN)/man
+
+# path to the docbook xsl files:
+DOCBOOK ?= $(PREFIX)/share/xsl/docbook-xsl
+GUIDE-XSL ?= $(DOCBOOK)/xhtml/profile-docbook.xsl
+MAN-XSL ?= $(MAN)/resources/macports.xsl
+
+# docbook html stylesheet for the guide:
+STYLESHEET ?= docbook.css
+# additional parameters for the guide:
+STRINGPARAMS ?= --stringparam html.stylesheet $(STYLESHEET) \
+ --stringparam section.autolabel 1 \
+ --stringparam toc.section.depth 1 \
+ --stringparam generate.toc "book toc" \
+ --stringparam section.label.includes.component.label 1 \
+ --stringparam profile.condition "noman"
+
+
+.PHONY: all guide man clean
+
+all: guide man
+
+guide:
+ mkdir -p $(GUIDE-RESULT)
+ cp $(GUIDE)/resources/$(STYLESHEET) $(GUIDE-RESULT)/$(STYLESHEET)
+ cp $(GUIDE)/resources/images/* $(GUIDE-RESULT)/
+ xsltproc --xinclude $(STRINGPARAMS) --output $(GUIDE-RESULT)/guide.html \
+ $(GUIDE-XSL) $(GUIDE)/xml/guide.xml
+
+man:
+ mkdir -p $(MAN-RESULT)
+ xsltproc --output $(MAN-RESULT)/portfile.7 \
+ $(MAN-XSL) $(MAN)/xml/portfile.7.xml
+
+clean:
+ rm -rf $(GUIDE-RESULT)
+ rm -rf $(MAN-RESULT)
Property changes on: trunk/doc-new/Makefile
___________________________________________________________________
Name: svn:keywords
+ Id
Added: trunk/doc-new/README
===================================================================
--- trunk/doc-new/README (rev 0)
+++ trunk/doc-new/README 2007-09-19 20:21:29 UTC (rev 29265)
@@ -0,0 +1,8 @@
+This is the macports documentation directory.
+
+To generate it you have to checkout the whole "trunk/doc-new" directory and
+you need the "docbook-xsl" and "docbook-xml" ports. If your port installation
+isn't in /opt/local look at "Makefile" how you have to change this setup.
+
+To generate the guide and the man pages just use "make" in this directory.
+Then they are generated in guide/html and man/man.
Copied: trunk/doc-new/guide (from rev 29252, trunk/doc/guide/new)
Added: trunk/doc-new/man/resources/macports.xsl
===================================================================
--- trunk/doc-new/man/resources/macports.xsl (rev 0)
+++ trunk/doc-new/man/resources/macports.xsl 2007-09-19 20:21:29 UTC (rev 29265)
@@ -0,0 +1,54 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- load the man page xsl file so it can be modified: -->
+<!-- if your macports prefix differs you have to change this path -->
+<xsl:import href="/opt/local/share/xsl/docbook-xsl/manpages/docbook.xsl"/>
+
+<!-- modify the default term template so terms are bold: -->
+<!-- only text between MODIFIED START and STOP is modified -->
+<!-- everything else is just copied from the manpage xsl -->
+<xsl:template match="varlistentry|glossentry">
+ <xsl:text>⌂PP </xsl:text>
+ <xsl:for-each select="term|glossterm">
+ <xsl:variable name="content">
+ <!-- MODIFIED START -->
+ <!-- mark terms bold: -->
+ <xsl:apply-templates mode="bold" select="."/>
+ <!-- this is the default code here which was changed: -->
+ <!-- <xsl:apply-templates/> -->
+ <!-- MODIFIED STOP -->
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ <xsl:choose>
+ <xsl:when test="position() = last()"/> <!-- do nothing -->
+ <xsl:otherwise>
+ <!-- * if we have multiple terms in the same varlistentry, generate -->
+ <!-- * a separator (", " by default) and/or an additional line -->
+ <!-- * break after each one except the last -->
+ <!-- * -->
+ <!-- * note that it is not valid to have multiple glossterms -->
+ <!-- * within a glossentry, so this logic never gets exercised -->
+ <!-- * for glossterms (every glossterm is always the last in -->
+ <!-- * its parent glossentry) -->
+ <xsl:value-of select="$variablelist.term.separator"/>
+ <xsl:if test="not($variablelist.term.break.after = '0')">
+ <xsl:text> </xsl:text>
+ <xsl:text>⌂br </xsl:text>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ <xsl:text>⌂RS</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>⌂RE </xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070919/09c4f04b/attachment.html
More information about the macports-changes
mailing list