# PaCkAgE DaTaStReAm
help2man 1 118
# end of header
0707010006861d000081a400000000000000000000000151749d7600000110000000b500010002ffffffffffffffff0000001100000000help2man/pkginfo PKG=help2man
NAME=GNU help2man 1.41.2 i86pc Solaris 10
VERSION=1.41.2
PSTAMP=22nd April 2013
VENDOR=GNU
EMAIL=https://www.gnu.org/software/help2man/
DESC=GNU help2man man page generator
ARCH=i386
CATEGORY=utility
CLASSES=none
BASEDIR=/
ISTATES=S s 1 2 3
RSTATES=S s 1 2 3
0707010006861c000081a400000000000000000000000151749d760000029b000000b500010002ffffffffffffffff0000001000000000help2man/pkgmap : 1 118
1 d none /usr ? ? ?
1 d none /usr/local ? ? ?
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/help2man 0755 root root 17120 926 1366596977
1 d none /usr/local/lib 0755 root root
1 d none /usr/local/lib/help2man 0755 root root
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/info 0755 root root
1 f none /usr/local/share/info/help2man.info 0644 root root 16815 60355 1366596977
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/help2man.1 0644 root root 3781 53258 1366596977
1 i checkinstall 790 2504 1366596981
1 i pkginfo 272 20670 1366596982
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!! 0707010006861d000081a400000000000000000000000151749d7600000110000000b500010002ffffffffffffffff0000000800000000pkginfo PKG=help2man
NAME=GNU help2man 1.41.2 i86pc Solaris 10
VERSION=1.41.2
PSTAMP=22nd April 2013
VENDOR=GNU
EMAIL=https://www.gnu.org/software/help2man/
DESC=GNU help2man man page generator
ARCH=i386
CATEGORY=utility
CLASSES=none
BASEDIR=/
ISTATES=S s 1 2 3
RSTATES=S s 1 2 3
0707010006861c000081a400000000000000000000000151749d760000029b000000b500010002ffffffffffffffff0000000700000000pkgmap : 1 118
1 d none /usr ? ? ?
1 d none /usr/local ? ? ?
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/help2man 0755 root root 17120 926 1366596977
1 d none /usr/local/lib 0755 root root
1 d none /usr/local/lib/help2man 0755 root root
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/info 0755 root root
1 f none /usr/local/share/info/help2man.info 0644 root root 16815 60355 1366596977
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/help2man.1 0644 root root 3781 53258 1366596977
1 i checkinstall 790 2504 1366596981
1 i pkginfo 272 20670 1366596982
07070100068629000041ed00000000000000000000000251749d7600000000000000b500010002ffffffffffffffff0000000800000000install 0707010006862a000081ed00000000000000000000000151749d7500000316000000b500010002ffffffffffffffff0000001500000000install/checkinstall #!/bin/sh
#
expected_bits="64"
expected_release="5.10"
expected_platform="i386"
#
release=`uname -r`
platform=`uname -p`
bits=`isainfo -b`
#
if [ ${platform} != ${expected_platform} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
if [ ${release} != ${expected_release} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
#if [ ${bits} != ${expected_bits} ]; then
# echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n"
# echo "\tYour machine is running a ${bits} bit O.S. currently\n"
# echo "\tAborting installation.\n\n\n"
# exit 1
#fi
exit 0
0707010006861e000041ed00000000000000000000000351749d7600000000000000b500010002ffffffffffffffff0000000500000000root 0707010006861f000041ed00000000000000000000000351749d7600000000000000b500010002ffffffffffffffff0000000900000000root/usr 07070100068620000041ed00000000000000000000000451749d7600000000000000b500010002ffffffffffffffff0000000f00000000root/usr/local 07070100068621000041ed00000000000000000000000251749d7600000000000000b500010002ffffffffffffffff0000001300000000root/usr/local/bin 07070100068622000081ed00000000000000000000000151749d71000042e0000000b500010002ffffffffffffffff0000001c00000000root/usr/local/bin/help2man #!/usr/local/bin/perl -w
# Generate a short man page from --help and --version output.
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009,
# 2010, 2011, 2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
# Written by Brendan O'Dea
# Available from ftp://ftp.gnu.org/gnu/help2man/
use 5.008;
use strict;
use Getopt::Long;
use Text::Tabs qw(expand);
use POSIX qw(strftime setlocale LC_ALL);
my $this_program = 'help2man';
my $this_version = '1.41.2';
sub _ { $_[0] }
sub configure_locale
{
my $locale = shift;
die "$this_program: no locale support (Locale::gettext required)\n"
unless $locale eq 'C';
}
sub dec { $_[0] }
sub enc { $_[0] }
sub enc_user { $_[0] }
sub kark { die +(sprintf shift, @_), "\n" }
sub N_ { $_[0] }
my $version_info = enc_user sprintf _(<<'EOT'), $this_program, $this_version;
GNU %s %s
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010,
2011, 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Brendan O'Dea
EOT
my $help_info = enc_user sprintf _(<<'EOT'), $this_program, $this_program;
`%s' generates a man page out of `--help' and `--version' output.
Usage: %s [OPTION]... EXECUTABLE
-n, --name=STRING description for the NAME paragraph
-s, --section=SECTION section number for manual page (1, 6, 8)
-m, --manual=TEXT name of manual (User Commands, ...)
-S, --source=TEXT source of program (FSF, Debian, ...)
-L, --locale=STRING select locale (default "C")
-i, --include=FILE include material from `FILE'
-I, --opt-include=FILE include material from `FILE' if it exists
-o, --output=FILE send output to `FILE'
-p, --info-page=TEXT name of Texinfo manual
-N, --no-info suppress pointer to Texinfo manual
-l, --libtool exclude the `lt-' from the program name
--help print this help, then exit
--version print version number, then exit
EXECUTABLE should accept `--help' and `--version' options and produce output on
stdout although alternatives may be specified using:
-h, --help-option=STRING help option string
-v, --version-option=STRING version option string
--version-string=STRING version string
--no-discard-stderr include stderr when parsing option output
Report bugs to .
EOT
my $section = 1;
my $manual = '';
my $source = '';
my $help_option = '--help';
my $version_option = '--version';
my $discard_stderr = 1;
my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info, $opt_libtool,
$version_text);
my %opt_def = (
'n|name=s' => \$opt_name,
's|section=s' => \$section,
'm|manual=s' => \$manual,
'S|source=s' => \$source,
'L|locale=s' => sub { configure_locale pop },
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
'o|output=s' => \$opt_output,
'p|info-page=s' => \$opt_info,
'N|no-info' => \$opt_no_info,
'l|libtool' => \$opt_libtool,
'help' => sub { print $help_info; exit },
'version' => sub { print $version_info; exit },
'h|help-option=s' => \$help_option,
'v|version-option=s' => \$version_option,
'version-string=s' => \$version_text,
'discard-stderr!' => \$discard_stderr,
);
# Parse options.
Getopt::Long::config('bundling');
die $help_info unless GetOptions %opt_def and @ARGV == 1;
my %include = ();
my %append = ();
my @include = (); # retain order given in include file
# Process include file (if given). Format is:
#
# [section name]
# verbatim text
#
# or
#
# /pattern/
# verbatim text
#
while (@opt_include)
{
my ($inc, $required) = @{shift @opt_include};
next unless -f $inc or $required;
kark N_("%s: can't open `%s' (%s)"), $this_program, $inc, $!
unless open INC, $inc;
my $key;
my $hash = \%include;
while ()
{
# Convert input to internal Perl format, so that multibyte
# sequences are treated as single characters.
$_ = dec $_;
# [section]
if (/^\[([^]]+)\]\s*$/)
{
$key = uc $1;
$key =~ s/^\s+//;
$key =~ s/\s+$//;
$hash = \%include;
push @include, $key unless $include{$key};
next;
}
# /pattern/
if (m!^/(.*)/([ims]*)\s*$!)
{
my $pat = $2 ? "(?$2)$1" : $1;
# Check pattern.
eval { $key = qr($pat) };
if ($@)
{
$@ =~ s/ at .*? line \d.*//;
die "$inc:$.:$@";
}
$hash = \%append;
next;
}
# Check for options before the first section--anything else is
# silently ignored, allowing the first for comments and
# revision info.
unless ($key)
{
# handle options
if (/^-/)
{
local @ARGV = split;
GetOptions %opt_def;
}
next;
}
$hash->{$key} ||= '';
$hash->{$key} .= $_;
}
close INC;
kark N_("%s: no valid information found in `%s'"), $this_program, $inc
unless $key;
}
# Compress trailing blank lines.
for my $hash (\(%include, %append))
{
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
}
sub get_option_value;
# Grab help and version info from executable.
my $help_text = get_option_value $ARGV[0], $help_option;
$version_text ||= get_option_value $ARGV[0], $version_option;
# Translators: the following message is a strftime(3) format string, which in
# the English version expands to the month as a word and the full year. It
# is used on the footer of the generated manual pages. If in doubt, you may
# just use %x as the value (which should be the full locale-specific date).
my $date = enc strftime _("%B %Y"), localtime;
(my $program = $ARGV[0]) =~ s!.*/!!;
my $package = $program;
my $version;
if ($opt_output)
{
unlink $opt_output or kark N_("%s: can't unlink %s (%s)"),
$this_program, $opt_output, $! if -e $opt_output;
open STDOUT, ">$opt_output"
or kark N_("%s: can't create %s (%s)"), $this_program, $opt_output, $!;
}
# The first line of the --version information is assumed to be in one
# of the following formats:
#
#
#
# {GNU,Free}
# ({GNU,Free} )
# - {GNU,Free}
#
# and separated from any copyright/author details by a blank line.
($_, $version_text) = ((split /\n+/, $version_text, 2), '');
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
{
$program = $1;
$package = $2;
$version = $3;
}
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
{
$program = $2;
$package = $1 ? "$1$2" : $2;
$version = $3;
}
else
{
$version = $_;
}
$program =~ s!.*/!!;
# No info for `info' itself.
$opt_no_info = 1 if $program eq 'info';
# Translators: "NAME", "SYNOPSIS" and other one or two word strings in all
# upper case are manual page section headings. The man(1) manual page in your
# language, if available should provide the conventional translations.
for ($include{_('NAME')})
{
if ($opt_name) # --name overrides --include contents.
{
$_ = "$program \\- $opt_name\n";
}
elsif ($_) # Use first name given as $program
{
$program = $1 if /^([^\s,]+)(?:,?\s*[^\s,\\-]+)*\s+\\?-/;
}
else # Set a default (useless) NAME paragraph.
{
$_ = sprintf _("%s \\- manual page for %s %s") . "\n", $program,
$program, $version;
}
}
# Man pages traditionally have the page title in caps.
my $PROGRAM = uc $program;
# Set default page head/footers
$source ||= "$program $version";
unless ($manual)
{
for ($section)
{
if (/^(1[Mm]|8)/) { $manual = enc _('System Administration Utilities') }
elsif (/^6/) { $manual = enc _('Games') }
else { $manual = enc _('User Commands') }
}
}
# Extract usage clause(s) [if any] for SYNOPSIS.
# Translators: "Usage" and "or" here are patterns (regular expressions) which
# are used to match the usage synopsis in program output. An example from cp
# (GNU coreutils) which contains both strings:
# Usage: cp [OPTION]... [-T] SOURCE DEST
# or: cp [OPTION]... SOURCE... DIRECTORY
# or: cp [OPTION]... -t DIRECTORY SOURCE...
my $PAT_USAGE = _('Usage');
my $PAT_USAGE_CONT = _('or');
if ($help_text =~ s/^($PAT_USAGE):( +(\S+))(.*)((?:\n(?: {6}\1| *($PAT_USAGE_CONT): +\S).*)*)//om)
{
my @syn = $3 . $4;
if ($_ = $5)
{
s/^\n//;
for (split /\n/) { s/^ *(($PAT_USAGE_CONT): +)?//o; push @syn, $_ }
}
my $synopsis = '';
for (@syn)
{
$synopsis .= ".br\n" if $synopsis;
s!^\S*/!!;
s/^lt-// if $opt_libtool;
s/^(\S+) *//;
$synopsis .= ".B $1\n";
s/\s+$//;
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
s/^/\\fI/ unless s/^\\fR//;
$_ .= '\fR';
s/(\\fI)( *)/$2$1/g;
s/\\fI\\fR//g;
s/^\\fR//;
s/\\fI$//;
s/^\./\\&./;
$synopsis .= "$_\n";
}
$include{_('SYNOPSIS')} ||= $synopsis;
}
# Process text, initial section is DESCRIPTION.
my $sect = _('DESCRIPTION');
$_ = "$help_text\n\n$version_text";
# Normalise paragraph breaks.
s/^\n+//;
s/\n*$/\n/;
s/\n\n+/\n\n/g;
# Join hyphenated lines.
s/([A-Za-z])-\n *([A-Za-z])/$1$2/g;
# Temporarily exchange leading dots, apostrophes and backslashes for
# tokens.
s/^\./\x80/mg;
s/^'/\x81/mg;
s/\\/\x82/g;
# Translators: patterns are used to match common program output. In the source
# these strings are all of the form of "my $PAT_something = _('...');" and are
# regular expressions. If there is more than one commonly used string, you
# may separate alternatives with "|". Spaces in these expressions are written
# as " +" to indicate that more than one space may be matched. The string
# "(?:[\\w-]+ +)?" in the bug reporting pattern is used to indicate an
# optional word, so that either "Report bugs" or "Report _program_ bugs" will
# be matched.
my $PAT_BUGS = _('Report +(?:[\w-]+ +)?bugs|Email +bug +reports +to');
my $PAT_AUTHOR = _('Written +by');
my $PAT_OPTIONS = _('Options');
my $PAT_ENVIRONMENT = _('Environment');
my $PAT_FILES = _('Files');
my $PAT_EXAMPLES = _('Examples');
my $PAT_FREE_SOFTWARE = _('This +is +free +software');
# Start a new paragraph (if required) for these.
s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR) /$1\n\n$2 /og;
# Convert iso-8859-1 copyright symbol or (c) to nroff
# character.
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
sub convert_option;
while (length)
{
# Convert some standard paragraph names.
if (s/^($PAT_OPTIONS): *\n//o)
{
$sect = _('OPTIONS');
next;
}
if (s/^($PAT_ENVIRONMENT): *\n//o)
{
$sect = _('ENVIRONMENT');
next;
}
if (s/^($PAT_FILES): *\n//o)
{
$sect = _('FILES');
next;
}
elsif (s/^($PAT_EXAMPLES): *\n//o)
{
$sect = _('EXAMPLES');
next;
}
# Copyright section
if (/^Copyright /)
{
$sect = _('COPYRIGHT');
}
# Bug reporting section.
elsif (/^($PAT_BUGS) /o)
{
$sect = _('REPORTING BUGS');
}
# Author section.
elsif (/^($PAT_AUTHOR)/o)
{
$sect = _('AUTHOR');
}
# Examples, indicated by an indented leading $, % or > are
# rendered in a constant width font.
if (/^( +)([\$\%>] )\S/)
{
my $indent = $1;
my $prefix = $2;
my $break = '.IP';
$include{$sect} ||= '';
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
{
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
$break = '.br';
}
next;
}
my $matched = '';
$include{$sect} ||= '';
# Sub-sections have a trailing colon and the second line indented.
if (s/^(\S.*:) *\n / /)
{
$matched .= $& if %append;
$include{$sect} .= qq(.SS "$1"\n);
}
my $indent = 0;
my $content = '';
# Option with description.
if (s/^( {1,10}([+-]\S.*?))(?:( +(?!-))|\n( {20,}))(\S.*)\n//)
{
$matched .= $& if %append;
$indent = length ($4 || "$1$3");
$content = ".TP\n\x84$2\n\x84$5\n";
unless ($4)
{
# Indent may be different on second line.
$indent = length $& if /^ {20,}/;
}
}
# Option without description.
elsif (s/^ {1,10}([+-]\S.*)\n//)
{
$matched .= $& if %append;
$content = ".HP\n\x84$1\n";
$indent = 80; # not continued
}
# Indented paragraph with tag.
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
{
$matched .= $& if %append;
$indent = length $1;
$content = ".TP\n\x84$2\n\x84$3\n";
}
# Indented paragraph.
elsif (s/^( +)(\S.*)\n//)
{
$matched .= $& if %append;
$indent = length $1;
$content = ".IP\n\x84$2\n";
}
# Left justified paragraph.
else
{
s/(.*)\n//;
$matched .= $& if %append;
$content = ".PP\n" if $include{$sect};
$content .= "$1\n";
}
# Append continuations.
while ($indent ? s/^ {$indent}(\S.*)\n// : s/^(\S.*)\n//)
{
$matched .= $& if %append;
$content .= "\x84$1\n";
}
# Move to next paragraph.
s/^\n+//;
for ($content)
{
# Leading dot and apostrophe protection.
s/\x84\./\x80/g;
s/\x84'/\x81/g;
s/\x84//g;
# Examples should be verbatim.
unless ($sect eq _('EXAMPLES'))
{
# Convert options.
s/(^|[ (])(-[][\w=-]+)/$1 . convert_option $2/mge;
# Italicise filenames: /a/b, $VAR/c/d, ~/e/f
s!
(^|[ (]) # space/punctuation before
(
(?:\$\w+|~)? # leading variable, or tilde
(?:/\w(?:[\w.-]*\w)?)+ # path components
)
($|[ ,;.)]) # space/punctuation after
!$1\\fI$2\\fP$3!xmg;
}
# Escape remaining hyphens.
s/-/\x83/g;
if ($sect eq _('COPYRIGHT'))
{
# Insert line breaks before additional copyright messages
# and the disclaimer.
s/\n(Copyright |$PAT_FREE_SOFTWARE)/\n.br\n$1/og;
}
elsif ($sect eq _('REPORTING BUGS'))
{
# Handle multi-line bug reporting sections of the form:
#
# Report bugs to
# GNU home page:
# ...
s/\n([[:upper:]])/\n.br\n$1/g;
}
}
# Check if matched paragraph contains /pat/.
if (%append)
{
for my $pat (keys %append)
{
if ($matched =~ $pat)
{
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
$content .= $append{$pat};
}
}
}
$include{$sect} .= $content;
}
# Refer to the real documentation.
unless ($opt_no_info)
{
my $info_page = $opt_info || $program;
$sect = _('SEE ALSO');
$include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
$include{$sect} .= sprintf _(<<'EOT'), $program, $program, $info_page;
The full documentation for
.B %s
is maintained as a Texinfo manual. If the
.B info
and
.B %s
programs are properly installed at your site, the command
.IP
.B info %s
.PP
should give you access to the complete manual.
EOT
}
# Output header.
print <$stderr`;
unless ($value)
{
my $err = N_("%s: can't get `%s' info from %s%s");
my $extra = $discard_stderr
? "\n" . N_("Try `--no-discard-stderr' if option outputs to stderr")
: '';
kark $err, $this_program, $opt, $prog, $extra;
}
return $value;
}
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
# embolden. Option arguments get italicised.
sub convert_option
{
local $_ = '\fB' . shift;
s/-/\x83/g;
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
{
s/=(.)/\\fR=\\fI$1/;
s/ (.)/ \\fI$1/;
$_ .= '\fR';
}
$_;
}
07070100068623000041ed00000000000000000000000451749d7600000000000000b500010002ffffffffffffffff0000001500000000root/usr/local/share 07070100068626000041ed00000000000000000000000351749d7600000000000000b500010002ffffffffffffffff0000001900000000root/usr/local/share/man 07070100068627000041ed00000000000000000000000251749d7600000000000000b500010002ffffffffffffffff0000001e00000000root/usr/local/share/man/man1 07070100068628000081a400000000000000000000000151749d7100000ec5000000b500010002ffffffffffffffff0000002900000000root/usr/local/share/man/man1/help2man.1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2.
.TH HELP2MAN "1" "April 2013" "help2man 1.41.2" "User Commands"
.SH NAME
help2man \- generate a simple manual page
.SH SYNOPSIS
.B help2man
[\fIOPTION\fR]... \fIEXECUTABLE\fR
.SH DESCRIPTION
`help2man' generates a man page out of `\-\-help' and `\-\-version' output.
.TP
\fB\-n\fR, \fB\-\-name\fR=\fISTRING\fR
description for the NAME paragraph
.TP
\fB\-s\fR, \fB\-\-section\fR=\fISECTION\fR
section number for manual page (1, 6, 8)
.TP
\fB\-m\fR, \fB\-\-manual\fR=\fITEXT\fR
name of manual (User Commands, ...)
.TP
\fB\-S\fR, \fB\-\-source\fR=\fITEXT\fR
source of program (FSF, Debian, ...)
.TP
\fB\-L\fR, \fB\-\-locale\fR=\fISTRING\fR
select locale (default "C")
.TP
\fB\-i\fR, \fB\-\-include\fR=\fIFILE\fR
include material from `FILE'
.TP
\fB\-I\fR, \fB\-\-opt\-include\fR=\fIFILE\fR
include material from `FILE' if it exists
.TP
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
send output to `FILE'
.TP
\fB\-p\fR, \fB\-\-info\-page\fR=\fITEXT\fR
name of Texinfo manual
.TP
\fB\-N\fR, \fB\-\-no\-info\fR
suppress pointer to Texinfo manual
.TP
\fB\-l\fR, \fB\-\-libtool\fR
exclude the `lt\-' from the program name
.TP
\fB\-\-help\fR
print this help, then exit
.TP
\fB\-\-version\fR
print version number, then exit
.PP
EXECUTABLE should accept `\-\-help' and `\-\-version' options and produce output on
stdout although alternatives may be specified using:
.TP
\fB\-h\fR, \fB\-\-help\-option\fR=\fISTRING\fR
help option string
.TP
\fB\-v\fR, \fB\-\-version\-option\fR=\fISTRING\fR
version option string
.TP
\fB\-\-version\-string\fR=\fISTRING\fR
version string
.TP
\fB\-\-no\-discard\-stderr\fR
include stderr when parsing option output
.SH "INCLUDE FILES"
Additional material may be included in the generated output with the
.B \-\-include
and
.B \-\-opt\-include
options. The format is simple:
[section]
text
/pattern/
text
Blocks of verbatim *roff text are inserted into the output either at
the start of the given
.BI [ section ]
(case insensitive), or after a paragraph matching
.BI / pattern /\fR.
Patterns use the Perl regular expression syntax and may be followed by
the
.IR i ,
.I s
or
.I m
modifiers (see
.BR perlre (1)).
Lines before the first section or pattern which begin with `\-' are
processed as options. Anything else is silently ignored and may be
used for comments, RCS keywords and the like.
The section output order (for those included) is:
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT
FILES
EXAMPLES
\fIother\fR
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO
Any
.B [NAME]
or
.B [SYNOPSIS]
sections appearing in the include file will replace what would have
automatically been produced (although you can still override the
former with
.B --name
if required).
Other sections are prepended to the automatically produced output for
the standard sections given above, or included at
.I other
(above) in the order they were encountered in the include file.
.SH AVAILABILITY
The latest version of this distribution is available on-line from:
ftp://ftp.gnu.org/gnu/help2man/
.SH AUTHOR
Written by Brendan O'Dea
.SH "REPORTING BUGS"
Report bugs to .
.SH COPYRIGHT
Copyright \(co 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010,
2011, 2012 Free Software Foundation, Inc.
.br
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
The full documentation for
.B help2man
is maintained as a Texinfo manual. If the
.B info
and
.B help2man
programs are properly installed at your site, the command
.IP
.B info help2man
.PP
should give you access to the complete manual.
07070100068624000041ed00000000000000000000000251749d7600000000000000b500010002ffffffffffffffff0000001a00000000root/usr/local/share/info 07070100068625000081a400000000000000000000000151749d71000041af000000b500010002ffffffffffffffff0000002800000000root/usr/local/share/info/help2man.info This is help2man.info, produced by makeinfo version 4.13 from
help2man.texi.
INFO-DIR-SECTION Software development
START-INFO-DIR-ENTRY
* help2man: (help2man). Automatic manual page generation.
END-INFO-DIR-ENTRY
This file documents the GNU `help2man' command which produces simple
manual pages from the `--help' and `--version' output of other commands.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010,
2011 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.
File: help2man.info, Node: Top, Next: Overview, Up: (dir)
`help2man'
**********
`help2man' produces simple manual pages from the `--help' and
`--version' output of other commands.
* Menu:
* Overview:: Overview of `help2man'.
* Invoking help2man:: How to run `help2man'.
* --help recommendations:: Recommended formatting for --help output.
* Including text:: Including additional text in the output.
* Makefile usage:: Using `help2man' with `make'.
* Localised man pages:: Producing native language manual pages.
* Example:: Example `help2man' output.
* Reports:: Reporting bugs or suggestions.
* Availability:: Obtaining `help2man'.
File: help2man.info, Node: Overview, Next: Invoking help2man, Prev: Top, Up: Top
1 Overview of `help2man'
************************
`help2man' is a tool for automatically generating simple manual pages
from program output.
Although manual pages are optional for GNU programs other projects,
such as Debian require them (*note Man Pages: (standards)Man Pages.)
This program is intended to provide an easy way for software authors
to include a manual page in their distribution without having to
maintain that document.
Given a program which produces reasonably standard `--help' and
`--version' outputs, `help2man' can re-arrange that output into
something which resembles a manual page.
File: help2man.info, Node: Invoking help2man, Next: --help recommendations, Prev: Overview, Up: Top
2 How to Run `help2man'
***********************
The format for running the `help2man' program is:
`help2man' [OPTION]... EXECUTABLE
`help2man' supports the following options:
`-n STRING'
`--name=STRING'
Use STRING as the description for the `NAME' paragraph of the
manual page.
By default (for want of anything better) this paragraph contains
`manual page for PROGRAM VERSION'.
This option overrides an include file `[name]' section (*note
Including text::).
`-s SECTION'
`--section SECTION'
Use SECTION as the section for the man page. The default section
is 1.
`-m MANUAL'
`--manual=MANUAL'
Set the name of the manual section to SECTION, used as a centred
heading for the manual page. By default `User Commands' is used
for pages in section 1, `Games' for section 6 and `System
Administration Utilities' for sections 8 and 1M.
`-S SOURCE'
`--source=SOURCE'
The program source is used as a page footer, and often contains
the name of the organisation or a suite of which the program is
part. By default the value is the package name and version.
`-L LOCALE'
`--locale=LOCALE'
Select output locale (default `C'). Both the program and
`help2man' must support the given LOCALE (*note Localised man
pages::).
`-i FILE'
`--include=FILE'
Include material from FILE (*note Including text::).
`-I FILE'
`--opt-include=FILE'
A variant of `--include' for use in Makefile pattern rules which
does not require FILE to exist.
`-o FILE'
`--output=FILE'
Send output to FILE rather than `stdout'.
`-p TEXT'
`--info-page=TEXT'
Name of Texinfo manual.
`-N'
`--no-info'
Suppress inclusion of a `SEE ALSO' paragraph directing the reader
to the Texinfo documentation.
`-l'
`--libtool'
Drop `lt-' prefix from instances of the program name in the
synopsis (`libtool' creates wrapper scripts in the build directory
which invoke `foo' as `.libs/lt-foo').
`--help'
`--version'
Show help or version information.
By default `help2man' passes the standard `--help' and `--version'
options to the executable although alternatives may be specified using:
`-h OPTION'
`--help-option=OPTION'
Help option string.
`-v OPTION'
`--version-option=OPTION'
Version option string.
`--version-string=STRING'
Version string.
`--no-discard-stderr'
Include stderr when parsing option output.
File: help2man.info, Node: --help recommendations, Next: Including text, Prev: Invoking help2man, Up: Top
3 `--help' Recommendations
**************************
Here are some recommendations for what to include in your `--help'
output. Including these gives `help2man' the best chance at generating
a respectable man page, as well as benefitting users directly.
*Note Command-Line Interfaces: (standards)Command-Line Interfaces,
and *note Man Pages: (standards)Man Pages, for the official GNU
standards relating to `--help' and man pages.
* A synopsis of how to invoke the program. If different usages of
the program have different invocations, then list them all. For
example (edited for brevity):
Usage: cp [OPTION]... SOURCE DEST
or: cp [OPTION]... SOURCE... DIRECTORY
...
Use `argv[0]' for the program name in these synopses, just as it
is, with no directory stripping. This is in contrast to the
canonical (constant) name of the program which is used in
`--version'.
* A very brief explanation of what the program does, including
default and/or typical behaviour. For example, here is `cp''s:
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
* A list of options, indented to column 2. If the program supports
one-character options, put those first, then the equivalent long
option (if any). If the option takes an argument, include that
too, giving it a meaningful name. Align the descriptions in a
convenient column, if desired. Note that to be correctly
recognised by `help2man' the description must be separated from
the options by at least two spaces and descriptions continued on
subsequent lines must start at the same column.
Here again is an (edited) excerpt from `cp', showing a short
option with an equivalent long option, a long option only, and a
short option only:
-a, --archive same as -dpR
--backup[=CONTROL] make a backup of each ...
-b like --backup but ...
For programs that take many options, it may be desirable to split
the option list into sections such as `Global', `Output control',
or whatever makes sense in the particular case. It is usually
best to alphabetise (by short option name first, then long) within
each section, or the entire list if there are no sections.
* Any useful additional information about program behaviour, such as
influential environment variables, further explanation of options,
etc. For example, `cp' discusses `VERSION_CONTROL' and sparse
files.
* A few examples of typical usage, at your discretion. One good
example is usually worth a thousand words of description, so this
is highly recommended.
* In closing, a line stating how to email bug reports. Typically,
MAILING-ADDRESS will be `bug-PROGRAM@gnu.org'; please use this
form for GNU programs whenever possible. It's also good to
mention the home page of the program, other mailing lists, etc.
The `argp' and `popt' programming interfaces let you specify option
descriptions for `--help' in the same structure as the rest of the
option definition; you may wish to consider using these routines for
option parsing instead of `getopt'.
File: help2man.info, Node: Including text, Next: Makefile usage, Prev: --help recommendations, Up: Top
4 Including Additional Text in the Output
*****************************************
Additional static text may be included in the generated manual page by
using the `--include' and `--opt-include' options (*note Invoking
help2man::). While these files can be named anything, for consistency
we suggest to use the extension `.h2m' for help2man include files.
The format for files included with these option is simple:
[section]
text
/pattern/
text
Blocks of verbatim *roff text are inserted into the output either at
the start of the given `[section]' (case insensitive), or after a
paragraph matching `/pattern/'.
Patterns use the Perl regular expression syntax and may be followed
by the `i', `s' or `m' modifiers (*note perlre(1): (*manpages*)perlre.)
Lines before the first section or pattern which begin with `-' are
processed as options. Anything else is silently ignored and may be
used for comments, RCS keywords and the like.
The section output order (for those included) is:
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT
FILES
EXAMPLES
_other_
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO
Any `[name]' or `[synopsis]' sections appearing in the include file
will replace what would have automatically been produced (although you
can still override the former with `--name' if required).
Other sections are prepended to the automatically produced output for
the standard sections given above, or included at _other_ (above) in
the order they were encountered in the include file.
File: help2man.info, Node: Makefile usage, Next: Localised man pages, Prev: Including text, Up: Top
5 Using `help2man' With `make'
******************************
A suggested use of `help2man' in Makefiles is to have the manual page
depend not on the binary, but on the source file(s) in which the
`--help' and `--version' output are defined.
This usage allows a manual page to be generated by the maintainer and
included in the distribution without requiring the end-user to have
`help2man' installed.
An example rule for the program `prog' could be:
prog.1: $(srcdir)/main.c
-$(HELP2MAN) --output=$@ --name='an example program' ./prog
The value of `HELP2MAN' may be set in `configure.in' using either of:
AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
for `automake', or something like:
AC_PATH_PROG(HELP2MAN, help2man, false // No help2man //)
for `autoconf' alone.
File: help2man.info, Node: Localised man pages, Next: Example, Prev: Makefile usage, Up: Top
6 Producing Native Language Manual Pages
****************************************
Manual pages may be produced for any locale supported by both the
program and `help2man' with the `--locale' (`-L') option.
help2man -L fr_FR@euro -o cp.fr.1 cp
See `http://translationproject.org/domain/help2man.html' for the
languages currently supported by `help2man', and *note Reports:: for
how to submit other translations.
6.1 Changing the Location of Message Catalogs
=============================================
When creating localised manual pages from a program's build directory it
is probable that the translations installed in the standard location
will not be (if installed at all) correct for the version of the
program being built.
A preloadable library is provided with `help2man' which will
intercept `bindtextdomain' calls configuring the location of message
catalogs for the domain given by `$TEXTDOMAIN' and override the
location to the path given by `$LOCALEDIR'.
So for example:
mkdir -p tmp/fr/LC_MESSAGES
cp po/fr.gmo tmp/fr/LC_MESSAGES/PROG.mo
LD_PRELOAD="/usr/lib/help2man/bindtextdomain.so" \
LOCALEDIR=tmp \
TEXTDOMAIN=PROG \
help2man -L fr_FR@euro -i PROG.fr.h2m -o PROG.fr.1 PROG
rm -rf tmp
will cause PROG to load the message catalog from `tmp' rather than
`/usr/share/locale'.
Notes:
* The generalisation of `fr_FR@euro' to `fr' in the example above is
done by `gettext', if a more specific match were available it
would also have been re-mapped.
* This preload has only been tested against `eglibc' 2.11.2 and
`gettext' 0.18.1.1 on a GNU/Linux system; let me know if it does
(or doesn't) work for you (*note Reports::).
File: help2man.info, Node: Example, Next: Reports, Prev: Localised man pages, Up: Top
7 Example `help2man' Output
***************************
Given a hypothetical program `foo' which produces the following output:
$ foo --version
GNU foo 1.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by A. Programmer.
$ foo --help
GNU `foo' does nothing interesting except serve as an example for
`help2man'.
Usage: foo [OPTION]...
Options:
-a, --option an option
-b, --another-option[=VALUE]
another option
--help display this help and exit
--version output version information and exit
Examples:
foo do nothing
foo --option the same thing, giving `--option'
Report bugs to .
`help2man' will produce `nroff' input for a manual page which will
be formatted something like this:
FOO(1) User Commands FOO(1)
NAME
foo - manual page for foo 1.1
SYNOPSIS
foo [OPTION]...
DESCRIPTION
GNU `foo' does nothing interesting except serve as an example for
`help2man'.
OPTIONS
-a, --option
an option
-b, --another-option[=VALUE]
another option
--help display this help and exit
--version
output version information and exit
EXAMPLES
foo do nothing
foo --option
the same thing, giving `--option'
AUTHOR
Written by A. Programmer.
REPORTING BUGS
Report bugs to .
COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
SEE ALSO
The full documentation for foo is maintained as a Texinfo manual.
If the info and foo programs are properly installed at your site,
the command
info foo
should give you access to the complete manual.
foo 1.1 May 2011 FOO(1)
File: help2man.info, Node: Reports, Next: Availability, Prev: Example, Up: Top
8 Reporting Bugs or Suggestions
*******************************
If you find problems or have suggestions about this program or manual,
please report them to .
Note to translators: Translations are handled though the Translation
Project (http://translationproject.org/) see
`http://translationproject.org/html/translators.html' for details.
File: help2man.info, Node: Availability, Prev: Reports, Up: Top
9 Obtaining `help2man'
**********************
The latest version of this distribution is available online from GNU
mirrors:
`http://ftpmirror.gnu.org/help2man/'
If automatic redirection fails, the list of mirrors is at:
`http://www.gnu.org/order/ftp.html'
Or if need be you can use the main GNU ftp server:
`http://ftp.gnu.org/gnu/help2man/'
Tag Table:
Node: Top1134
Node: Overview1900
Node: Invoking help2man2607
Node: --help recommendations5165
Node: Including text8564
Node: Makefile usage10272
Node: Localised man pages11203
Node: Example13039
Node: Reports15644
Node: Availability16098
End Tag Table
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!