Kurt Hackenberg <k...@panix.com> writes:
> Matthew Phillips <matt...@matthewphillips.info> writes:
> > 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.
> From man ports(7): "package   Make a binary package for the port.  The
> port will be installed if it has not already been."

This is both true, in that the `package` target implies the `stage`
target with does run `make install` in $WRKSRC, and highly misleading,
because the `stage` target does not install the port to your machine,
which would require superuser privileges, but to a staging directory,
which does not.  The `install` target, which implies the `package`
target, uses `pkg add` to install the package to your machine.

Provided all prerequesites are already installed (use `make missing` to
check), you should be able to run `make package` as an unprivileged
user.  I do it all the time.

Note that if the port (or a missing dependency) has options, the ports
framework will attempt to perform the `config` target, which requires
superuser privileges (in order to store the selected configuration in
`/var/db/ports`).  You can disable that by defining the BATCH variable
either in your environment (`export BATCH=`) or on the command line
(`make BATCH= missing`, `make BATCH= package`).  In that case you will
have to either already have run `make config` or set the options you
want to set in `/etc/make.conf` or on the command line, if you're not ok
with the defaults.

DES
-- 
Dag-Erling Smørgrav - d...@freebsd.org

Reply via email to