[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.4.3-113-ga91c08e



The following commit has been merged in the master branch:
commit a91c08e4c7fe63f466ac1b4a08bafc9d5b0cbbdc
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Jan 6 10:58:15 2011 +0100

    Rewrote manpages in pod. Parts of lintian(1) is now generated from
    the desc files in collection/ and checks/ .

diff --git a/debian/manpages b/debian/manpages
index ffb3534..ff020fe 100644
--- a/debian/manpages
+++ b/debian/manpages
@@ -1,2 +1,2 @@
-man/lintian.1
-man/lintian-info.1
+man/man1/lintian.1
+man/man1/lintian-info.1
diff --git a/debian/rules b/debian/rules
index 08d11c0..10789b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -48,6 +48,9 @@ build-stamp: $(neededfiles) $(docsource) $(testtarget)
 	dh_testdir
 	cd doc && LANG=C debiandoc2html lintian.sgml
 	cd doc && LANG=C debiandoc2text lintian.sgml
+	mkdir man/man1/
+	private/generate-lintian-pod | pod2man --section=1 > man/man1/lintian.1
+	pod2man --section=1 man/lintian-info.pod > man/man1/lintian-info.1
 	LINTIAN_ROOT="" ./frontend/lintian --help \
 		| tail -n +3 | $(PERL) -n -e 'print "  $$_"' >doc/help.tmp
 	$(PERL) -p -e 'BEGIN { open HELP, "<", "doc/help.tmp" or die; local $$/ = undef; $$h = <HELP> }; s/%LINTIAN_HELP%/$$h/' doc/README.in >doc/README
@@ -65,6 +68,7 @@ clean: $(neededfiles)
 	rm -f doc/help.tmp doc/README
 	rm -rf doc/lintian.html/ doc/lintian.txt
 	rm -rf debian/tests
+	rm -rf man/man1/
 	find -name "*.py?" -print0 | xargs -0r rm
 	dh_clean
 
diff --git a/man/lintian-info.1 b/man/lintian-info.1
deleted file mode 100644
index 2018e0c..0000000
--- a/man/lintian-info.1
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" Copyright (C) 1998 Richard Braakman and Christian Schwarz
-.\"
-.\" This manual page is free software.  It is distributed under the
-.\" terms of the GNU General Public License as published by the Free
-.\" Software Foundation; either version 2 of the License, or (at your
-.\" option) any later version.
-.\"
-.\" This manual page 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 manual page; if not, write to the Free Software
-.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
-.\" USA
-.\"
-.TH LINTIAN-INFO 1 "August 16, 2006" "Debian GNU/Linux"
-.if n .ad l
-.nh
-
-.SH NAME
-lintian-info \- give detailed information about Lintian's error tags
-
-.SH SYNOPSIS
-.B lintian-info
-.RI [ log-file ... ]
-\&...
-
-.B lintian-info \-\-tags
-.I tag
-\&...
-
-.SH DESCRIPTION
-.PP
-The
-.B lintian-info
-command parses the output of the
-.B lintian
-command and gives verbose information about the listed Lintian error
-tags, parses a Lintian override file and gives verbose information about
-the tags included, or (if given the
-.BR \-t " or " \-\-tags
-option) explains a given tag or tags.
-.sp
-If no log-file is specified on the command line, this command expects
-its input on stdin. Thus, the output of
-.B lintian
-can either be piped through
-.B lintian-info
-or a log file produced by
-.B lintian
-can be processed with this command.  (Note, though, that the
-.B lintian
-command has a command line option
-.B \-i
-to display the same results as
-.BR lintian-info ,
-so you will not normally need to pipe the output of
-.B lintian
-into this command.)
-
-.SH OPTIONS
-.TP
-.BR \-a ", " \-\-annotate
-Read from standard input or any files specified on the command line and
-search the input for lines formatted like Lintian override entries.  For
-each one that was found, display verbose information about that tag.
-
-.TP
-.BR \-h ", " \-\-help
-Display usage information and exit.
-
-.TP
-.BR \-t ", " \-\-tags
-Rather than treating them as log file names, treat any command-line
-options as tag names and display the descriptions of each tag.
-
-.SH EXIT STATUS
-.PP
-If
-.BR \-t " or " \-\-tags
-was given and one or more of the tags specified were unknown, this command
-returns the exit code 1.  Otherwise, it always returns with exit code 0.
-
-.SH SEE ALSO
-.BR lintian (1)
-
-.SH AUTHORS
-Richard Braakman <dark@xs4all.nl>
-.br
-Christian Schwarz <schwarz@monet.m.isar.de>
diff --git a/man/lintian-info.pod b/man/lintian-info.pod
new file mode 100644
index 0000000..c44dec0
--- /dev/null
+++ b/man/lintian-info.pod
@@ -0,0 +1,89 @@
+# Copyright 2010 Niels Thyker
+#  - based on the work Richard Braakman and Christian
+#    Schwarz (copyrighted 1998).
+#
+# This manual page is free software.  It is distributed under the
+# terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This manual page 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 manual page; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+#
+
+=head1 NAME
+
+lintian-info - give detailed information about Lintian's error tags
+
+=head1 SYNOPSIS
+
+B<lintian-info> [I<log-file>...]
+
+B<lintian-info> B<--tags> I<tag> ...
+
+=head1 DESCRIPTION
+
+The B<lintian-info> command parses the output of the B<lintian>
+command and gives verbose information about the listed Lintian error
+tags, parses a Lintian override file and gives verbose information
+about the tags included, or (if given the B<-t> or B<--tags> option)
+explains a given tag or tags.
+
+If no log-file is specified on the command line, this command expects
+its input on stdin. Thus, the output of B<lintian> can either be piped
+through B<lintian-info> or a log file produced by B<lintian> can be
+processed with this command.  (Note, though, that the B<lintian>
+command has a command line option B<-i> to display the same results as
+B<lintian-info>, so you will not normally need to pipe the output of
+B<lintian> into this command.)
+
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-a>, B<--annotate>
+
+Read from standard input or any files specified on the command line
+and search the input for lines formatted like Lintian override
+entries.  For each one that was found, display verbose information
+about that tag.
+
+=item B<-h>, B<--help>
+
+Display usage information and exit.
+
+=item B<-t>, B<--tags>
+
+Rather than treating them as log file names, treat any command-line
+options as tag names and display the descriptions of each tag.
+
+=back
+
+=head1 EXIT STATUS
+
+If B<-t> or B<--tags> was given and one or more of the tags specified
+were unknown, this command returns the exit code 1.  Otherwise, it
+always returns with exit code 0.
+
+=head1 SEE ALSO
+
+L<lintian(1)>
+
+=head1 AUTHORS
+
+Niels Thykier <niels@thykier.net>
+
+Richard Braakman <dark@xs4all.nl>
+
+Christian Schwarz <schwarz@monet.m.isar.de>
+
+=cut
+
diff --git a/man/lintian.1 b/man/lintian.1
deleted file mode 100644
index 7270545..0000000
--- a/man/lintian.1
+++ /dev/null
@@ -1,854 +0,0 @@
-.\" Copyright (C) 1998 Richard Braakman and Christian Schwarz
-.\"
-.\" This manual page is free software.  It is distributed under the
-.\" terms of the GNU General Public License as published by the Free
-.\" Software Foundation; either version 2 of the License, or (at your
-.\" option) any later version.
-.\"
-.\" This manual page 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 manual page; if not, write to the Free Software
-.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
-.\" USA
-.\"
-.TH LINTIAN 1 "June 21, 2008" "Debian GNU/Linux"
-.if n .ad l
-.nh
-
-.SH NAME
-lintian \- Debian package checker
-
-.SH SYNOPSIS
-.B lintian
-.RI [ action ]
-.RI [ options ] 
-.RI [ packages ]
-\&...
-
-.SH DESCRIPTION
-.PP
-Lintian dissects Debian packages and reports bugs and policy
-violations.  It contains automated checks for many aspects of Debian
-policy as well as some checks for common errors.
-.sp
-It uses an archive directory, called \fIlaboratory\fR, in which it
-stores information about the packages it examines.  It can keep this
-information between multiple invocations in order to avoid repeating
-expensive data-collection operations.
-.sp
-There are three ways to specify binary, udeb or source packages for Lintian
-to process: by file name (the .deb file for a binary package or the .dsc
-file for a source package), by package name, or by naming a
-.I .changes
-file.  
-If you list packages by package name, you'll have to
-define the 
-.B LINTIAN_DIST
-variable in the configuration file (see below).  Lintian will then
-search for any binary or source packages in this directory for
-packages with the given name. (You can use the
-.BR \-b " (" \-\-binary "), " \-\-udeb
-and
-.BR \-s " (" \-\-source )
-options if you only want to process binary, udeb or source packages.)
-
-If you specify a
-.I .changes
-file, Lintian will process all packages listed in that file.
-This is convenient when checking a new package before uploading it.
-
-.SH OPTIONS
-
-.PP
-Actions of the
-.B lintian
-command: (Only one action can be specified per invocation)
-
-.TP
-.BR \-S ", " \-\-setup\-lab
-Set up or update the laboratory.
-
-.TP
-.BR \-R ", " \-\-remove\-lab
-Remove the laboratory directory.
-
-.TP
-.BR \-c ", " \-\-check
-Run all checks over the specified packages.
-This is the default action.
-
-.TP
-.BR \-C " chk1,chk2,..., " \-\-check\-part " chk1,chk2,..."
-Run only the specified checks.  You can either specify the
-name of the check script or the abbreviation.
-For details, see the CHECKS section below.
-
-.TP
-.BR \-T " tag1,tag2,..., " \-\-tags " tag1,tag2,..."
-Run only the checks that issue the requested tags.  The tests for
-other tags within the check scripts will be run but the tags will
-not be issued.
-
-.TP
-.BR \-\-tags\-from\-file " filename"
-Same functionality as
-.BR \-\-tags ,
-but read the list of tags from a file.  Blank lines and lines beginning
-with # are ignored.  All other lines are taken to be tag names or
-comma-separated lists of tag names to (potentially) issue.
-
-.TP
-.BR \-F ", " \-\-ftp\-master\-rejects
-Run only the checks that issue tags that result in automatic rejects from
-the Debian upload queue.  The list of such tags is refreshed with each
-Lintian release, so may be slightly out of date if it has changed
-recently.  This option does not, as yet, ignore overrides for fatal tags
-for which overrides aren't allowed.
-
-.TP
-.BR \-X " chk1,chk2,..., " \-\-dont\-check\-part " chk1,chk2,..."
-Run all but the the specified checks.  You can either specify
-the name of the check script or the abbreviation.
-For details, see the CHECKS section below.
-
-.TP
-.BR \-u ", " \-\-unpack
-Unpack the specified packages up to the current unpack level.
-The default and only unpack level is 1 for this option.  See the UNPACK
-LEVELS section below.
-
-.TP
-.BR \-r ", " \-\-remove
-Clean up the lintian directory of the specified packages up to
-the current unpack level.  The default unpack level is 0 for
-this option.
-
-.PP
-General options:
-
-.TP
-.BR \-h ", " \-\-help
-Display usage information and exit.
-
-.TP
-.BR \-V ", " \-\-version
-Display lintian version number and exit.
-
-.TP
-.BR \-\-print\-version
-Print unadorned version number and exit.
-
-.TP
-.BR \-v ", " \-\-verbose
-Display verbose messages.
-
-.TP
-.BR \-d ", " \-\-debug
-Display debugging messages. (Implies
-.BR \-v ).
-
-.TP
-.BR \-q ", " \-\-quiet
-Suppress all informational messages.  Currently, the only message this
-suppresses is the message at the end of the run giving the total count of
-overrides.
-
-.PP
-
-Behaviour options for
-.BR lintian .
-
-.TP
-.BR \-i ", " \-\-info
-Print explanatory information about each problem discovered in addition to
-the lintian error tags. To print a long tag description without running
-lintian, see
-.BR lintian\-info (1).
-
-.TP
-.BR \-I ", " \-\-display\-info
-Display informational ("I:") tags as well.  They are normally suppressed.
-(This is equivalent to
-.BR \-L " \(dq>=wishlist\(dq)."
-
-.TP
-.BR \-E ", " \-\-display\-experimental
-Display experimental ("X:") tags as well.  They are normally suppressed.
-
-If a tag is marked experimental, this means that the code that generates
-this message is not as well tested as the rest of Lintian, and might still
-give surprising results.  Feel free to ignore Experimental messages that
-do not seem to make sense, though of course bug reports are always
-welcomed (particularly if they include fixes).
-
-.TP
-.BR \-\-pedantic
-Display pedantic ("P:") tags as well.  They are normally suppressed.
-
-Pedantic tags are Lintian at its most pickiest and include checks for
-particular Debian packaging styles and checks that many people disagree
-with.  Expect false positives and Lintian tags that you don't consider
-useful if you use this option.  Adding overrides for pedantic tags is
-probably not worth the effort.
-
-.TP
-.BR \-L " [+|-|=][>=|>|<|<=][S|C|S/C], " \-\-display\-level " [+|-|=][>=|>|<|<=][S|C|S/C]"
-Fine-grained selection of tags to be displayed. It is possible to add, remove
-or set the levels to display, specifying a severity (S: serious, important,
-normal, minor, wishlist), a certainty (C: certain, possible, wild-guess), or
-both (S/C).  The default settings are equivalent to
-.BR \-L " \(dq>=important\(dq " \-L " \(dq+>=normal/possible\(dq " \-L " +minor/certain)."
-
-.TP
-.BR \-\-suppress\-tags " tag1,tag2,..."
-Suppress the listed tags.  They will not be reported if they occur and
-will not affect the exit status of Lintian.
-
-.TP
-.BR \-\-suppress\-tags\-from\-file " file"
-Suppress all tags listed in the given file.  Blank lines and lines
-beginning with # are ignored.  All other lines are taken to be tag names
-or comma-separated lists of tag names to suppress.  The suppressed tags
-will not be reported if they occur and will not affect the exit status of
-Lintian.
-
-.TP
-.BR \-l " n, " \-\-unpack\-level " n"
-Set unpack level to
-.IR n .
-See the UNPACK LEVELS section, below.
-
-.TP
-.BR \-o ", " \-\-no\-override
-Don't use the overrides file.
-
-.TP
-.BR \-\-show\-overrides
-Output tags that have been overridden.
-
-.TP
-.BR \-\-color " (never|always|auto|html)"
-Whether to colorize tags in lintian output based on their severity.  The
-default is "never", which never uses color.  "always" will always use
-color, "auto" will use color only if the output is going to a terminal,
-and "html" will use HTML <span> tags with a color style attribute (instead
-of ANSI color escape sequences).
-
-.TP
-.BR \-U " info1,info2,..., " \-\-unpack\-info " info1,info2,..."
-Collect information info1, info2, etc. even if these are not
-required by the checks.
-
-.TP
-.BR \-m ", " \-\-md5sums ", " \-\-checksums
-Check checksums when processing a .changes file.  Normally, Lintian only
-checks the checksums for .dsc files when processing a .changes file.
-
-.TP
-.BR \-\-allow\-root
-Override
-.BR lintian 's
-warning when it is run with superuser privileges.
-
-.TP
-.BR \-\-fail\-on\-warnings
-By default,
-.B lintian
-exits with 0 status if only warnings were found.  If this flag is given,
-exit with a status of 1 if either warnings or errors are found.
-
-.TP
-.BR \-\-keep\-lab
-By default, temporary labs will be removed after lintian is finished.
-Specifying this options will leave the lab behind, which might be
-useful for debugging purposes.  You can find out where the temporary
-lab is located by running lintian with the
-.B \-\-verbose
-option.  Implies
-.B \-\-unpack\-level=2
-unless another unpack level is specified directly.
-
-.PP
-
-Configuration options:
-
-.TP
-.BR \-\-cfg " configfile"
-Read the configuration from
-.IR configfile
-rather than the default locations.  This option overrides the
-.B LINTIAN_CFG
-environment variable.
-
-.TP
-.BR \-\-lab " labdir"
-Use
-.IR labdir
-as the permanent laboratory.  This is where Lintian keeps information about
-the packages it checks.  This option overrides the
-.B LINTIAN_LAB
-environment variable and the configuration file entry of the same
-name.
-
-.TP
-.BR \-\-archivedir " archivedir"
-Location of Debian archive to scan for packages.  (See the FILES section
-for complete information on how the path is constructed.)  Use this if you
-want Lintian to check the whole Debian archive instead of just single
-packages. This option overrides the
-.B LINTIAN_ARCHIVEDIR
-environment variable and the configuration file entry of the same
-name.
-
-.TP
-.BR \-\-dist " distdir"
-Scan for packages in the
-.IR distdir
-directory.  (See the FILES section for complete information on how the
-path is constructed.)  Use this if you want Lintian to check the whole
-Debian archive instead of just single packages.  This option overrides the
-.B LINTIAN_DIST
-environment variable and the configuration file entry of the same
-name.
-
-.TP
-.BR \-\-area " area"
-When scanning for packages in the distdir, select only packages from
-the comma-separated list of archive areas
-.IR areas
-(e.g. main, contrib). This option overrides the
-.B LINTIAN_AREA
-environment variable and the configuration file entry of the same name.
-
-.TP
-.BR \-\-section " area"
-This is an old name for the
-.B \-\-area
-option and accepted as a synonym for that option.
-
-.TP
-.BR \-\-arch " arch"
-When scanning for packages in the distdir, select only packages for
-architecture
-.IR arch .
-This option overrides the
-.B LINTIAN_ARCH
-environment variable and the configuration file entry of the same name.
-
-.TP
-.BR \-\-root " rootdir"
-Look for
-.BR lintian 's
-support files (such as check scripts and collection scripts) in
-.IR rootdir .
-This overrides the
-.B LINTIAN_ROOT
-environment variable.  The default location is
-.IR /usr/share/lintian .
-
-.PP
-
-Package selection options:
-
-.TP
-.BR \-a ", " \-\-all
-Check all packages in the distribution. (This requires that the
-LINTIAN_DIST variable is defined in the configuration file.)
-
-.TP
-.BR \-b ", " \-\-binary
-The following packages listed on the command line are binary packages.
-
-.TP
-.BR \-s ", " \-\-source
-The following packages listed on the command line are source packages.
-
-.TP
-.BR \-\-udeb
-The following packages listed on the command line are udeb packages.
-
-.TP
-.BR \-p ", " \-\-packages\-file " X"
-Process all packages which are listed in file
-.BR X .
-Each package has to be listed in a single line using the following format:
-.sp
-.B type package version file
-.sp
-where 
-.B type
-is either `b', `u', or `s' (binary, udeb, or source package),
-.B package
-is the package name,
-.B version
-is the package's version, and
-.B file
-is the package file name (absolute path specification).
-
-.SH "UNPACK LEVELS"
-.TP
-.B "0 (none)"
-The package does not exist in the \fIlaboratory\fR at all.
-
-.TP
-.B "1 (basic)"
-A directory for this package exists in the \fIlaboratory\fR
-and basic information is extracted.  This does not take
-much space.
-
-For binary and udeb packages,
-the
-.I control
-and
-.I fields
-directories and the
-.I index
-file are unpacked, and symbolic links are made to the
-.B .deb
-file and to the lintian directory for the source package.
-
-For source packages, the
-.I binary
-and
-.I fields
-directories are unpacked, and symbolic links are made to the
-source package files.
-
-.TP
-.B "2 (contents)"
-This unpack level is deprecated and no longer functional. The
-\fIunpacked\fR collection script replaced it.
-
-.PP
-Lintian will unpack packages as far as is necessary to do its checks,
-but it will leave the package in whatever unpack level was specified
-when it is done.
-
-The default unpack level can be overwritten by setting the
-.B LINTIAN_UNPACK_LEVEL
-variable in the configuration file.
-
-.SH CHECKS
-.TP
-.B binaries (bin)
-Search for bugs in binaries and object files.
-
-.TP
-.B changelog\-file (chg)
-Check changelog files in a binary package.
-
-.TP
-.B changes\-file (chng)
-Check for various issues with .changes files.
-
-.TP
-.B conffiles (cnf)
-Check if the
-.I conffiles
-control file of a binary package is correct.
-
-.TP
-.B control\-file (dctl)
-This script checks debian/control files in source packages.
-
-.TP
-.B control\-files (ctl)
-Check for unknown control files in the binary package.
-
-.TP
-.B copyright\-file (cpy)
-Check if a binary package conforms to policy with respect to
-the copyright file.  Each binary package must either have a 
-.RI /usr/share/doc/ package /copyright
-file or must have a symlink
-.RI /usr/share/doc/ package \-> foo ,
-where
-.I foo
-comes from the same source package, and this package declares a 
-"Depends" relation on
-.IR foo .
-
-.TP
-.B cruft (deb)
-Looks for cruft in source packages, like files of version control
-systems and temporary files from the build process.
-
-.TP
-.B deb-format (dfmt)
-Checks the format of the binary package ar archive.
-
-.TP
-.B debconf (dc)
-Looks for common mistakes in packages using debconf, like missing
-dependencies or errors in the template file.
-
-.TP
-.B debhelper (dh)
-Looks for common mistakes in source packages using debhelper.
-
-.TP
-.B debian\-readme (drm)
-Check if the README.Debian file is merely the debmake template.
-
-.TP
-.B debian\-source\-dir (dsd)
-Check the debian/source/* control files in source packages for errors.
-
-.TP
-.B description (des)
-Check if the
-.B Description
-control field of a binary package conforms to the rules in the
-Policy Manual (section 3.4).
-
-.TP
-.B etcfiles (etc)
-Checks if all files in
-.B /etc
-that are shipped with the package are marked as conffiles as
-required by policy.
-
-.TP
-.B fields (fld)
-Check control fields of a binary or source package.
-
-.TP
-.B files (fil)
-Check if a binary package conforms to policy with respect to
-types, permissions and ownerships of files and directories.
-
-.TP
-.B huge\-usr\-share (hus)
-Checks whether an architecture-dependent package does
-have a significantly big \fB/usr/share\fR. Big amounts of
-architecture independent data in architecture dependent
-packages waste space on the mirrors.
-
-.TP
-.B infofiles (info)
-Check if a binary package conforms to policy with respect
-to info documents.
-
-.TP
-.B init.d (ini)
-Check if a binary package conforms to policy with respect
-to scripts in \fB/etc/init.d\fR.
-
-.TP
-.B manpages (man)
-Check if a binary package conforms to policy with respect
-to manual pages.
-
-.TP
-.B md5sums (md5)
-If the
-.B md5sum
-control file of a binary package exists, check if it is valid.
-
-.TP
-.B menus (men)
-Check if a binary package conforms to policy with respect
-to 
-.B menu
-and 
-.B doc\-base
-files.
-
-.TP
-.B menu\-format (mnf)
-Check the syntax of menu files installed by the package.
-
-.TP
-.B nmu (nmu)
-Checks whether the package is consistent as to whether it
-is an NMU.
-
-.TP
-.B ocaml (ocaml)
-Checks various things related to packaging of OCaml libraries and other
-software.
-
-.TP
-.B patch\-systems (pat)
-Check source package use of patch systems.
-
-.TP
-.B po\-debconf (pd)
-Looks for common mistakes in packages using po\-debconf.
-
-.TP
-.B rules (rul)
-Looks for common problems in the debian/rules file in source packages.
-
-.TP
-.B scripts (scr)
-Check the the \fB#!\fR lines of scripts in a binary package.
-
-.TP
-.B shared\-libs (shl)
-Check if a binary package conforms to policy with respect to
-shared libraries and the
-.B shlibs
-control file.
-
-.TP
-.B standards\-version (std)
-Check if a source package contains a valid
-.B Standards\-Version
-field in its
-.I debian/control
-file.
-
-.TP
-.B version\-substvars (v\-s)
-Check use of version substvars in a source package, particularly whether
-the relationships between packages allow safe binary NMUs.
-
-.TP
-.B watch\-file (watch)
-Check \fIdebian/watch\fP files in source packages.
-
-.SH COLLECTION
-
-.TP
-.B ar\-info
-Collects the results of "ar t" command for all *.a files in the package.
-
-.TP
-.B changelog\-file
-Copy the changelog file of a package into the lintian directory.
-
-.TP
-.B copyright\-file
-Copy the copyright file of a package into the lintian directory.
-
-.TP
-.B debfiles
-Collects files shipped in the source of the package.
-
-.TP
-.B debian\-readme
-Copy the README.Debian file of a package into the lintian directory.
-
-.TP
-.B diffstat
-Collect the output of the
-.BR diffstat (1)
-utility for the Debian diff in a source package.
-
-.TP
-.B doc\-base\-files
-Copy the contents of 
-.B /usr/share/doc\-base
-into the lintian directory (below \fBdoc\-base\fR).
-
-.TP
-.B file\-info
-Collect the output of the
-.BR file (1)
-utility for each file in a binary, udeb, and source package.
-
-.TP
-.B init.d
-Copy 
-.B /etc/init.d
-scripts into the lintian directory (below \fBinit.d\fR).
-
-.TP
-.B md5sums
-Collect the md5sums of all files in a binary package.
-
-.TP
-.B menu\-files
-Copy the contents of a binary package's
-.I usr/share/doc/menu
-directory into the
-.I menu
-directory in the lab.
-
-.TP
-.B objdump\-info
-Collect the output of the
-.BR objdump (1)
-utility for each file in a binary package.
-
-.TP
-.B override\-file
-Copy the override file of a package into the lintian directory
-
-.TP
-.B scripts
-Collect information about scripts in binary package.
-
-.TP
-.B source-control-file
-Collects information about binary packages from debian/control
-in source packages
-
-.TP
-.B strings
-Collect the output of the
-.BR strings (1)
-utility for each non-debug ELF object in a binary package.
-
-.TP
-.B unpacked
-Unpack the contents of a source or binary package.
-
-.SH FILES
-Lintian looks for its configuration file in the following locations:
-.TP
-The directory given with the \-\-cfg option
-.TP
-.I $LINTIAN_CFG
-.TP 
-.I $LINTIAN_ROOT/lintianrc
-.TP
-.I $HOME/.lintianrc
-.TP
-.I /etc/lintianrc
-.PP
-Lintian uses the following directories:
-.TP
-.I /tmp
-If no lab location is specified via the LINTIAN_LAB environment variable,
-configuration, or the
-.B \-\-lab
-command-line option, lintian defaults to creating a temporary lab
-directory in
-.IR /tmp .
-To change the directory used, set the TMPDIR environment variable to a
-suitable directory.
-.TP
-.I /usr/share/lintian/checks
-Scripts that check aspects of a package.
-.TP
-.I /usr/share/lintian/collection
-Scripts that collect information about a package and store it for
-use by the check scripts.
-.TP
-.I /usr/share/lintian/data
-Supporting data used by Lintian checks and for output formatting.
-.TP
-.I /usr/share/lintian/lib
-Utility scripts used by the other lintian scripts.
-.TP
-.I /usr/share/lintian/unpack
-Scripts that manage the \fIlaboratory\fR.
-
-.PP
-The
-.I /usr/share/lintian
-directory can be overridden with the
-.B LINTIAN_ROOT
-environment variable or the
-.B \-\-root
-option.
-
-.PP
-When looking for packages in a Debian archive, lintian constructs the path
-to the archive from the
-.IR archivedir ,
-.IR distdir ,
-.IR release ,
-.RI and arch
-as follows:
-.sp
-.IR archivedir /dists/ distdir / release / arch
-.sp
-Lintian always expects the "/dists/" path component in paths to Debian
-archives.
-
-.PP
-For binary packages, Lintian looks for overrides in a file named
-.I usr/share/lintian/overrides/<package>
-inside the binary package, where \fI<package>\fP is the name of the binary
-package.  For source packages, Lintian looks for overrides in
-.I debian/source/lintian-overrides
-and then in
-.I debian/source.lintian-overrides
-if the first file is not found.  The first path is preferred.  See the
-Lintian User's Manual for the syntax of overrides.
-
-.SH EXIT STATUS
-.TP
-.B 0
-No policy violations or major errors detected.  (There may have been
-warnings, though.)
-.TP
-.B 1
-Policy violations or major errors detected.
-.TP
-.B 2
-Lintian run-time error. An error message is sent to stderr.
-
-.SH USAGE
-Examples:
-.TP
-.B "$ lintian foo.deb"
-Check binary package foo given by foo.deb.
-.TP
-.B "$ lintian foo.dsc"
-Check source package foo given by foo.dsc.
-.TP
-.B "$ lintian foo.dsc -L +minor/possible"
-Check source package foo given by foo.dsc, including minor/possible tags.
-.TP
-.B "$ lintian foo"
-Search for package foo in the Debian archive and check it. (Depending
-on what is found, this command will check either the source or binary
-package foo, or both.)
-.TP
-.B "$ lintian --archivedir /var/packages --dist custom --section main"
-Check all packages found in the Debian archive at
-.IR /var/packages/dists/custom/main .
-.TP
-.B "$ lintian \-i foo.changes"
-Check the changes file and, if listed, the source and binary package
-of the upload. The output will contain detailed information about the
-reported tags.
-.TP
-.B "$ lintian \-c \-\-binary foo"
-Search for binary package foo in the Debian archive and check it. 
-.TP
-.B "$ lintian \-C cpy \-\-source foo"
-Run the copyright checks on source package foo.
-.TP
-.B "$ lintian \-u foo"
-Unpack package foo in the Lintian laboratory up to level 1. (If it's
-already unpacked at level 1 or 2, nothing is done.)
-.TP
-.B "$ lintian \-l1 \-r foo"
-Search for package foo in the Debian archive and, if found, reduce the
-package disk usage in the laboratory to level 1.
-.TP
-.B "$ lintian \-r foo"
-Remove package foo from the Lintian laboratory.
-
-.SH BUGS
-Lintian does not have any locking mechanisms yet. (Running several
-checks simultaneously is likely to fail.)
-.sp
-If you discover any other bugs in Lintian, please contact the authors.
-
-.SH SEE ALSO
-.BR lintian\-info (1),
-.B Lintian User's Manual
-(file:/usr/share/doc/lintian/lintian.html/index.html)
-
-Packaging tools:
-.BR debhelper (7),
-.BR dh_make (8),
-.BR dpkg-buildpackage (1)
-
-.SH AUTHORS
-Richard Braakman <dark@xs4all.nl>
-.br
-Christian Schwarz <schwarz@monet.m.isar.de>
-.br
-Please use the email address <lintian\-maint@debian.org> for Lintian related
-comments.
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
new file mode 100644
index 0000000..4358ce5
--- /dev/null
+++ b/man/lintian.pod.in
@@ -0,0 +1,577 @@
+# Copyright 2010 Niels Thyker
+#  - based on the work Richard Braakman and Christian
+#    Schwarz (copyrighted 1998).
+#
+# This manual page is free software.  It is distributed under the
+# terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This manual page 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 manual page; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+#
+
+=head1 NAME
+
+lintian - Static analysis tool for Debian packages
+
+=head1 SYNOPSIS
+
+B<lintian> [I<action>] [I<options>] [I<packages>] ...
+
+=head1 DESCRIPTION
+
+Lintian dissects Debian packages and reports bugs and policy
+violations.  It contains automated checks for many aspects of Debian
+policy as well as some checks for common errors.
+
+It uses an archive directory, called I<laboratory>, in which it stores
+information about the packages it examines.  It can keep this
+information between multiple invocations in order to avoid repeating
+expensive data-collection operations.
+
+There are three ways to specify binary, udeb or source packages for
+Lintian to process: by file name (the .deb file for a binary package
+or the .dsc file for a source package), by package name, or by naming
+a I<.changes> file.  If you list packages by package name, you'll have to
+define the B<LINTIAN_DIST> variable in the configuration file (see
+below).  Lintian will then search for any binary or source packages in
+this directory for packages with the given name. (You can use the
+B<-b> (B<--binary>), B<--udeb> and B<-s> (B<--source>) options if you
+only want to process binary, udeb or source packages.)
+
+If you specify a I<.changes> file, Lintian will process all packages
+listed in that file.  This is convenient when checking a new package
+before uploading it.
+
+=head1 OPTIONS
+
+Actions of the lintian command: (Only one action can be specified per invocation)
+
+=over 4
+
+=item B<-S>, B<--setup-lab>
+
+Set up or update the laboratory.
+
+=item B<-R>, B<--remove-lab>
+
+Remove the laboratory directory.
+
+=item B<-c>, B<--check>
+
+Run all checks over the specified packages.  This is the default action.
+
+=item B<-C> chk1,chk2,..., B<--check-part> chk1,chk2,...
+
+Run only the specified checks.  You can either specify the name of the
+check script or the abbreviation.  For details, see the L</CHECKS> section
+below.
+
+=item B<-T> tag1,tag2,..., B<--tags> tag1,tag2,...
+
+Run only the checks that issue the requested tags.  The tests for
+other tags within the check scripts will be run but the tags will not
+be issued.
+
+=item B<--tags-from-file> filename
+
+Same functionality as B<--tags>, but read the list of tags from a
+file.  Blank lines and lines beginning with # are ignored.  All other
+lines are taken to be tag names or comma-separated lists of tag names
+to (potentially) issue.
+
+=item B<-F>, B<--ftp-master-rejects>
+
+Run only the checks that issue tags that result in automatic rejects
+from the Debian upload queue.  The list of such tags is refreshed with
+each Lintian release, so may be slightly out of date if it has changed
+recently.  This option does not, as yet, ignore overrides for fatal
+tags for which overrides aren't allowed.
+
+=item B<-X> chk1,chk2,..., B<--dont-check-part> chk1,chk2,...
+
+Run all but the the specified checks.  You can either specify the name
+of the check script or the abbreviation.  For details, see the
+L</CHECKS> section below.
+
+=item B<-u>, B<--unpack>
+
+Unpack the specified packages up to the current unpack level.  The
+default and only unpack level is 1 for this option.  See the L</UNPACK
+LEVELS> section below.
+
+=item B<-r>, B<--remove>
+
+Clean up the lintian directory of the specified packages up to the
+current unpack level.  The default unpack level is 0 for this option.
+
+=back
+
+General options:
+
+=over 4
+
+=item B<-h>, B<--help>
+
+Display usage information and exit.
+
+=item B<-V>, B<--version>
+
+Display lintian version number and exit.
+
+=item B<--print-version>
+
+Print unadorned version number and exit.
+
+=item B<-v>, B<--verbose>
+
+Display verbose messages.
+
+=item B<-d>, B<--debug>
+
+Display debugging messages. (Implies B<-v>).
+
+=item B<-q>, B<--quiet>
+
+Suppress all informational messages.  Currently, the only message this
+suppresses is the message at the end of the run giving the total count
+of overrides.
+
+=back
+
+Behaviour options for B<lintian>.
+
+=over 4
+
+=item B<-i>, B<--info>
+
+Print explanatory information about each problem discovered in
+addition to the lintian error tags. To print a long tag description
+without running lintian, see L<lintian-info(1)>..
+
+=item B<-I>, B<--display-info>
+
+Display informational ("I:") tags as well.  They are normally
+suppressed.  (This is equivalent to B<-L> ">=wishlist").
+
+=item B<-E>, B<--display-experimental>
+
+Display experimental ("X:") tags as well.  They are normally
+suppressed.
+
+If a tag is marked experimental, this means that the code that
+generates this message is not as well tested as the rest of Lintian,
+and might still give surprising results.  Feel free to ignore
+Experimental messages that do not seem to make sense, though of course
+bug reports are always welcomed (particularly if they include fixes).
+
+=item B<--pedantic>
+
+Display pedantic ("P:") tags as well.  They are normally suppressed.
+
+Pedantic tags are Lintian at its most pickiest and include checks for
+particular Debian packaging styles and checks that many people
+disagree with.  Expect false positives and Lintian tags that you don't
+consider useful if you use this option.  Adding overrides for pedantic
+tags is probably not worth the effort.
+
+=item B<-L> [+|-|=][>=|>|<|<=][S|C|S/C], B<--display-level> [+|-|=][>=|>|<|<=][S|C|S/C]
+
+Fine-grained selection of tags to be displayed. It is possible to add,
+remove or set the levels to display, specifying a severity (S:
+serious, important, normal, minor, wishlist), a certainty (C: certain,
+possible, wild-guess), or both (S/C).  The default settings are
+equivalent to B<-L> ">=important" B<-L> "+>=normal/possible" B<-L>
++minor/certain).
+
+=item B<--suppress-tags> tag1,tag2,...
+
+Suppress the listed tags.  They will not be reported if they occur and
+will not affect the exit status of Lintian.
+
+=item B<--suppress-tags-from-file> file
+
+Suppress all tags listed in the given file.  Blank lines and lines
+beginning with # are ignored.  All other lines are taken to be tag
+names or comma-separated lists of tag names to suppress.  The
+suppressed tags will not be reported if they occur and will not affect
+the exit status of Lintian.
+
+=item B<-l> n, B<--unpack-level> n
+
+Set unpack level to I<n>.  See the L</UNPACK LEVELS> section, below.
+
+=item B<-o>, B<--no-override>
+
+Don't use the overrides file.
+
+=item B<--show-overrides>
+
+Output tags that have been overridden.
+
+=item B<--color> (never|always|auto|html)
+
+Whether to colorize tags in lintian output based on their severity.
+The default is "never", which never uses color.  "always" will always
+use color, "auto" will use color only if the output is going to a
+terminal, and "html" will use HTML E<lt>spanE<gt> tags with a color style
+attribute (instead of ANSI color escape sequences).
+
+=item B<-U> info1,info2,..., B<--unpack-info> info1,info2,...
+
+Collect information info1, info2, etc. even if these are not required
+by the checks.
+
+=item B<-m>, B<--md5sums>, B<--checksums>
+
+Check checksums when processing a .changes file.  Normally, Lintian
+only checks the checksums for .dsc files when processing a .changes
+file.
+
+=item B<--allow-root>
+
+Override lintian's warning when it is run with superuser privileges.
+
+=item B<--fail-on-warnings>
+
+By default, B<lintian> exits with 0 status if only warnings were
+found.  If this flag is given, exit with a status of 1 if either
+warnings or errors are found.
+
+=item B<--keep-lab>
+
+By default, temporary labs will be removed after lintian is finished.
+Specifying this options will leave the lab behind, which might be
+useful for debugging purposes.  You can find out where the temporary
+lab is located by running lintian with the B<--verbose> option.
+Implies B<--unpack-level=2> unless another unpack level is specified
+directly.
+
+=back
+
+Configuration options:
+
+=over 4
+
+=item B<--cfg> configfile
+
+Read the configuration from configfile rather than the default
+locations.  This option overrides the B<LINTIAN_CFG> environment
+variable.
+
+=item B<--lab> labdir
+
+Use labdir as the permanent laboratory.  This is where Lintian keeps
+information about the packages it checks.  This option overrides the
+B<LINTIAN_LAB> environment variable and the configuration file entry
+of the same name.
+
+=item B<--archivedir> archivedir
+
+Location of Debian archive to scan for packages.  (See the L</FILES>
+section for complete information on how the path is constructed.)  Use
+this if you want Lintian to check the whole Debian archive instead of
+just single packages. This option overrides the B<LINTIAN_ARCHIVEDIR>
+environment variable and the configuration file entry of the same
+name.
+
+=item B<--dist> distdir
+
+Scan for packages in the I<distdir> directory.  (See the L</FILES>
+section for complete information on how the path is constructed.)  Use
+this if you want Lintian to check the whole Debian archive instead of
+just single packages.  This option overrides the B<LINTIAN_DIST>
+environment variable and the configuration file entry of the same
+name.
+
+=item B<--area> area
+
+When scanning for packages in the distdir, select only packages from
+the comma-separated list of archive I<areas> (e.g. main, contrib).
+This option overrides the B<LINTIAN_AREA> environment variable and the
+configuration file entry of the same name.
+
+=item B<--section> area
+
+This is an old name for the B<--area> option and accepted as a synonym
+for that option.
+
+=item B<--arch> arch
+
+When scanning for packages in the distdir, select only packages for
+architecture I<arch>.  This option overrides the B<LINTIAN_ARCH>
+environment variable and the configuration file entry of the same
+name.
+
+=item B<--root> rootdir
+
+Look for B<lintian>'s support files (such as check scripts and
+collection scripts) in rootdir.  This overrides the B<LINTIAN_ROOT>
+environment variable.  The default location is I</usr/share/lintian>.
+
+=back
+
+Package selection options:
+
+=over 4
+
+=item B<-a>, B<--all>
+
+Check all packages in the distribution. (This requires that the
+LINTIAN_DIST variable is defined in the configuration file.)
+
+=item B<-b>, B<--binary>
+
+The following packages listed on the command line are binary packages.
+
+=item B<-s>, B<--source>
+
+The following packages listed on the command line are source packages.
+
+=item B<--udeb>
+
+The following packages listed on the command line are udeb packages.
+
+=item B<-p> X, B<--packages-file> X
+
+Process all packages which are listed in file X.  Each package has to
+be listed in a single line using the following format:
+
+B<type> B<package> B<version> B<file>
+
+where B<type> is either `b', `u', or `s' (binary, udeb, or source
+package), B<package> is the package name, B<version> is the package's
+version, and B<file> is the package file name (absolute path
+specification).
+
+=back
+
+=head1 UNPACK LEVELS
+
+=over 4
+
+=item B<0 (none)>
+
+The package does not exist in the I<laboratory> at all.
+
+=item B<1 (basic)>
+
+A directory for this package exists in the I<laboratory> and basic
+information is extracted.  This does not take much space.
+
+For binary and udeb packages, the I<control> and I<fields> directories
+and the index file are unpacked, and symbolic links are made to the
+B<.deb> file and to the lintian directory for the source package.
+
+For source packages, the binary and fields directories are unpacked,
+and symbolic links are made to the source package files.
+
+=item B<2 (contents)>
+
+This unpack level is deprecated and no longer functional. The
+I<unpacked> collection script replaced it.
+
+=back
+
+Lintian will unpack packages as far as is necessary to do its checks,
+but it will leave the package in whatever unpack level was specified
+when it is done.
+
+The default unpack level can be overwritten by setting the
+B<LINTIAN_UNPACK_LEVEL> variable in the configuration file.
+
+=head1 CHECKS
+
+@CHECKS@
+
+=head1 COLLECTION
+
+@COLLECTION@
+
+=head1 FILES
+
+Lintian looks for its configuration file in the following locations:
+
+The directory given with the --cfg option
+
+=over 4
+
+=item I<$LINTIAN_CFG>
+
+=item I<$LINTIAN_ROOT/lintianrc>
+
+=item I<$HOME/.lintianrc>
+
+=item I</etc/lintianrc>
+
+=back
+
+Lintian uses the following directories:
+
+=over 4
+
+=item I</tmp>
+
+If no lab location is specified via the LINTIAN_LAB environment
+variable, configuration, or the B<--lab> command-line option, lintian
+defaults to creating a temporary lab directory in I</tmp>.  To change
+the directory used, set the TMPDIR environment variable to a suitable
+directory.
+
+=item I</usr/share/lintian/checks>
+
+Scripts that check aspects of a package.
+
+=item I</usr/share/lintian/collection>
+
+Scripts that collect information about a package and store it for use
+by the check scripts.
+
+=item I</usr/share/lintian/data>
+
+Supporting data used by Lintian checks and for output formatting.
+
+=item I</usr/share/lintian/lib>
+
+Utility scripts used by the other lintian scripts.
+
+=item I</usr/share/lintian/unpack>
+
+Scripts that manage the I<laboratory>.
+
+=back
+
+The I</usr/share/lintian> directory can be overridden with the
+B<LINTIAN_ROOT> environment variable or the B<--root> option.
+
+When looking for packages in a Debian archive, lintian constructs the
+path to the archive from the I<archivedir>, I<distdir>, I<release>,
+and I<arch> as follows:
+
+ I<archivedir>/dists/I<distdir>/I<release>/I<arch>
+
+Lintian always expects the "/dists/" path component in paths to Debian archives.
+
+For binary packages, Lintian looks for overrides in a file named
+I<usr/share/lintian/overrides/E<lt>packageE<gt>> inside the binary
+package, where I<E<lt>packageE<gt>> is the name of the binary
+package.  For source packages, Lintian looks for overrides in
+I<debian/source/lintian-overrides> and then in
+I<debian/source.lintian-overrides> if the first file is not found.
+The first path is preferred.  See the Lintian User's Manual for the
+syntax of overrides.
+
+=head1 EXIT STATUS
+
+=over 4
+
+=item B<0>
+
+No policy violations or major errors detected.
+(There may have been warnings, though.)
+
+=item B<1>
+
+Policy violations or major errors detected.
+
+=item B<2>
+
+Lintian run-time error. An error message is sent to stderr.
+
+=back
+
+=head1 EXAMPLES
+
+=over 4
+
+=item B<$ lintian foo.deb>
+
+Check binary package foo given by foo.deb.
+
+=item B<$ lintian foo.dsc>
+
+Check source package foo given by foo.dsc.
+
+=item B<$ lintian foo.dsc -L +minor/possible>
+
+Check source package foo given by foo.dsc, including minor/possible
+tags.
+
+=item B<$ lintian foo>
+
+Search for package foo in the Debian archive and check it. (Depending
+on what is found, this command will check either the source or binary
+package foo, or both.)
+
+=item B<$ lintian --archivedir /var/packages --dist custom --section main>
+
+Check all packages found in the Debian archive at
+I</var/packages/dists/custom/main>.
+
+=item B<$ lintian -i foo.changes>
+
+Check the changes file and, if listed, the source and binary package
+of the upload. The output will contain detailed information about the
+reported tags.
+
+=item B<$ lintian -c --binary foo>
+
+Search for binary package foo in the Debian archive and check it.
+
+=item B<$ lintian -C cpy --source foo>
+
+Run the copyright checks on source package foo.
+
+=item B<$ lintian -u foo>
+
+Unpack package foo in the Lintian laboratory up to level 1. (If it's
+already unpacked at level 1 or 2, nothing is done.)
+
+=item B<$ lintian -l1 -r foo>
+
+Search for package foo in the Debian archive and, if found, reduce the
+package disk usage in the laboratory to level 1.
+
+=item B<$ lintian -r foo>
+
+Remove package foo from the Lintian laboratory.
+
+=back
+
+=head1 BUGS
+
+Lintian does not have any locking mechanisms yet.
+(Running several checks simultaneously is likely to fail.)
+
+If you discover any other bugs in lintian, please contact the authors.
+
+=head1 SEE ALSO
+
+L<lintian-info(1)>, Lintian User Manual
+(file:/usr/share/doc/lintian/lintian.html/index.html)
+
+Packaging tools: L<debhelper(7)>, L<dh_make(8)>,
+L<dpkg-buildpackage(1)>.
+
+=head1 AUTHORS
+
+Niels Thykier <niels@thykier.net>
+
+Richard Braakman <dark@xs4all.nl>
+
+Christian Schwarz <schwarz@monet.m.isar.de>
+
+Please use the email address <lintian-maint@debian.org> for
+Lintian related comments.
+
+=cut
+
+
diff --git a/private/generate-lintian-pod b/private/generate-lintian-pod
new file mode 100755
index 0000000..7e4a966
--- /dev/null
+++ b/private/generate-lintian-pod
@@ -0,0 +1,99 @@
+#!/usr/bin/perl
+
+use strict;
+
+# Find the lib directory of lintian-root (defaulting to ./lib/)
+use lib ($ENV{LINTIAN_ROOT}//'.') . "/lib/";
+
+use Util qw(read_dpkg_control fail);
+
+my @keywords = (
+    
+);
+
+foreach my $kw (qw(conffiles shlibs Standards-Version)){
+    push(@keywords, ["$kw", "B<$kw>"]);
+}
+
+open(my $file, "<", "man/lintian.pod.in") or fail("man/lintian.pod.in: $!");
+
+while(my $line = <$file>){
+    chomp($line);
+    if($line eq '@CHECKS@'){
+        extract_data('checks', 'check-script', 'abbrev');
+    } elsif($line eq '@COLLECTION@'){
+        extract_data('collection', 'collector-script');
+    } else {
+        print "$line\n";
+    }
+}
+close($file);
+
+sub pretty_print {
+    my $text = shift;
+    my $inex = 0;
+    $text =~ s@\n\s\.\n\s@\n\n\n@og;
+    $text =~ s@\n\s@\n@og;
+    $text =~ s/\&([^;]+)\;/E<$1>/og;  # do &gt; -> E<gt>
+    $text =~ s/(\S+\(\d+\))/L<$1>/og; # link to manpages
+    foreach my $line (split(/\n/o, $text)){
+        if($line =~ m/^ /o){
+            if(!$inex){
+                # Start of an example.
+                $inex = 1;
+                # Give an extra line break.
+                $line = "\n$line";
+            }
+            # Example line
+            print "$line\n";
+            next;
+        } elsif($inex) {
+            # First line after an example.
+            $inex = 0;
+            $line = "\n\n$line";
+        }
+        # Normal line
+        # Replace simple html tags
+        $line =~ s@\<tt\>([^<]*)\</tt\>@I<$1>@iog;
+        $line =~ s@\<b\>([^<]*)\</b\>@B<$1>@iog;
+        $line =~ s@\<i\>([^<]*)\</i\>@I<$1>@iog;
+        # Underline paths
+        $line =~ s@(\S*/(?:[^/ \t]++/?)*)@I<$1>@og;
+        # Policy Manual
+        $line =~ s@Policy Manual@B<Policy Manual>@og;
+        foreach my $kw (@keywords){
+            my ($s,$r) = @$kw;
+            $line =~ s|\b\Q$s\E\b|$r|;
+        }
+        print "$line\n";
+    }
+    print "\n\n";
+}
+
+sub extract_data {
+    my ($folder, $name, $abname) = @_;
+    print "=over 4\n\n";
+    foreach my $file (<$folder/*.desc>) {
+        my ($header, @ignore) = read_dpkg_control($file);
+        my $name = $header->{$name};
+        my $abbr;
+        my $desc;
+        next if($name eq 'lintian');
+        if(defined($abname)){
+            $abbr = $header->{$abname};
+        }
+        if(!defined($header->{'manpage'})){
+            $desc = $header->{'info'};
+        } else {
+            $desc = $header->{'manpage'};
+        }
+        if($abbr){
+            print "=item B<$name> (B<$abbr>)\n\n";
+        } else {
+            print "=item B<$name>\n\n"
+        }
+        pretty_print($desc);
+    }
+    print "=back\n\n";
+}
+

-- 
Debian package checker


Reply to: