Date: Fri, 28 Oct 2022 22:40:07 -0700 From: "Pat Maddox" <pat@patmaddox.com> To: freebsd-ports@freebsd.org Subject: Re: How to override port Makefile to point to local directory? Message-ID: <951EBD83-484F-425E-821A-EFFACA2AD3B3@patmaddox.com> In-Reply-To: <C4E1018F-B37F-48E1-BDCB-FD9150DBDB6E@patmaddox.com> References: <C4E1018F-B37F-48E1-BDCB-FD9150DBDB6E@patmaddox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 15 May 2022, at 20:29, Pat Maddox wrote: > I am writing software that I would eventually like to install on > FreeBSD. I'm currently stuck trying to write a Makefile that will > point to my local git dir, so I can build and install it while I'm > developing. All of the finished Makefiles reference tar packages, > which makes sense. But when I'm actively developing, I don't want to > commit the code, push it, have it built, update the makefile with the > commit, and make. > > Does anyone know of a way to override options to a port's Makefile to > point to a local directory on disk? I want to run "sudo make install" > and "make package" from my development directory, using the same > Makefile that would be in the ports tree. > > Pat For anyone else interested in this, I finally came up with a really clean solution: make WRKSRC=$(pwd) USE_GITHUB=no DISTFILES="" -C port It assumes a really simple USE_GITHUB Makefile (e.g. below). Here’s the example repo: https://github.com/patmaddox/simple_port_example Pat PORTNAME= simple-port-example CATEGORIES= devel DISTVERSION= 1.0.0 DISTVERSIONPREFIX= v MAINTAINER= pat@patmaddox.com USE_GITHUB= yes GH_ACCOUNT= patmaddox GH_PROJECT= simple_port_example .include <bsd.port.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?951EBD83-484F-425E-821A-EFFACA2AD3B3>