tech-pkg archive

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

Re: how to get the LOCALBASE in pkg_add?



On Thu, Apr 26, 2018 at 10:09:31PM +0200, Keivan Motavalli wrote:
> On Thursday, 26 April 2018 19:17:28 CEST Joerg Sonnenberger wrote:
> > On Thu, Apr 26, 2018 at 12:19:29PM +0200, Keivan Motavalli wrote:
> > > Hi, pkgsrc allows the user to set a LOCALBASE (defaulting to /usr/pkg) in
> > > mk.conf.
> > 
> > You should *not* be using LOCALBASE, but PREFIX.
> Thanks, that's even better since it's already accessible in pkg_install.
> While it's taken as a command line argument, it doesn't seem to be parsed from 
> pkg_install.conf.
> What happens when PREFIX is not set? I looked inside some binary packages and 
> while LOCALBASE is set, I have not seen PREFIX being added. Should it be part 
> of newly generated packages then, or I am looking in the wrong places?

PREFIX is implied. The overriding on the command line is a historical
hack, ignore that it exists. For this purpose, just include something
like PREFIX=@PREFIX@ in the script fragment.

Joerg


Home | Main Index | Thread Index | Old Index