--- docbook-ebnf-1.2~cr1.orig/debian/contrib/catalog.start
+++ docbook-ebnf-1.2~cr1/debian/contrib/catalog.start
@@ -0,0 +1,3 @@
+-- * This catalog was written for the Debian package because upstream ..... --
+-- * does not ship one. ................................................... --
+
--- docbook-ebnf-1.2~cr1.orig/debian/contrib/catalog.end
+++ docbook-ebnf-1.2~cr1/debian/contrib/catalog.end
@@ -0,0 +1,2 @@
+
+-- * End of catalog. ...................................................... --
--- docbook-ebnf-1.2~cr1.orig/debian/contrib/catalog.xml.start
+++ docbook-ebnf-1.2~cr1/debian/contrib/catalog.xml.start
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 
+    "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+
+<!-- * This catalog was written for the Debian package because upstream    -->
+<!-- * does not ship one.                                                  -->
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
--- docbook-ebnf-1.2~cr1.orig/debian/contrib/catalog.xml.end
+++ docbook-ebnf-1.2~cr1/debian/contrib/catalog.xml.end
@@ -0,0 +1,2 @@
+
+</catalog>
--- docbook-ebnf-1.2~cr1.orig/debian/control
+++ docbook-ebnf-1.2~cr1/debian/control
@@ -0,0 +1,23 @@
+Source: docbook-ebnf
+Section: text
+Priority: optional
+Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>
+Uploaders: Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+Build-Depends: debhelper (>= 4)
+Build-Depends-Indep: xml-core
+Standards-Version: 3.7.3
+Homepage: http://www.oasis-open.org/docbook/xml/ebnf/
+Vcs-Browser: http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-ebnf/trunk/
+Vcs-Svn: svn://svn.debian.org/svn/debian-xml-sgml/packages/docbook-ebnf/
+
+Package: docbook-ebnf
+Architecture: all
+Depends: docbook-xml (>= 4.3), ${misc:Depends}
+Suggests: docbook-defguide
+Description: EBNF module for the XML version of the DocBook DTD
+ DocBook is a general-purpose and modular SGML and XML Document-Type
+ Definition. This is a module that adds elements for the markup of
+ EBNF grammar rules to DocBook.
+ .
+ It is fully documented in "DocBook - The Definitive Guide", available
+ in the docbook-defguide package.
--- docbook-ebnf-1.2~cr1.orig/debian/changelog
+++ docbook-ebnf-1.2~cr1/debian/changelog
@@ -0,0 +1,145 @@
+docbook-ebnf (1.2~cr1-5) unstable; urgency=low
+
+  * debian/docbook-ebnf.xmlcatalogs.in: Added. Rewrite System IDs too.
+  * debian/rules (debian/docbook-ebnf.xmlcatalogs): Fixed to add the contents
+    of the .in file. Further register the system IDs.
+    (debian/contrib/catalog.xml): Likewise.
+  * debian/rules: Vcs field transition.
+    (Standards-Version): Updated to latest standards version 3.7.3. No other
+    changes necessary.
+
+ -- Daniel Leidert (dale) <daniel.leidert@wgdd.de>  Sat, 15 Dec 2007 21:10:51 +0100
+
+docbook-ebnf (1.2~cr1-4) unstable; urgency=low
+
+  * debian/control: Homepage field transition.
+    (Description): Improved wording.
+  * debian/watch: Added a working one.
+
+ -- Daniel Leidert (dale) <daniel.leidert@wgdd.de>  Wed, 26 Sep 2007 22:04:49 +0200
+
+docbook-ebnf (1.2~cr1-3) unstable; urgency=low
+
+  * debian/control (Maintainer, Uploaders): Set the Debian XML/SGML team as
+    maintainer.
+  * debian/rules: Removed bashisms (closes: #422116). Thanks to Sebastian
+    Dröge for the report.
+
+ -- Daniel Leidert (dale) <daniel.leidert@wgdd.de>  Thu, 03 May 2007 19:55:27 +0200
+
+docbook-ebnf (1.2~cr1-2) unstable; urgency=low
+
+  * Upload to unstable.
+
+  [ Daniel Leidert ]
+  * debian/rules (clean): Added the removal of the created packaging files.
+    (get-orig-source): Make the target compatible with the "Best Packaging
+    Practices" reference.
+
+ -- Daniel Leidert (dale) <daniel.leidert@wgdd.de>  Sat, 14 Apr 2007 19:53:05 +0200
+
+docbook-ebnf (1.2~cr1-1) experimental; urgency=low
+
+  * New maintainer (closes: #295580).
+  * This is not really a new upstream version, just an update of the packaging
+    files along with a bug-fix. It further lets me create a new .orig.tar.gz
+    tarbll based on the new rules in the get-orig-source target, so the
+    tarball creation is more transparent.
+
+  [ Daniel Leidert ]
+  * debian/compat: Increased debhelper compatibility level to v4.
+  * debian/contrib/catalog.*: Added. They are templates to create the real
+    SGML and XML catalogs via debian/rules.
+  * debian/control: Added XS-Vcs-Browser and XS-Vcs-Svn fields.
+    (Maintainer): I'm the new maintainer.
+    (Uploaders): Added the Debian XML/SGML group.
+    (Build-Depends-Indep): Moved debhelper to Build-Depends and adjusted
+    version dependency (see debian/compat).
+    (Standards-Version): Bump to latest standards version.
+    (Description): Fixed package reference and added Homepage field.
+  * debian/copyright: Updated. Added copyright information found in DTDs.
+  * debian/docbook-ebnf.dirs: Added. Removed the related part in debian/rules.
+  * debian/docbook-ebnf.links: Ditto.
+  * debian/docbook-ebnf.sgmlcatalogs: Removed. It's created by debian/rules
+    automatically.
+  * debian/docbook-ebnf.xmlcatalogs: Ditto. But the created file does not
+    longer miss to register the entries in the root catalog (closes: #299692).
+  * debian/rules: Cleaned the file a lot. Moved stuff to be done via debhelper
+    scripts out of debian/rules into debhelper template files. Added rules to
+    automatically walk through the source(s) and create catalogs and related
+    debhelper templates. Added get-orig-source target to document the way, the
+    upstream tarball is created.
+  * debian/watch: Removed (useless, because it doesn't work).
+
+ -- Daniel Leidert (dale) <daniel.leidert@wgdd.de>  Sat, 10 Mar 2007 17:19:41 +0100
+
+docbook-ebnf (1.0+really1.2cr1-2) unstable; urgency=low
+
+  * QA Group upload orphaning this package
+
+ -- Andrew Pollock <apollock@debian.org>  Thu,  2 Mar 2006 22:13:00 -0800
+
+docbook-ebnf (1.0+really1.2cr1-1) unstable; urgency=low
+
+  * New upstream release candidate.
+  * Fixed debian/watch to catch pre-releases.  Still misses that 1.2CR1 >>
+    1.2b1 but well, that's life.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 24 Sep 2004 23:53:51 +0200
+
+docbook-ebnf (1.0+really1.2b1-4) unstable; urgency=low
+
+  * Workaround the lack of good solution to migrate a directory to a
+    compat symlink, by removing the /usr/share/sgml/docbook/custom/ebnf
+    directory in preinst (Closes: #255770).
+
+ -- Yann Dirson <dirson@debian.org>  Sat,  7 Aug 2004 00:27:18 +0200
+
+docbook-ebnf (1.0+really1.2b1-3) unstable; urgency=low
+
+  * Suggest docbook-defguide instead of obsoloete docbook-book (Closes: #255679).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 22 Jun 2004 14:33:03 +0200
+
+docbook-ebnf (1.0+really1.2b1-2) unstable; urgency=low
+
+  * Added missing build-dep on xml-core (Closes: #255604).
+
+ -- Yann Dirson <dirson@debian.org>  Tue, 22 Jun 2004 10:04:04 +0200
+
+docbook-ebnf (1.0+really1.2b1-1) unstable; urgency=low
+
+  * New upstream pre-release, for use with docbook 4.3.
+  * Depend on docbook-xml 4.3 so that the latest DTD is guaranted to work.
+  * Install into /usr/share/xml/ instead of /usr/share/sgml/, with a
+    compat symlink.  
+  * Renamed sgml catalog to "catalog".
+  * Declare the xml catalog using dh_installxmlcatalogs - hopefully I will
+    have done things OK with this.  Added ${misc:Depends} to Depends.
+
+ -- Yann Dirson <dirson@debian.org>  Sun, 20 Jun 2004 22:47:28 +0200
+
+docbook-ebnf (1.0+really1.1cr1-2) unstable; urgency=low
+
+  * Use relative paths in SGML catalog.
+  * Switch to dh_installcatalogs.
+  * Provide an XML catalog (Closes: #176970), but don't declare it since
+    there does not seem to be a standard way for this, and the
+    update-xmlcatalog is not clear, and even docbook-xml does not declare
+    its own ones.
+  * Switch to debian/compat.
+
+ -- Yann Dirson <dirson@debian.org>  Wed, 29 Oct 2003 23:19:05 +0100
+
+docbook-ebnf (1.0+really1.1cr1-1) unstable; urgency=low
+
+  * New upstream pre-release.
+  * Changed source-package layout to accomodate multiple releases.
+
+ -- Yann Dirson <dirson@debian.org>  Fri, 20 Sep 2002 18:23:18 +0200
+
+docbook-ebnf (1.0-1) unstable; urgency=low
+
+  * Initial Release (Closes: #145013).
+
+ -- Yann Dirson <dirson@debian.org>  Mon, 29 Apr 2002 23:29:47 +0200
--- docbook-ebnf-1.2~cr1.orig/debian/compat
+++ docbook-ebnf-1.2~cr1/debian/compat
@@ -0,0 +1 @@
+4
--- docbook-ebnf-1.2~cr1.orig/debian/watch
+++ docbook-ebnf-1.2~cr1/debian/watch
@@ -0,0 +1,5 @@
+# See uscan(1) for format
+
+version=3
+opts=uversionmangle=s/((CR|B)\d+$)/~\L$1/ \
+ http://www.oasis-open.org/docbook/xml/ebnf/([\d\.CR]+)
--- docbook-ebnf-1.2~cr1.orig/debian/docbook-ebnf.links
+++ docbook-ebnf-1.2~cr1/debian/docbook-ebnf.links
@@ -0,0 +1 @@
+usr/share/xml/docbook/custom/ebnf usr/share/sgml/docbook/custom/ebnf
--- docbook-ebnf-1.2~cr1.orig/debian/copyright
+++ docbook-ebnf-1.2~cr1/debian/copyright
@@ -0,0 +1,34 @@
+This package was debianized by Yann Dirson <dirson@debian.org> in
+April 2002. It is currently maintained by
+Daniel Leidert <daniel.leidert@wgdd.de> as part of the Debian XML/SGML group.
+
+Download location:
+  http://www.oasis-open.org/docbook/xml/ebnf/
+
+Upstream Author:
+  
+  Norman Walsh <ndw@nwalsh.com>
+
+Copyright:
+
+  Copyright (C) 2000, 2001, 2002, 2003, 2004 Organization for the Advancement
+  of Structured Information Standards (OASIS).
+
+License and warranty:
+
+  Permission to use, copy, modify and distribute the DocBook EBNF
+  Module and its accompanying documentation for any purpose and
+  without fee is hereby granted in perpetuity, provided that the
+  above copyright notice and this paragraph appear in all copies.
+  The copyright holders make no representation about the
+  suitability of the DTD for any purpose.  It is provided "as is"
+  without expressed or implied warranty.
+
+  If you modify the DocBook EBNF Module in any way, label your DTD
+  as a variant of DocBook.  See the maintenance documentation for
+  more information.
+
+  Please direct all questions, bug reports, or suggestions for 
+  changes to the docbook@lists.oasis-open.org mailing list. For more
+  information, see http://www.oasis-open.org/docbook/.
+
--- docbook-ebnf-1.2~cr1.orig/debian/docbook-ebnf.dirs
+++ docbook-ebnf-1.2~cr1/debian/docbook-ebnf.dirs
@@ -0,0 +1 @@
+usr/share/sgml/docbook/custom
--- docbook-ebnf-1.2~cr1.orig/debian/rules
+++ docbook-ebnf-1.2~cr1/debian/rules
@@ -0,0 +1,137 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+# Copyright 2002 by Yann Dirson.
+
+PACKAGE := docbook-ebnf
+
+debian/contrib/catalog: debian/contrib/catalog.start debian/contrib/catalog.end
+	set -ex ; \
+	touch $@ ; \
+	cat $@.start >> $@ ; \
+	for dbebnf in ebnf-* ; do \
+		dbebnfver=`echo $${dbebnf} | sed -e 's/ebnf-//g'` ; \
+		[ -f $${dbebnf}/dbebnf.dtd ] && \
+		    echo "PUBLIC \"-//OASIS//DTD DocBook EBNF Module V$${dbebnfver}//EN\"" >> $@ && \
+		    echo "       \"$${dbebnfver}/dbebnf.dtd\"" >> $@ ; \
+	done ; \
+	cat $@.end >> $@
+
+debian/contrib/catalog.xml: debian/contrib/catalog.xml.start debian/contrib/catalog.xml.end
+	set -ex ; \
+	touch $@ ; \
+	cat $@.start >> $@ ; \
+	for dbebnf in ebnf-* ; do \
+		dbebnfver=`echo $${dbebnf} | sed -e 's/ebnf-//g'` ; \
+		[ -f $${dbebnf}/dbebnf.dtd ] && \
+		    echo "<public publicId=\"-//OASIS//DTD DocBook EBNF Module V$${dbebnfver}//EN\"" >> $@ && \
+		    echo "        uri=\"$${dbebnfver}/dbebnf.dtd\"/>" >> $@ ; \
+		    echo "<system systemId=\"http://www.oasis-open.org/docbook/xml/ebnf/$${dbebnfver}/dbebnf.dtd\"" >> $@ && \
+		    echo "        uri=\"$${dbebnfver}/dbebnf.dtd\"/>" >> $@ ; \
+		    echo "<system systemId=\"http://docbook.org/xml/ebnf/$${dbebnfver}/dbebnf.dtd\"" >> $@ && \
+		    echo "        uri=\"$${dbebnfver}/dbebnf.dtd\"/>" >> $@ ; \
+	done ; \
+	cat $@.end >> $@
+
+.PHONY: catalogs
+catalogs: debian/docbook-ebnf.sgmlcatalogs debian/docbook-ebnf.xmlcatalogs
+
+debian/docbook-ebnf.install:
+	set -ex ; \
+	touch $@ ; \
+	for dbebnf in ebnf-* ; do \
+		dbebnfver=`echo $${dbebnf} | sed -e 's/ebnf-//g'` ; \
+		[ -f $${dbebnf}/dbebnf.dtd ] && \
+		    echo "$${dbebnf}/dbebnf.dtd usr/share/xml/docbook/custom/ebnf/$${dbebnfver}" >> $@ ; \
+		[ -f $${dbebnf}/testebnf.xml ] && \
+		    echo "$${dbebnf}/testebnf.xml usr/share/doc/docbook-ebnf/examples/$${dbebnfver}" >> $@ ; \
+	done
+
+debian/docbook-ebnf.sgmlcatalogs: debian/contrib/catalog
+	set -ex ; \
+	touch $@ ; \
+	echo "$< /usr/share/sgml/docbook/custom/ebnf/catalog" >> $@
+
+debian/docbook-ebnf.xmlcatalogs: debian/contrib/catalog.xml
+	set -ex ; \
+	touch $@ ; \
+	cat $@.in >> $@ ; \
+	echo "local;$<;/usr/share/xml/docbook/custom/ebnf/catalog.xml" >> $@ ; \
+	for dbebnf in ebnf-* ; do \
+		dbebnfver=`echo $${dbebnf} | sed -e 's/ebnf-//g'` ; \
+		[ -f $${dbebnf}/dbebnf.dtd ] && \
+		    echo -n "package;system;" >> $@ && \
+		    echo -n "http://www.oasis-open.org/docbook/xml/ebnf/$${dbebnfver}/dbebnf.dtd;" >> $@ && \
+		    echo /usr/share/xml/docbook/custom/ebnf/catalog.xml >> $@ ; \
+		    echo -n "package;system;" >> $@ && \
+		    echo -n "http://docbook.org/xml/ebnf/$${dbebnfver}/dbebnf.dtd;" >> $@ && \
+		    echo /usr/share/xml/docbook/custom/ebnf/catalog.xml >> $@ ; \
+		    echo -n "package;public;" >> $@ && \
+		    echo -n "-//OASIS//DTD DocBook EBNF Module V$${dbebnfver}//EN;" >> $@ && \
+		    echo /usr/share/xml/docbook/custom/ebnf/catalog.xml >> $@ ; \
+	done
+
+
+build-stamp: catalogs debian/docbook-ebnf.install
+	dh_testdir
+	touch build-stamp
+
+build: build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	rm -f debian/contrib/catalog \
+	      debian/contrib/catalog.xml \
+	      debian/docbook-ebnf.install \
+	      debian/docbook-ebnf.sgmlcatalogs \
+	      debian/docbook-ebnf.xmlcatalogs
+	dh_clean
+
+install:
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+binary-indep: build
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_install
+	dh_link
+	dh_installcatalogs
+	dh_installxmlcatalogs
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-arch: build
+
+binary: binary-indep binary-arch
+
+.PHONY: clean binary-indep binary-arch binary install
+
+# This following code is used to create the .orig.tar.gz tarball.
+# Use it to prepare it for a new release.
+
+version=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: \(.*\)-[^-]*/\1/p')
+
+.PHONY: get-orig-source
+get-orig-source:
+	set -ex ; \
+	TMPDIR=`mktemp -d docbook-ebnf-$(version).orig` ; \
+	for dbebnf in 1.0 1.1CR1 1.2b1 1.2CR1 ; do \
+		mkdir -p "$$TMPDIR"/ebnf-$${dbebnf} ; \
+		wget -P "$$TMPDIR"/ebnf-$${dbebnf} \
+		    http://www.oasis-open.org/docbook/xml/ebnf/$${dbebnf}/dbebnf.dtd \
+		    http://www.oasis-open.org/docbook/xml/ebnf/$${dbebnf}/testebnf.xml ; \
+	done; \
+	GZIP=-9 tar -czf $(CURDIR)/docbook-ebnf_${version}.orig.tar.gz "$$TMPDIR" ; \
+	rm -rf "$$TMPDIR"
+
--- docbook-ebnf-1.2~cr1.orig/debian/docbook-ebnf.preinst
+++ docbook-ebnf-1.2~cr1/debian/docbook-ebnf.preinst
@@ -0,0 +1,11 @@
+#! /bin/sh
+set -e
+
+# workaround the lack of good solution to migrate a directory to a
+# compat symlink
+if [ -d /usr/share/sgml/docbook/custom/ebnf ]
+then
+    rm -rf /usr/share/sgml/docbook/custom/ebnf
+fi
+
+#DEBHELPER#
--- docbook-ebnf-1.2~cr1.orig/debian/docbook-ebnf.xmlcatalogs.in
+++ docbook-ebnf-1.2~cr1/debian/docbook-ebnf.xmlcatalogs.in
@@ -0,0 +1,4 @@
+root;public;-//OASIS//DTD DocBook EBNF Module
+root;system;http://www.oasis-open.org/docbook/xml/ebnf/
+root;system;http://docbook.org/xml/ebnf/
+
