Description
I use Cargo to build a command-line tool written in Rust. I've also written an accompanying manpage, command.1
. I'd like to tell Cargo about manpages via Cargo.toml, so that cargo install
will install them to the appropriate location (gzip-compressed and installed to ${root}/share/man/man1/command.1.gz
, where the section 1
in man1
gets extracted from the first character of the manpage extension).
Note that once Cargo has a mechanism for a post-build script, some packages may wish to use that to build the manpage. For instance, a package might parse --help
output to generate a manpage, process some other document language to produce a manpage, or use help2man-like functionality from an argument parser. However, for a first pass, I'd just like to have support for installing manpages already written directly in manpage format.