doc: Install gpg and gpgv man pages under the correct name.

* doc/mkdefsinc.c (main): Add double include guard.  Set variable
gpgtwohack. Define macros gpgname and gpgvname.
* doc/gpg.texi: Remove macro definition for gpgname.  Use Texinfo var
gpgtwohack to prepare the man pages.  Use @gpgname everywhere.
* doc/gpgv.texi: Likewise.
* doc/Makefile.am (myman_pages): Remove gpg2.1 and gpgv2.1 but add
them depending on USE_GPG2_HACK.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-04-05 15:15:28 +02:00
parent 4b5341dc33
commit 4dc4fb1c14
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
4 changed files with 81 additions and 31 deletions

View File

@ -78,11 +78,16 @@ YAT2M_OPTIONS = -I $(srcdir) \
myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
dirmngr.texi scdaemon.texi tools.texi
myman_pages = gpg2.1 gpgsm.1 gpg-agent.1 dirmngr.8 scdaemon.1 gpgv2.1 \
myman_pages = gpgsm.1 gpg-agent.1 dirmngr.8 scdaemon.1 \
watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \
applygnupgdefaults.8 \
dirmngr-client.1
if USE_GPG2_HACK
myman_pages += gpg2.1 gpgv2.1
else
myman_pages += gpg.1 gpgv.1
endif
man_MANS = $(myman_pages) gnupg.7

View File

@ -11,9 +11,31 @@
@cindex command options
@cindex options, GPG command
@macro gpgname
gpg2
@end macro
@c Begin standard stuff
@ifclear gpgtwohack
@manpage gpg.1
@ifset manverb
.B gpg
\- OpenPGP encryption and signing tool
@end ifset
@mansect synopsis
@ifset manverb
.B gpg
.RB [ \-\-homedir
.IR dir ]
.RB [ \-\-options
.IR file ]
.RI [ options ]
.I command
.RI [ args ]
@end ifset
@end ifclear
@c End standard stuff
@c Begin gpg2 hack stuff
@ifset gpgtwohack
@manpage gpg2.1
@ifset manverb
.B gpg2
@ -31,6 +53,8 @@ gpg2
.I command
.RI [ args ]
@end ifset
@end ifset
@c End gpg2 hack stuff
@mansect description
@ -40,17 +64,21 @@ OpenPGP standard. @command{@gpgname} features complete key management and
all bells and whistles you can expect from a decent OpenPGP
implementation.
@ifclear gpgtwohack
Note that this version of GnuPG features all modern algorithms and
should thus be preferred over older GnuPG versions. If you are
looking for version 1 of GnuPG, you may find that version installed
under the name @command{gpg1}.
@end ifclear
@ifset gpgtwohack
In contrast to the standalone command gpg from GnuPG 1.x, which
might be better suited for server and embedded platforms, the 2.x
version is commonly installed under the name @command{gpg2} and
version is commonly installed under the name @command{@gpgname} and
targeted to the desktop as it requires several other modules to be
installed.
@end ifset
@manpause
The old 1.x version will be kept maintained and it is possible to
install both versions on the same system. Documentation for the old
GnuPG 1.x command is available as a man page and at
@inforef{Top,GnuPG 1,gpg}.
@xref{Option Index}, for an index to @command{@gpgname}'s commands and options.
@mancont
@ -1777,7 +1805,7 @@ This is dummy option. @command{@gpgname} always requires the agent.
@item --gpg-agent-info
@opindex gpg-agent-info
This is dummy option. It has no effect when used with @command{gpg2}.
This is dummy option. It has no effect when used with @command{@gpgname}.
@item --agent-program @var{file}
@ -3394,7 +3422,7 @@ for @samp{Subkey-Type}.
@item Key-Length: @var{nbits}
The requested length of the generated key in bits. The default is
returned by running the command @samp{gpg2 --gpgconf-list}.
returned by running the command @samp{@gpgname --gpgconf-list}.
@item Key-Grip: @var{hexstring}
This is optional and used to generate a CSR or certificate for an
@ -3417,7 +3445,7 @@ can be handled. See also @samp{Key-Type} above.
@item Subkey-Length: @var{nbits}
Length of the secondary key (subkey) in bits. The default is returned
by running the command @samp{gpg2 --gpgconf-list}".
by running the command @samp{@gpgname --gpgconf-list}".
@item Subkey-Usage: @var{usage-list}
Key usage lists for a subkey; similar to @samp{Key-Usage}.
@ -3496,9 +3524,9 @@ $ cat >foo <<EOF
%commit
%echo done
EOF
$ gpg2 --batch --gen-key foo
$ @gpgname --batch --gen-key foo
[...]
$ gpg2 --no-default-keyring --secret-keyring ./foo.sec \
$ @gpgname --no-default-keyring --secret-keyring ./foo.sec \
--keyring ./foo.pub --list-secret-keys
/home/wk/work/gnupg-stable/scratch/foo.sec
------------------------------------------

View File

@ -8,11 +8,8 @@
@include defs.inc
@c Begin GnuPG 1.x specific stuff
@ifset gpgone
@macro gpgvname
gpgv
@end macro
@c Begin standard stuff
@ifclear gpgtwohack
@manpage gpgv.1
@node gpgv
@section Verify OpenPGP signatures
@ -27,14 +24,11 @@ gpgv
.RI [ options ]
.I signed_files
@end ifset
@end ifset
@c End GnuPG 1.x specific stuff
@end ifclear
@c End standard stuff
@c Begin GnuPG 2 specific stuff
@ifclear gpgone
@macro gpgvname
gpgv2
@end macro
@c Begin gpg2 hack stuff
@ifset gpgtwohack
@manpage gpgv2.1
@node gpgv
@section Verify OpenPGP signatures
@ -49,10 +43,8 @@ gpgv2
.RI [ options ]
.I signed_files
@end ifset
@end ifclear
@c End GnuPG 2 specific stuff
@end ifset
@c End gpg2 hack stuff
@mansect description
@code{@gpgvname} is an OpenPGP signature verification tool.

View File

@ -49,6 +49,13 @@
#endif /*HAVE_W32_SYSTEM*/
#if USE_GPG2_HACK
# define gpg2_suffix "2"
#else
# define gpg2_suffix ""
#endif
static int verbose;
@ -267,7 +274,17 @@ main (int argc, char **argv)
fputs ("@c defs.inc -*- texinfo -*-\n"
"@c Common and build specific constants for the manuals.\n"
"@c This file has been created by " PGM ".\n", stdout);
"@c This file has been created by " PGM ".\n\n", stdout);
fputs ("@ifclear defsincincluded\n"
"@set defsincincluded 1\n\n", stdout);
fputs ("\n@c Flags\n\n", stdout);
#if USE_GPG2_HACK
fputs ("@set gpgtwohack 1\n\n", stdout);
#endif
fputs ("\n@c Directories\n\n", stdout);
@ -306,8 +323,16 @@ main (int argc, char **argv)
/* Fixme: Use a config.h macro here: */
fputs ("@set GPGSYMENCALGO AES-128\n", stdout);
fputs ("\n@c Macros\n\n", stdout);
printf ("@macro gpgname\n%s%s\n@end macro\n", GPG_NAME, gpg2_suffix);
printf ("@macro gpgvname\n%sv%s\n@end macro\n", GPG_NAME, gpg2_suffix);
/* Trailer. */
fputs ("\n"
"@end ifclear\n"
"\n"
"@c Loc" "al Variables:\n"
"@c buffer-read-only: t\n"
"@c End:\n", stdout);