From 6d9a8f1603c40e7c572eb3a9e62c41926dc3827b Mon Sep 17 00:00:00 2001
From: Scott Kitterman <scott@kitterman.com>
Date: Fri, 11 Jul 2014 17:07:43 -0400
Subject: [PATCH] debian/rules changes to add make-faq rule to pre-generate
 FAQ.

---
 debian/control    |  2 +-
 debian/control.in |  2 +-
 debian/rules      | 15 +++++++++++----
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/debian/control b/debian/control
index 7ddd297..f012deb 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: python
 Priority: optional
 Maintainer: Matthias Klose <doko@debian.org>
 Uploaders: Scott Kitterman <scott@kitterman.com>, Piotr Ożarowski <piotr@debian.org>, Barry Warsaw <barry@debian.org>
-Build-Depends: debhelper (>= 8~), python-docutils (>= 0.4-3), debiandoc-sgml
+Build-Depends: debhelper (>= 8~), debiandoc-sgml
 Standards-Version: 3.9.5
 Homepage: http://www.python.org/
 Vcs-Bzr: http://alioth.debian.org/anonscm/bzr/pkg-python/python-defaults-debian
diff --git a/debian/control.in b/debian/control.in
index af56e4d..b5f5d66 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -3,7 +3,7 @@ Section: python
 Priority: optional
 Maintainer: Matthias Klose <doko@debian.org>
 Uploaders: Scott Kitterman <scott@kitterman.com>, Piotr Ożarowski <piotr@debian.org>, Barry Warsaw <barry@debian.org>
-Build-Depends: debhelper (>= 8~), python-docutils (>= 0.4-3), debiandoc-sgml
+Build-Depends: debhelper (>= 8~), debiandoc-sgml
 Standards-Version: 3.9.5
 Homepage: http://www.python.org/
 Vcs-Bzr: http://alioth.debian.org/anonscm/bzr/pkg-python/python-defaults-debian
diff --git a/debian/rules b/debian/rules
index f9a4981..e29ab79 100755
--- a/debian/rules
+++ b/debian/rules
@@ -96,6 +96,17 @@ get-faq:
 	) >> faq/FAQ.ht
 	rm -f faq/index.ht
 
+make-faq:
+	set -e; \
+	cd faq && \
+	for p in *.ht; do \
+	  p=`basename $$p .ht`; \
+	  echo $(rst2html) $$p.ht $$p.html; \
+	  awk 'NR > 2' $$p.ht > $$p.ht2; \
+	  $(rst2html) $$p.ht2 $$p.html; \
+	  rm -f $$p.ht2; \
+	done
+
 MANPAGES ?= dh_python2.1 pycompile.1 pyclean.1
 
 %.1: %.rst
@@ -149,11 +160,7 @@ stamp-install: stamp-build control-file stamp-control
 	cd faq && \
 	for p in *.ht; do \
 	  p=`basename $$p .ht`; \
-	  echo $(rst2html) $$p.ht $$p.html; \
-	  awk 'NR > 2' $$p.ht > $$p.ht2; \
-	  $(rst2html) $$p.ht2 $$p.html; \
 	  mv $$p.html ../debian/python/usr/share/doc/python/faq/; \
-	  rm -f $$p.ht2; \
 	done
 	mv debian/python/usr/share/doc/python/faq/FAQ.html \
 		debian/python/usr/share/doc/python/
-- 
GitLab