Re: Confused by what make package should do

From: Piotr Smyrak <ps.ports_at_smyrak.com>
Date: Sat, 13 Apr 2024 07:45:17 UTC
On Fri, 12 Apr 2024 13:28:11 -0400
Matthew Phillips <matthew@matthewphillips.info> wrote:

> On Fri, Apr 12, 2024 at 06:22:17PM +0100, Lexi Winter wrote:
> > Matthew Phillips:  
> > > It definitely is attempting to install in the port I'm working
> > > on. The port's Makefile does not do so when just running `make`.
> > > Do you have any idea why make package would be trying to install?
> > >  
> > 
> > is it trying to install the port itself, or its dependencies?
> > 
> > it will always try to install the dependencies before building the
> > port, but you can pre-install these (as root) before running 'make
> > package', after which 'make package' shouldn't require any
> > privileges to run.
> > 
> > (i am fairly sure i've done it this way in the past, although tbh
> > it's been a while since i tested it.)  
> 
> It's trying to install the port itself. To /usr/local/bin
> specifically. It seems like it's running `make install` on the ports
> Makefile.
> 

If you do not want to install the port while testing during porting,
you can define NO_INSTALL at command line, it will step over the install
target. 

Note, that you can also aim the installation during your tests into
other hierarchy than /usr/local. Ie. you could create an empty dir
within /tmp and use PREFIX=/tmp/myport to be used as a target
directory. This has the benefit, that you might verify whether
pkg-plist contains all the files that form the package.

As for creating a package without root privileges, you would only need
root hat if the package being installed contains files with higher
permissions (ie. try pkg create on cups). 

-- 
 Piotr Smyrak