Priority: optional
 Maintainer: Enrico Tassi <gareuselesinge@debian.org>
 Uploaders: Stefano Zacchiroli <zack@debian.org>
-Build-Depends: ocaml (>= 3.10.0), ocaml-findlib, libgdome2-ocaml-dev, liblablgtk2-ocaml-dev, liblablgtkmathview-ocaml-dev, liblablgtksourceview-ocaml-dev, libsqlite3-ocaml-dev, libocamlnet-ocaml-dev, libzip-ocaml-dev, libhttp-ocaml-dev, ocaml-ulex08, libexpat-ocaml-dev, debhelper, cdbs, libmysql-ocaml-dev, camlp5
+Build-Depends: ocaml (>= 3.10.0), ocaml-findlib, libgdome2-ocaml-dev, liblablgtk2-ocaml-dev, liblablgtkmathview-ocaml-dev, liblablgtksourceview-ocaml-dev, libsqlite3-ocaml-dev, libocamlnet-ocaml-dev, libzip-ocaml-dev, libhttp-ocaml-dev, ocaml-ulex08, libexpat-ocaml-dev, debhelper, cdbs, libmysql-ocaml-dev, camlp5, dpatch
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://mowgli.cs.unibo.it/trunk/helm/software/pkg-matita/trunk/
 XS-Vcs-Browser: http://helm.cs.unibo.it/websvn/listing.php?path=/trunk/helm/software/pkg-matita/trunk/
 
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## matita.conf.xml.in.dpatch by Enrico Tassi <gareuselesinge@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad trunk~/matita/matita.conf.xml.in trunk/matita/matita.conf.xml.in
+--- trunk~/matita/matita.conf.xml.in   2007-10-28 14:10:17.000000000 +0100
++++ trunk/matita/matita.conf.xml.in    2007-10-28 14:41:45.000000000 +0100
+@@ -50,9 +50,11 @@
+          note that user's tables are named diffrently from library tables, so that
+        they can coexists on the same db -->
+ 
++<!--
+     <key name="metadata">@DBHOST@ public helm none legacy</key>
+     <key name="metadata">@DBHOST@ matita helm none library</key>
+     <key name="metadata">@DBHOST@ matita helm none user</key>
++-->
+ 
+     <!-- The following snipset is used by the helm team to publish the matita
+          contributions
+@@ -64,9 +66,9 @@
+     <!-- The following snippet it what you want to use a local sqlite db
+          and acess remotely to the coq library trought mowgli
+     <key name="metadata">@DBHOST@ matita helm none legacy</key>
++-->
+     <key name="metadata">file://$(matita.rt_base_dir) metadata.db helm helm library</key>
+     <key name="metadata">file://$(matita.basedir) user.db helm helm user</key>
+-    -->
+ 
+     <!-- 
+     If you have a large amount of metadata, you may be interested in using
+@@ -97,11 +99,13 @@
+       (e.g. the Matita standard library)
+     "legacy" implies "ro"
+     -->
++<!--
+     <key name="prefix">
+       cic:/matita/
+       file:///projects/helm/library/matita_contribs/matita
+       ro
+     </key>
++-->
+     <key name="prefix">
+       cic:/matita/
+       file://$(matita.rt_base_dir)/xml/standard-library/
+@@ -111,6 +115,7 @@
+       cic:/matita/
+       file://$(user.home)/.matita/xml/matita/
+     </key>
++<!--
+     <key name="prefix">
+       cic:/
+       file://@RT_BASE_DIR@/xml/legacy-library/coq/
+@@ -126,5 +131,6 @@
+       http://mowgli.cs.unibo.it/xml/
+       legacy
+     </key>
++-->
+   </section>
+ </helm_registry>
 
 include /usr/share/cdbs/1/class/makefile.mk
 include /usr/share/cdbs/1/class/autotools.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
-
+include /usr/share/cdbs/1/rules/dpatch.mk
 
 DEB_CONFIGURE_EXTRA_FLAGS := \
   --with-runtime-dir=/usr/share/matita \