Description: install the user manual
 This patch builds the info, html and pdf version of the user manual
 with some Debian specific changes. They are also moved/renamed to fit
 Debian's conventions. The PG-adapting manual is not included in any
 package.

Author: Hendrik Tews <hendrik@askra.de>
--- a/Makefile
+++ b/Makefile
@@ -134,7 +134,7 @@
 ##
 ## Remove generated targets
 ##
-clean:	cleanscripts
+clean:	cleanscripts clean-prepared-doc
 	rm -f $(ELC) .\#* */.\#* */.autotest.log */.profile.log
 	(cd doc; $(MAKE) clean)
 
@@ -232,6 +232,20 @@
 doc.%: FORCE
 	(cd doc; $(MAKE) EMACS=$(EMACS) $*)
 
+
+# The install-doc target above is the upstream target. The following
+# target builds the user manual and renames the files, such that
+# dh_installdocs will work.
+.PHONY: prepare-doc
+prepare-doc: doc.info doc.pdf doc.html
+	mv doc/ProofGeneral doc/html
+	mv doc/ProofGeneral.pdf doc/proofgeneral.pdf
+	mv doc/ProofGeneral.info doc/proofgeneral.info
+
+.PHONY: clean-prepared-doc
+clean-prepared-doc:
+	rm -rf doc/html doc/proofgeneral.pdf doc/proofgeneral.info
+
 ##
 ## scripts: try to patch bash and perl scripts with correct paths
 ##
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -19,7 +19,6 @@
 	$(MAKE) doc
 
 %:
-	$(MAKE) -f Makefile.doc DOCNAME=PG-adapting MAKE="$(MAKE) -f Makefile.doc" $@
 	$(MAKE) -f Makefile.doc DOCNAME=ProofGeneral MAKE="$(MAKE) -f Makefile.doc" $@ 
 
 ##
--- a/doc/ProofGeneral.texi
+++ b/doc/ProofGeneral.texi
@@ -797,6 +797,12 @@
 @node Walkthrough example in Isabelle
 @section Walkthrough example in Isabelle
 
+[@emph{Debian specific note}: The Debian Proof-General package
+does not support Isabelle and the Isar example file is not
+available in Debian. A small Coq example file is installed as
+@file{/usr/share/doc/proofgeneral/examples/coq_example.v} by
+package `proofgeneral'.]
+
 Here's a short example in Isabelle to see how script management
 is used.  The file you are asked to type below is included in the
 distribution as @file{isar/Example.thy}.  If you're not using
