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 13:45:07
Alistair Crooks wrote:
> On Tue, Oct 09, 2007 at 09:22:04AM -0400, Johnny C. Lam wrote:
>>> 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.
> 
> I've never been a fan of mv'ing files within ${PREFIX} as part of
> the installation or fix-up process, and don't see why we should
> start now. The MANZ handling is simply an inplace compression or
> decompression of a manual page - maybe it's sleight of hand, but
> I don't count that as being the same thing. The original motivation
> for MANZ was the ncurses package, but I digress...

I agree 100% with mv'ing files with ${PREFIX} as distasteful -- it's why 
I didn't implement the part I described above as part of the PLIST 
rototill I did a while back.

> I too have fixed many packages to use PKGMANDIR, but I don't think
> it's on by default in pkglint - I do remember seeing some references
> to PKGMANDIR, but that may have been when I borked something in
> the PLIST.

I guess pkglint could complain about seeing "man" in the package 
Makefile and recommending to use ${PKGMANDIR} instead.  I'm not sure 
exactly how that would work, but if anyone can find a way, I'm positive 
that Roland can :-)

	Cheers,

	-- Johnny C. Lam