Date: Fri, 12 Apr 2024 15:50:01 -0400 From: Matthew Phillips <matthew@matthewphillips.info> To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org> Cc: Kurt Hackenberg <kh@panix.com>, ports@freebsd.org Subject: Re: Confused by what make package should do Message-ID: <um22v7uwwbbynrwxmksxgd57pzphyqu62syzdjkigmtcsts2te@ns4wov536eia> In-Reply-To: <86mspycrax.fsf@ltc.des.dev> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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 Does that sound right?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?um22v7uwwbbynrwxmksxgd57pzphyqu62syzdjkigmtcsts2te>