Subject: Re: PKGMANDIR
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Johnny C. Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 10/09/2007 09:22:04
Alistair Crooks wrote:
> On Tue, Oct 09, 2007 at 12:12:17PM +0200, Roland Illig wrote:
>> Why do we need the extra complexity of PKGMANDIR when a simple "man" is
>> usually enough? The usual places for documentation (bmake help, the
>> pkgsrc guide and the CVS log) don't answer this question.
>
> Different platforms have different requirements - some need
> shar/man, some just man, others may require something different.
>
> PKGMANDIR abstracts this out so you don't have to worry about
> that.
At least one developer had wanted to make LOCALBASE=/usr work and did
not want manpages installed into /usr/man. I believe this was the
original motivation for the work. There is a similar variable
PKGINFODIR which one would probably want to set to a similar custom
value if PKGMANDIR is so set. To be honest, I routinely use the
following on my systems:
PKGMANDIR= share/man
PKGINFODIR= share/info
I have already fixed many packages to honor these two knobs, and the
process is typically extremely simple. If we could generate a bulk
build using the above, we'd easily be able to identify the packages that
need to be fixed.
> It's arguable that we could have done some automatic PLIST
> manipulation, but we also have to concern ourselves with installation
> into the correct directory if that is done, and we're into much
> more complexity already.
We currently do some magic in PLIST generation so that we can say
"man/man1/foo.1" in the committed PLIST but have it expand automatically
into ${PKGMANDIR}/man1/foo.1 in the generated +CONTENTS file. It's not
difficult to automatically move the installed manpages from "man/manX"
into ${PKGMANDIR}/manX as part of the same step (similar to the way that
MANZ works), which would work for most packages.
Cheers,
-- Johnny C. Lam