Commits

shuerhaaken committed 1372daf

add devhelp support

  • Participants
  • Parent commits 0fc828d

Comments (0)

Files changed (15)

 .anjuta_sym_db.db
 *.log
 *.trs
+*.devhelp
+commit 0fc828df93be4d9242a9b2d35be84cd56d1efb8e
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Mon Oct 28 12:43:22 2013 +0100
+
+    packaging fixes
+
+commit b4f7ca07aa1a646cdf2727fcead977c1e0229450
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Mon Oct 28 12:41:18 2013 +0100
+
+    packaging fixes
+
 commit 4e649f9de7bd9bd2ab237688119b6d58e81b4fb2
 Author: Jörn Magens <shuerhaaken@googlemail.com>
 Date:   Wed Oct 23 19:35:30 2013 +0200

File configure.ac

 AC_CONFIG_HEADERS([config.h libtaginfoconfig.h])
 AC_PROG_CXX
 AM_PROG_CC_C_O
+AM_SILENT_RULES([yes])
 
 AC_DISABLE_STATIC
 
         AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
         enable_doxygen_docs=no
     else
-        AC_CONFIG_FILES([docs/Doxyfile_lib docs/libtaginfo.doc-base docs/Doxyfile_c])
+        AC_CONFIG_FILES([docs/Doxyfile_lib docs/Doxyfile_c])
     fi
 fi
 
 AM_CONDITIONAL(LIBTAGINFO_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
 AC_MSG_RESULT($enable_doxygen_docs)
 
-AM_SILENT_RULES([yes])
+
+
+AC_CHECK_PROGS([XSLTPROC], [xsltproc])
+AM_CONDITIONAL([LIBTAGINFO_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
+
 
 dnl ================================================================
 dnl  VAPIDIR is used to place the vapi file (vala binding)

File docs/Doxyfile_c

 #---------------------------------------------------------------------------
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
-GENERATE_XML           = NO
+GENERATE_XML           = YES
 #---------------------------------------------------------------------------
 # Configuration options related to the preprocessor   
 #---------------------------------------------------------------------------

File docs/Doxyfile_c.in

 #---------------------------------------------------------------------------
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
-GENERATE_XML           = NO
+GENERATE_XML           = YES
 #---------------------------------------------------------------------------
 # Configuration options related to the preprocessor   
 #---------------------------------------------------------------------------

File docs/Doxyfile_lib

 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-GENERATE_XML           = NO
+GENERATE_XML           = YES
 XML_OUTPUT             = xml
 XML_SCHEMA             =
 XML_DTD                =

File docs/Doxyfile_lib.in

 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-GENERATE_XML           = NO
+GENERATE_XML           = YES
 XML_OUTPUT             = xml
 XML_SCHEMA             =
 XML_DTD                =

File docs/Makefile.am

 
 dist_noinst_DATA = \
     field_name_table.ods \
+    doxygen_to_devhelp.xsl \
+    doxygen_to_devhelp_c.xsl \
     Doxyfile_lib \
     Doxyfile_lib.in \
     Doxyfile_c \
 	$(AM_V_GEN)cd $(top_builddir)/docs && doxygen Doxyfile_c
 	@touch $@
 
-CLEANFILES = doxyfile_lib.stamp doxyfile_c.stamp
+devhelpapi_DATA =
+devhelpapidir=$(datadir)/devhelp/books/libtaginfo
+
+devhelpcapi_DATA =
+devhelpcapidir=$(datadir)/devhelp/books/libtaginfo_c
+
+if LIBTAGINFO_HAVE_XSLTPROC
+devhelpapi_DATA += libtaginfo.devhelp
+devhelpcapi_DATA += libtaginfo_c.devhelp
+
+libtaginfo.devhelp: $(srcdir)/doxygen_to_devhelp.xsl doxyfile_lib.stamp
+	$(XSLTPROC) -o $@ $< libtaginfo/xml/index.xml
+
+libtaginfo_c.devhelp: $(srcdir)/doxygen_to_devhelp_c.xsl doxyfile_c.stamp
+	$(XSLTPROC) -o $@ $< libtaginfo_c/xml/index.xml
+endif
+
 
 all-local: doxyfile_lib.stamp doxyfile_c.stamp
 
 
 endif
 
+CLEANFILES = doxyfile_lib.stamp doxyfile_c.stamp
+
 clean-local:
+	rm -f $(devhelpapi_DATA)
+	rm -f $(devhelpcapi_DATA)
 	rm -rf libtaginfo
 	rm -rf libtaginfo_c
 	rm -f doxyfile_lib.stamp

File docs/doxygen_to_devhelp.xsl

+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format"
+    version="1.0">
+
+<!-- Based on the XSL stylesheet from gtkmm - Lennart -->
+
+<xsl:output method="xml" version="1.0" indent="yes"/>
+
+<xsl:param name="reference_prefix">../../../doc/libtaginfo/api/</xsl:param>
+
+<xsl:template match="/">
+  <book title="Libtaginfo Reference Manual"
+        name="libtaginfo"
+        link="{$reference_prefix}index.html">
+  <chapters>
+    <sub name="Headers" link="{$reference_prefix}files.html">
+      <xsl:apply-templates select="doxygenindex/compound[@kind='file']">
+        <xsl:sort select="."/>
+      </xsl:apply-templates>
+    </sub>
+  </chapters>
+
+  <functions>
+    <!-- @todo: maybe select only the real functions, ie those with kind=="function"? -->
+    <xsl:apply-templates select="doxygenindex/compound/function" mode="as-function"/>
+  </functions>
+  </book>
+</xsl:template>
+
+<xsl:template match="compound">
+  <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+  <xsl:param name="link"><xsl:value-of select="@refid"/>.html</xsl:param>
+  <sub name="{$name}" link="{$reference_prefix}{$link}">
+  <xsl:apply-templates select="member" mode="as-sub">
+    <xsl:sort select="."/>
+  </xsl:apply-templates>
+  </sub>
+</xsl:template>
+
+<xsl:template match="member" mode="as-function">
+  <!--
+  <function name="atk_set_value" link="atk-atkvalue.html#ATK-SET-VALUE"/>
+  -->
+  <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+  <!-- Link is refid attribute of parent element + "#" + diff between refid of parent and own refid -->
+  <xsl:param name="refid_parent"><xsl:value-of select="parent::node()/@refid"/></xsl:param>
+  <xsl:param name="own_refid"><xsl:value-of select="@refid"/></xsl:param>
+  <xsl:param name="offset"><xsl:value-of select="string-length($refid_parent) + 3"/></xsl:param>
+  <xsl:param name="ref_diff"><xsl:value-of select="substring($own_refid, $offset, 32)"/></xsl:param>
+  <xsl:param name="link"><xsl:value-of select="$refid_parent"/>.html#<xsl:value-of select="$ref_diff"/></xsl:param>
+  <function name="{$name}" link="{$reference_prefix}{$link}"/>
+</xsl:template>
+
+<xsl:template match="member" mode="as-sub">
+  <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+  <!-- Link is refid attribute of parent element + "#" + diff between refid of parent and own refid -->
+  <xsl:param name="refid_parent"><xsl:value-of select="parent::node()/@refid"/></xsl:param>
+  <xsl:param name="own_refid"><xsl:value-of select="@refid"/></xsl:param>
+  <xsl:param name="offset"><xsl:value-of select="string-length($refid_parent) + 3"/></xsl:param>
+  <xsl:param name="ref_diff"><xsl:value-of select="substring($own_refid, $offset, 32)"/></xsl:param>
+  <xsl:param name="link"><xsl:value-of select="$refid_parent"/>.html#<xsl:value-of select="$ref_diff"/></xsl:param>
+  <sub name="{$name}" link="{$reference_prefix}{$link}"/>
+</xsl:template>
+
+</xsl:stylesheet>

File docs/doxygen_to_devhelp_c.xsl

+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format"
+    version="1.0">
+
+<!-- Based on the XSL stylesheet from gtkmm - Lennart -->
+
+<xsl:output method="xml" version="1.0" indent="yes"/>
+
+<xsl:param name="reference_prefix">../../../doc/libtaginfo/c_api/</xsl:param>
+
+<xsl:template match="/">
+  <book title="Libtaginfo C Bindings Reference Manual"
+        name="libtaginfo_c"
+        link="{$reference_prefix}index.html">
+  <chapters>
+    <sub name="Headers" link="{$reference_prefix}files.html">
+      <xsl:apply-templates select="doxygenindex/compound[@kind='file']">
+        <xsl:sort select="."/>
+      </xsl:apply-templates>
+    </sub>
+  </chapters>
+
+  <functions>
+    <!-- @todo: maybe select only the real functions, ie those with kind=="function"? -->
+    <xsl:apply-templates select="doxygenindex/compound/function" mode="as-function"/>
+  </functions>
+  </book>
+</xsl:template>
+
+<xsl:template match="compound">
+  <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+  <xsl:param name="link"><xsl:value-of select="@refid"/>.html</xsl:param>
+  <sub name="{$name}" link="{$reference_prefix}{$link}">
+  <xsl:apply-templates select="member" mode="as-sub">
+    <xsl:sort select="."/>
+  </xsl:apply-templates>
+  </sub>
+</xsl:template>
+
+<xsl:template match="member" mode="as-function">
+  <!--
+  <function name="atk_set_value" link="atk-atkvalue.html#ATK-SET-VALUE"/>
+  -->
+  <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+  <!-- Link is refid attribute of parent element + "#" + diff between refid of parent and own refid -->
+  <xsl:param name="refid_parent"><xsl:value-of select="parent::node()/@refid"/></xsl:param>
+  <xsl:param name="own_refid"><xsl:value-of select="@refid"/></xsl:param>
+  <xsl:param name="offset"><xsl:value-of select="string-length($refid_parent) + 3"/></xsl:param>
+  <xsl:param name="ref_diff"><xsl:value-of select="substring($own_refid, $offset, 32)"/></xsl:param>
+  <xsl:param name="link"><xsl:value-of select="$refid_parent"/>.html#<xsl:value-of select="$ref_diff"/></xsl:param>
+  <function name="{$name}" link="{$reference_prefix}{$link}"/>
+</xsl:template>
+
+<xsl:template match="member" mode="as-sub">
+  <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
+  <!-- Link is refid attribute of parent element + "#" + diff between refid of parent and own refid -->
+  <xsl:param name="refid_parent"><xsl:value-of select="parent::node()/@refid"/></xsl:param>
+  <xsl:param name="own_refid"><xsl:value-of select="@refid"/></xsl:param>
+  <xsl:param name="offset"><xsl:value-of select="string-length($refid_parent) + 3"/></xsl:param>
+  <xsl:param name="ref_diff"><xsl:value-of select="substring($own_refid, $offset, 32)"/></xsl:param>
+  <xsl:param name="link"><xsl:value-of select="$refid_parent"/>.html#<xsl:value-of select="$ref_diff"/></xsl:param>
+  <sub name="{$name}" link="{$reference_prefix}{$link}"/>
+</xsl:template>
+
+</xsl:stylesheet>

File packaging/Makefile.am

-# This file is part of taginfo.
+# This file is part of libtaginfo.
 # Copyright (C) 2012-2013  Jörn Magens <shuerhaaken@googlemail.com>
 
 

File packaging/debian/debian/control

  vala development with libtaginfo's C bindings.
 
 
+
+Package: libtaginfo-doc
+Section: doc
+Architecture: all
+Suggests: libtaginfo1-dev
+Recommends: doc-base
+Depends: ${misc:Depends}
+Description: Media metatag access library (library documentation)
+ LibTagInfo is a wrapper library for taglib that exposes information in a 
+ convenient way.
+ .
+ This package contains the C++ API documentation for libtaginfo.
+
+

File packaging/ubuntu/quantal/debian/control

  vala development with libtaginfo's C bindings.
 
 
+
+Package: libtaginfo-doc
+Section: doc
+Architecture: all
+Suggests: libtaginfo1-dev
+Recommends: doc-base
+Depends: ${misc:Depends}
+Description: Media metatag access library (library documentation)
+ LibTagInfo is a wrapper library for taglib that exposes information in a 
+ convenient way.
+ .
+ This package contains the C++ API documentation for libtaginfo.
+
+

File packaging/ubuntu/raring/debian/control

  vala development with libtaginfo's C bindings.
 
 
+
+Package: libtaginfo-doc
+Section: doc
+Architecture: all
+Suggests: libtaginfo1-dev
+Recommends: doc-base
+Depends: ${misc:Depends}
+Description: Media metatag access library (library documentation)
+ LibTagInfo is a wrapper library for taglib that exposes information in a 
+ convenient way.
+ .
+ This package contains the C++ API documentation for libtaginfo.
+
+

File packaging/ubuntu/saucy/debian/libtaginfo-doc.doc-base.C-api

-Document: libtaginfo-C-api
-Title: libtaginfo C bindings API Reference
-Section: Programming/C
-
-Format: HTML
-Index: /usr/share/doc/libtaginfo-doc/capi/index.html
-Files: /usr/share/doc/libtaginfo-doc/capi/*