Package: help2man
Version: 1.36.3
Severity: wishlist
Tags: patch
Hi all
As Debian has adopted a stricter policy regarding non-free documentation,
there are some info pages mentioned that are in non-free. The attached
patch adds support to help2man for such packages.
It does also add support for the more general problem of stand-alone doc
packages. I've added two new options:
-d, --doc-package=TEXT mention documentation package
-D, --non-free-doc documentation package is in non-free
Thanx
Simon
--- help2man-1.36.3/help2man.PL 2005-10-16 17:38:47.000000000 +0200
+++ help2man-1.36.3-non-free/help2man.PL 2006-02-20 19:59:42.000000000
+0100
@@ -155,6 +155,8 @@
-o, --output=FILE send output to `FILE'
-p, --info-page=TEXT name of Texinfo manual
-N, --no-info suppress pointer to Texinfo manual
+ -d, --doc-package=TEXT mention documentation package
+ -D, --non-free-doc documentation package is in non-free
--help print this help, then exit
--version print version number, then exit
@@ -173,7 +175,7 @@
my $locale = 'C';
my $help_option = '--help';
my $version_option = '--version';
-my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info);
+my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info,
$opt_doc_package, $opt_non_free_doc);
my %opt_def = (
'n|name=s' => \$opt_name,
@@ -186,6 +188,8 @@
'o|output=s' => \$opt_output,
'p|info-page=s' => \$opt_info,
'N|no-info' => \$opt_no_info,
+ 'd|doc-package=s' => \$opt_doc_package,
+ 'D|non-free-doc' => \$opt_non_free_doc,
'h|help-option=s' => \$help_option,
'v|version-option=s' => \$version_option,
);
@@ -644,6 +648,23 @@
EOT
}
+# Refer to documentation package.
+if ($opt_doc_package)
+{
+ my $non_free = $opt_non_free_doc ? ' which is in non-free' : '';
+
+ $sect = _('SEE ALSO');
+ $include{$sect} ||= '';
+ $include{$sect} .= ".PP\n" if $include{$sect};
+ $include{$sect} .= sprintf _(<<'EOT'), $program, $opt_doc_package,
$non_free;
+The full documentation for
+.B %s
+is available in the seperate
+.B %s
+package%s.
+EOT
+}
+
# Output header.
print <<EOT;
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program
$this_version.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]