From eb3cb1a4943934bf6f38035ad93301213799146a Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Mon, 9 Jan 2017 05:22:59 +0100
Subject: [PATCH 2/8] Do not ship redundant SGML and XML sources

We already ship the sources in the source package, and there's nothing
requiring us to duplicate these files.
---
 debian-menu-policy.desc |  3 ---
 debian-perl-policy.desc |  3 ---
 debian-policy.desc      |  3 ---
 debian/rules            | 24 ++++++------------------
 4 files changed, 6 insertions(+), 27 deletions(-)

diff --git a/debian-menu-policy.desc b/debian-menu-policy.desc
index 9757253..a71e36b 100644
--- a/debian-menu-policy.desc
+++ b/debian-menu-policy.desc
@@ -6,9 +6,6 @@ Abstract: This manual describes the policy requirements for the Menu
  hierarchical structure of the menu sections.
 Section: Debian
 
-Format: debiandoc-sgml
-Files: /usr/share/doc/debian-policy/menu-policy.sgml.gz
-
 Format: text
 Files: /usr/share/doc/debian-policy/menu-policy.txt.gz
 
diff --git a/debian-perl-policy.desc b/debian-perl-policy.desc
index cb6337c..0aa1831 100644
--- a/debian-perl-policy.desc
+++ b/debian-perl-policy.desc
@@ -7,9 +7,6 @@ Abstract: This manual describes the policy requirements for the Perl
  using Perl and Perl modules.
 Section: Debian
 
-Format: debiandoc-sgml
-Files: /usr/share/doc/debian-policy/perl-policy.sgml.gz
-
 Format: text
 Files: /usr/share/doc/debian-policy/perl-policy.txt.gz
 
diff --git a/debian-policy.desc b/debian-policy.desc
index 745538e..fc3d79a 100644
--- a/debian-policy.desc
+++ b/debian-policy.desc
@@ -8,9 +8,6 @@ Abstract: This manual describes the policy requirements for the Debian
  included in the distribution.
 Section: Debian
 
-Format: debiandoc-sgml
-Files: /usr/share/doc/debian-policy/policy.sgml.gz
-
 Format: text
 Files: /usr/share/doc/debian-policy/policy.txt.gz
 
diff --git a/debian/rules b/debian/rules
index 03cea36..88ca46e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,8 +17,7 @@ DOCDIR	:= $(TMPTOP)/usr/share/doc/$(package)
 LIBDIR	:= $(TMPTOP)/usr/share/doc-base
 
 # SGML source files in the top-level directory.  We do some common actions
-# with each of these: validate, build text, HTML, and one-page HTML output,
-# and generate a tarball of the source.
+# with each of these: validate, build text, HTML, and one-page HTML output.
 SGML_FILES  := policy menu-policy perl-policy upgrading-checklist
 
 # Markdown source files in the top-level directory.  We generate text and
@@ -35,10 +34,10 @@ FHS_ARCHIVE := fhs-2.3-source.tar.gz
 FHS_FILES   := fhs-2.3.html fhs-2.3.ps.gz fhs-2.3.txt.gz fhs-2.3.pdf.gz
 
 # A list of the simple Policy files that we include in the documentation
-# directory of the generated package.  The tarballs of source are handled
-# separately, as are the directories of HTML output.
-POLICY_FILES := $(SGML_FILES:=.sgml) $(SGML_FILES:=.txt.gz)		\
-		$(SGML_FILES:=-1.html) version.ent			\
+# directory of the generated package.  The directories of HTML output are
+# handled separately.
+POLICY_FILES := $(SGML_FILES:=.txt.gz)					\
+		$(SGML_FILES:=-1.html)					\
 		virtual-package-names-list.txt	                        \
 		copyright-format/copyright-format-1.0.html		\
 		copyright-format/copyright-format-1.0.txt.gz		\
@@ -64,8 +63,6 @@ FILES_TO_CLEAN	:= $(SGML_FILES:=.txt) $(SGML_FILES:=.txt.gz)		\
 		   copyright-format/version.xml				\
 		   autopkgtest/version.txt				\
 		   debconf_spec/include/version.xml version.ent		\
-		   copyright-format.xml.tar.gz				\
-		   debconf_specification.xml.tar.gz			\
 		   debian/files
 
 # Install files and directories with the correct ownership and permissions.
@@ -97,10 +94,6 @@ stamp-build: $(MDWN_FILES:=.md)				\
 	$(MAKE) -C copyright-format all
 	$(MAKE) -C autopkgtest all
 	$(MAKE) -C debconf_spec all
-	cd copyright-format && \
-		GZIP=-n9 tar -zcf ../copyright-format.xml.tar.gz *
-	cd debconf_spec && \
-		GZIP=-n9 tar -zcf ../debconf_specification.xml.tar.gz *
 	touch stamp-build
 
 # Create the version files for inclusion in the various documents.  We want
@@ -160,11 +153,6 @@ stamp-binary: stamp-build
 	$(install)	debian/changelog	$(DOCDIR)/
 	$(install)	debian/copyright	$(DOCDIR)/
 #
-# Install DocBook XML source.
-#
-	$(install)	copyright-format.xml.tar.gz		$(DOCDIR)/
-	$(install)	debconf_specification.xml.tar.gz	$(DOCDIR)/
-#
 # Install generated HTML directories.
 #
 	@set -ex; for file in $(SGML_FILES); do			\
@@ -186,7 +174,7 @@ stamp-binary: stamp-build
 #
 # Compress files and build MD5 checksums.
 #
-	gzip -fn9 $(DOCDIR)/*.sgml $(DOCDIR)/changelog
+	gzip -fn9 $(DOCDIR)/changelog
 	gzip -fn9 $(DOCDIR)/*.txt
 	@set -ex; cd debian/tmp; \
 	find . -path './DEBIAN' -prune -o -type f -printf '%P\0' \
-- 
2.12.2.564.g063fe858b8

