Hi,

seems I did some duplication of work since I didn't check the BTS
before writing a patch to do a very similar fix...

The attached patch generates manual page using help2man but adds
static description, authors and see also sections. Do you feel that we
could merge these two patches so that documentation for command line
options would be generated automatically but description, environment,
files and see also sections would be static?

>From 6a30fa83fe3a3f44336000ef5e7bb9e904a7b1b0 Mon Sep 17 00:00:00 2001
From: Timo Juhani Lindfors <timo.lindf...@iki.fi>
Date: Wed, 1 Sep 2010 17:27:57 +0300
Subject: [PATCH] Generate gyp man page using help2man.

---
 debian/control |    2 +-
 debian/rules   |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/debian/control b/debian/control
index 6f96527..6efa6d0 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: python
 Priority: optional
 Maintainer: Debian Chromium Maintainers <pkg-chromium-ma...@lists.alioth.debian.org>
 Uploaders: Giuseppe Iuculano <iucul...@debian.org>
-Build-Depends: debhelper (>= 7), python, python-support (>= 0.3)
+Build-Depends: debhelper (>= 7), python, python-support (>= 0.3), help2man, libparse-debianchangelog-perl
 Standards-Version: 3.8.4
 Homepage: http://code.google.com/p/gyp/
 
diff --git a/debian/rules b/debian/rules
index 27a13f8..72685ac 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,8 @@ DEB_PYTHON_INSTALL_ARGS_ALL += --prefix=/usr
 # We can follow gyp either on trunk or use the revision required by Chromium
 FOLLOW_CHROMIUM ?= 0
 
+PACKAGE_VERSION := $(shell parsechangelog -Fdebian | grep ^Version: | cut -d' ' -f2)
+
 ###############################################################################
 # Tarball (get-orig-source & get-current-source)
 
@@ -63,3 +65,15 @@ gos-pack:
 
 %:
 	dh $@
+
+override_dh_auto_build:
+	dh_auto_build
+	help2man --no-info --include debian/help2man.include --version-string $(PACKAGE_VERSION) --name "Generate Your Projects" ./gyp > gyp.1
+
+override_dh_auto_install:
+	dh_auto_install
+	install -m 644 -D gyp.1 $(CURDIR)/debian/gyp/usr/share/man/man1/gyp.1
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -f gyp.1
-- 
1.7.1

-Timo

Reply via email to