Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Nov 2004 13:07:53 -0600
From:      "Conrad J. Sabatier" <conrads@cox.net>
To:        Florent Thoumie <flz@xbsd.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Running a script during port build
Message-ID:  <20041127130753.57a30926@dolphin.local.net>
In-Reply-To: <41A84E74.9010809@xbsd.org>
References:  <20041126181834.4a8ef9ad@dolphin.local.net> <20041126182442.78562dc9@dolphin.local.net> <41A84E74.9010809@xbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 27 Nov 2004 10:52:52 +0100, Florent Thoumie <flz@xbsd.org>
wrote:

> Conrad J. Sabatier wrote:
> > On Fri, 26 Nov 2004 18:18:34 -0600, "Conrad J. Sabatier"
> > <conrads@cox.net> wrote:
> >> 
> >>I'm trying to get a script to run as part of an update to
> >>games/gnuchess (to optionally create the opening book for gnuchess).
> >>
> >>I've placed the script under games/gnuchess/scripts as
> >>"pre-install", but it never seems to be getting invoked.
> >>
> >>Has the use of a scripts dir for ports been deprecated?  If not,
> >>what does it take to get the script to actually be run?
> > 
> > I should add that the reason I'm asking is because I tried simply
> > invoking the script from the Makefile, but none of the port
> > environment variables (such as $DISTDIR, etc.) are exported to the
> > script.
> > 
> > What's the preferred way of doing this?
> 
>      I think you should look at ${SCRIPTS_ENV}.
> 
>      There's a lot of ports using this, net/gnu-radius seems to be a
>      good example for what you're trying to do.

Thanks.  Actually, I already worked out another (perhaps less "correct")
way of doing this, and already submitted a send-pr for the update to the
port, but I'll still look at this for future reference.

This seems to be one glaring deficiency in the Porter's Handbook, by the
way.  I couldn't find any references at all to using scripts in a port.

-- 
Conrad J. Sabatier <conrads@cox.net> -- "In Unix veritas"



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