- add support for automatic generation of doc-base entries for ocamldoc
authorStefano Zacchiroli <zack@debian.org>
Sun, 2 Sep 2007 16:00:28 +0000 (16:00 +0000)
committerStefano Zacchiroli <zack@debian.org>
Sun, 2 Sep 2007 16:00:28 +0000 (16:00 +0000)
    generated API reference

debian/cdbs/ocaml-docbase-template.txt [new file with mode: 0644]
debian/cdbs/ocaml.mk
debian/changelog
debian/ocaml-nox.install.in

diff --git a/debian/cdbs/ocaml-docbase-template.txt b/debian/cdbs/ocaml-docbase-template.txt
new file mode 100644 (file)
index 0000000..d0deb55
--- /dev/null
@@ -0,0 +1,8 @@
+Document: @PACKAGE@-ocamldoc-api-reference
+Title: @PACKAGE@ OCamldoc API Reference
+Abstract: API reference manual for @PACKAGE@ (generated via OCamldoc)
+Section: Applications/Programming
+
+Format: HTML
+Index: /usr/share/doc/@PACKAGE@/html/api/index.html
+Files: /usr/share/doc/@PACKAGE@/html/api/*
index 2a9fed9761014a15d91bfe825db623e5aeb95c30..6d938579b5ecabdba2f4ac6a13845814a15a91ec 100644 (file)
@@ -16,7 +16,7 @@
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
-# $Id: ocaml.mk 4266 2007-09-02 14:53:22Z zack $
+# $Id: ocaml.mk 4270 2007-09-02 16:00:28Z zack $
 
 _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
@@ -42,7 +42,7 @@ DEB_DH_GENCONTROL_ARGS +=    -VF:OCamlNativeArchs="$(OCAML_NATIVE_ARCHS)"
 
 endif
 
-# post-install hooks for invoking ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
+# post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
 $(patsubst %,binary-install/%,$(DEB_PACKAGES))::
        @if (echo $(OCAML_OCAMLDOC_PACKAGES) | grep -w '$(cdbs_curpkg)' > /dev/null) ; then \
                echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \
@@ -56,6 +56,16 @@ $(patsubst %,binary-install/%,$(DEB_PACKAGES))::
                || true ; \
        fi
 
+# post-build hook to create doc-base entries for OCAML_OCAMLDOC_PACKAGES packages
+$(patsubst %,build/%,$(DEB_PACKAGES))::
+       @if (echo $(OCAML_OCAMLDOC_PACKAGES) | grep -w '$(cdbs_curpkg)' > /dev/null) ; then \
+               sed -e 's/@PACKAGE@/$(cdbs_curpkg)/g' \
+                       $(_cdbs_class_path)/ocaml-docbase-template.txt$(_cdbs_makefile_suffix) \
+                       > debian/$(cdbs_curpkg).doc-base.ocamldoc-apiref ; \
+       fi
+clean::
+       rm -f debian/*.doc-base.ocamldoc-apiref
+
 # generate .in files counterpars before building, substituting @OCamlABI@
 # markers with the proper value; clean stamps after building
 pre-build:: ocamlinit
index 71ebcf6f84772f47d6141282b3b9132144761f4e..48fa690ca6ee67538646f8da0432efad66beda40 100644 (file)
@@ -4,8 +4,10 @@ ocaml (3.10.0-8) UNRELEASED; urgency=low
   * CDBS class
     - invoke ocamldoc after dh_install has been run (otherwise ocamldoc is
       likely to generate empty API references ...)
+    - add support for automatic generation of doc-base entries for ocamldoc
+      generated API reference
 
- -- Stefano Zacchiroli <zack@debian.org>  Sun, 02 Sep 2007 16:51:41 +0200
+ -- Stefano Zacchiroli <zack@debian.org>  Sun, 02 Sep 2007 17:49:36 +0200
 
 ocaml (3.10.0-7) unstable; urgency=low
 
index 45b43d77deaa4889722c32a350ed1906aafa3107..257884c00f3872101b23e99924a82d43d4b5bcc3 100644 (file)
@@ -1,4 +1,4 @@
-debian/cdbs/*.mk                /usr/share/cdbs/1/class/
+debian/cdbs/*                  /usr/share/cdbs/1/class/
 debian/ocaml-nox.override      /usr/share/lintian/overrides/ocaml-nox
 config/Makefile                        /usr/lib/ocaml/#OcamlABI#/config/Makefile
 debian/native-archs            /usr/lib/ocaml/#OcamlABI#/