Pass variable to pkg-install

Kris Kennaway kris at obsecurity.org
Tue Nov 23 10:07:14 PST 2004


On Tue, Nov 23, 2004 at 11:44:22AM +0100, A. Nooitgedagt wrote:
> Actually,
> 
> It does work to set variables in SCRIPTS_ENV !
> I just shouldn't manipulate them in pkg-install I guess. I'm still not sure
> how it works.
> 
> This is what I have as a test in Makefile:
> 
> "
> pre-fetch:
>         @ ${SETENV} PKG_PREFIX=${PREFIX} \
>         ${SCRIPTS_ENV} USER=${USER} PG_USER=${PG_USER} GROUP=${GROUP}
> UID=${UID} GID=${GID} \
>         ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
> "
> 
> I didn't find good docs about how a statement like that gets translate or
> did I miss something.
> Any pointer?

Be careful what you do here, because the pkg-install script is also
run when someone adds (or removes) your package with pkg_add, so it
needs to work properly in that case too (and it will not if you
customize the way that pkg-install is called)

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20041123/1d3673ca/attachment.bin


More information about the freebsd-ports mailing list