Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2024 16:03:29 -0400
From:      Matthew Phillips <matthew@matthewphillips.info>
To:        Chris <portmaster@bsdforge.com>
Cc:        Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org>,  Kurt Hackenberg <kh@panix.com>, ports@freebsd.org
Subject:   Re: Confused by what make package should do
Message-ID:  <pedpw7zops62tti5pzm2gld7fm4zj4hkaqgn7d7olga4nsimjw@fm5fdoegsqsl>
In-Reply-To: <c35e41ad00f80668b988cb556107f2a0@bsdforge.com>
References:  <i2u7ovhndcywc5kxloodmpm5xe6v7fw7ynxlqrxmbkul2ns3sk@mrylz3dakfpt> <CALH631k4KEd6ytxzB19mUZbzY=6frB=t0Y_pMyUUoD_fiB%2BFPw@mail.gmail.com> <e7jc6wvcyzd7dd5sntdkiruzqvwdegldbmtg3uem3njcstmjff@ojv5urlxga7b> <ZhltyecilpZuifCh@ilythia.eden.le-fay.org> <43xrg75pzztfrhlszhekdlfqyiqfmbkgimfdjosrjbbr4sjzfq@fnyqc35f6zyw> <76c14675-a782-49cc-8d61-ff96eaab83c8@panix.com> <86mspycrax.fsf@ltc.des.dev> <um22v7uwwbbynrwxmksxgd57pzphyqu62syzdjkigmtcsts2te@ns4wov536eia> <c35e41ad00f80668b988cb556107f2a0@bsdforge.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 12, 2024 at 12:57:41PM -0700, Chris wrote:
> On 2024-04-12 12:50, Matthew Phillips wrote:
> > On Fri, Apr 12, 2024 at 09:30:14PM +0200, Dag-Erling Smørgrav wrote:
> > > Kurt Hackenberg <kh@panix.com> writes:
> > > > Matthew Phillips <matthew@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.
> > 
> > Thank you! This is the missing piece I didn't understand. It's starting
> > to come together for me.
> > 
> > So now I think it's a problem with the port's Makefile `install` target.
> > The install target does this:
> > 
> >         install -m 755 snac $(PREFIX)/bin/snac
> > 
> > So I think what I need to do is patch the Makefile to include DESTDIR
> > like so:
> > 
> >         install -m 755 snac $(DESTDIR)$(PREFIX)/bin/snac
> Those should be curly braces, not parentheses, fe;
>     ${DESTDIR}

This is inside of the project's Makefile, not the port Makefile. I'm
patching it to account for DESTDIR because PREFIX is /usr/local.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?pedpw7zops62tti5pzm2gld7fm4zj4hkaqgn7d7olga4nsimjw>