Date: Sat, 1 Jan 2005 07:22:13 +0200 From: Ion-Mihai Tetcu <itetcu@people.tecnik93.com> To: "Frank Behrens" <frank@pinky.sax.de> Cc: freebsd-ports@freebsd.org Subject: Re: Beginner Question: Best way to substitute variables Message-ID: <20050101072213.54ef57c5@it.buh.tecnik93.com> In-Reply-To: <200412131138.iBDBceAj064131@moon.behrens> References: <200412131138.iBDBceAj064131@moon.behrens>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 Dec 2004 12:37:56 +0100 "Frank Behrens" <frank@pinky.sax.de> wrote: > Meanwhile I use FreeBSD for several years and now comes the time to > give something back. I'm creating a port and could not find an answer > to my question: > > What is the best way to set variables in scripts (e.g. pkg-install) > and text files (e.g. pkg-message) depending from Makefile variables > (e.g. PREFIX)? > I understand the Makefile rules and it is no problem to use variable > paths depending from $PREFIX, $DOCSDIR and other, but how they are > later used in scripts, like pkg-install and rc.d/scripts? IMHO > changing these and other variables in the Makefile should be enough > to adjust the complete port. > > As a possible solution I see: > Put all files in a separate directory, create Makefile dependencies > and replace the desired strings with "sed". But this seems to be not > the usual way, I could not find any example port. > > Please, could you point me to an example port, where this problem has > been solved in a practical way conform to FreeBSd development rules. mail/dspam mail/dspam=devel security/clamav security/clamav-devel -- IOnut Unregistered ;) FreeBSD "user"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050101072213.54ef57c5>