Package: dbus Version: 1.1.2-1 Severity: wishlist Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu hardy ubuntu-patch
Hello,
Fedora's dbus package has an XSLT to generate a devhelp index for the
dbus documentation. Sebastien recently integrated devhelp support into
the ubuntu dbus package:
* devhelp integration:
- Add debian/doxygen_to_devhelp.xsl: XSLT from Fedora to generate a
devhelp documentation index.
- debian/patches/dbus-1.0.1-generate-xml-docs.patch: Enable generation
of XML documentation (which will be turned into the devhelp index).
- debian/rules: Build and clean the devhelp index. Add xsltproc build
dependency for that.
- debian/dbus-1-doc.install: Install the devhelp index, and shuffle
files around so that devhelp finds them.
- Add debian/dbus-1-doc.links: gtk-doc symlink.
I forwarded the XSLT to
https://bugs.freedesktop.org/show_bug.cgi?id=13495.
This sounds interesting for Debian as well. Please consider applying
attached patch.
Thank you!
Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org
diff -u dbus-1.1.2/debian/rules dbus-1.1.2/debian/rules
--- dbus-1.1.2/debian/rules
+++ dbus-1.1.2/debian/rules
@@ -27,9 +27,11 @@
build/dbus-1-doc::
doxygen Doxyfile
+ xsltproc -o dbus.devhelp debian/doxygen_to_devhelp.xsl doc/api/xml/index.xml
clean::
rm -rf doc/api
rm -f test/data/valid-config-files/session.conf
rm -f test/data/valid-config-files/system.conf
rm -f doc/*.html
+ rm -f debian/dbus.devhelp
--- dbus-1.1.2/debian/dbus-1-doc.install
+++ dbus-1.1.2/debian/dbus-1-doc.install
@@ -4 +4,4 @@
-doc/api/html usr/share/doc/dbus-1-doc/api/
+doc/api/html/* usr/share/doc/dbus-1-doc/html/api
+dbus.devhelp usr/share/doc/dbus-1-doc/html
+doc/dbus-{faq,specification,tutorial}.html usr/share/doc/dbus-1-doc/html
+
--- dbus-1.1.2/debian/control
+++ dbus-1.1.2/debian/control
@@ -13,6 +14,7 @@
doxygen,
docbook-utils,
xmlto,
+ xsltproc,
libx11-dev,
libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
Standards-Version: 3.7.2
--- dbus-1.1.2.orig/debian/dbus-1-doc.links
+++ dbus-1.1.2/debian/dbus-1-doc.links
@@ -0,0 +1 @@
+usr/share/doc/dbus-1-doc/html usr/share/gtk-doc/html/dbus
\ No newline at end of file
--- dbus-1.1.2.orig/debian/patches/dbus-1.0.1-generate-xml-docs.patch
+++ dbus-1.1.2/debian/patches/dbus-1.0.1-generate-xml-docs.patch
@@ -0,0 +1,11 @@
+--- dbus-1.0.1/Doxyfile.in.generate-xml-docs 2006-11-25 23:42:59.000000000 -0500
++++ dbus-1.0.1/Doxyfile.in 2006-11-25 23:43:12.000000000 -0500
+@@ -133,7 +133,7 @@
+ #---------------------------------------------------------------------------
+ # configuration options related to the XML output
+ #---------------------------------------------------------------------------
+-GENERATE_XML = NO
++GENERATE_XML = YES
+ #---------------------------------------------------------------------------
+ # Configuration options related to the preprocessor
+ #---------------------------------------------------------------------------
--- dbus-1.1.2.orig/debian/doxygen_to_devhelp.xsl
+++ dbus-1.1.2/debian/doxygen_to_devhelp.xsl
@@ -0,0 +1,40 @@
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version="1.0">
+
+<xsl:output method="xml" version="1.0" indent="yes"/>
+
+<xsl:param name="prefix"></xsl:param>
+
+<xsl:template match="/">
+ <book title="D-Bus: A system for interprocess communication"
+ name="dbus"
+ link="dbus-tutorial.html">
+ <chapters>
+ <sub name="Tutorial" link="{$prefix}dbus-tutorial.html"/>
+ <sub name="FAQ" link="{$prefix}dbus-faq.html"/>
+ <sub name="Specification" link="{$prefix}dbus-specification.html"/>
+ <sub name="API Reference" link="{$prefix}api/index.html"/>
+ </chapters>
+
+ <functions>
+ <xsl:apply-templates select="doxygenindex/[EMAIL PROTECTED]'group']/[EMAIL PROTECTED]'function']"/>
+ </functions>
+ </book>
+</xsl:template>
+
+<xsl:template match="member">
+ <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+ <xsl:param name="refid"><xsl:value-of select="@refid"/></xsl:param>
+ <xsl:param name="before"><xsl:value-of select="substring-before($refid,'_1')"/></xsl:param>
+ <xsl:param name="after"><xsl:value-of select="substring-after($refid,'_1')"/></xsl:param>
+ <xsl:param name="link"><xsl:value-of select="$before"/>.html#<xsl:value-of select="$after"/></xsl:param>
+ <xsl:if test="starts-with($name,'dbus') or starts-with($name, 'DBus')">
+ <xsl:if test="starts-with($refid,'group__') and contains($refid, '_1')">
+ <function name="{$name}" link="{$prefix}api/{$link}"/>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
signature.asc
Description: Digital signature

