| From | Sent On | Attachments |
|---|---|---|
| Kris Kennaway | Nov 22, 2004 9:35 am | |
| Kris Kennaway | Nov 23, 2004 3:33 am | |
| Kris Kennaway | Nov 23, 2004 5:29 am | |
| Kris Kennaway | Nov 23, 2004 7:33 am | |
| A. Nooitgedagt | Nov 23, 2004 9:04 am | |
| Kris Kennaway | Nov 23, 2004 9:31 am | |
| A. Nooitgedagt | Nov 23, 2004 10:44 am | |
| Kris Kennaway | Nov 23, 2004 11:33 am | |
| Kris Kennaway | Nov 23, 2004 1:30 pm | |
| Kris Kennaway | Nov 23, 2004 3:34 pm | |
| Kris Kennaway | Nov 23, 2004 5:29 pm | |
| Kris Kennaway | Nov 23, 2004 6:06 pm | |
| Conrad J. Sabatier | Nov 23, 2004 6:54 pm | |
| Kirill Ponomarew | Nov 23, 2004 7:00 pm | |
| Kris Kennaway | Nov 23, 2004 7:43 pm | |
| A. Nooitgedagt | Nov 23, 2004 8:27 pm | |
| Kris Kennaway | Nov 27, 2004 3:46 pm | |
| Pav Lucistnik | Nov 27, 2004 3:59 pm | |
| Kris Kennaway | Nov 27, 2004 6:52 pm | |
| Kris Kennaway | Nov 28, 2004 7:53 am | |
| Norikatsu Shigemura | Nov 28, 2004 9:53 am | |
| Ion-Mihai Tetcu | Nov 28, 2004 12:01 pm | |
| Kris Kennaway | Nov 30, 2004 3:42 pm | |
| Kris Kennaway | Nov 30, 2004 5:38 pm | |
| Edwin Groothuis | Nov 30, 2004 5:52 pm | |
| Robin Schoonover | Nov 30, 2004 7:11 pm | |
| Edwin Groothuis | Nov 30, 2004 7:33 pm | |
| Kris Kennaway | Nov 30, 2004 7:41 pm | |
| Robin Schoonover | Nov 30, 2004 8:15 pm | |
| Kris Kennaway | Nov 30, 2004 9:39 pm | |
| Lars Köller | Nov 30, 2004 11:37 pm | |
| Kris Kennaway | Nov 30, 2004 11:47 pm |
| Subject: | Pass variable to pkg-install | |
|---|---|---|
| From: | A. Nooitgedagt (a.no...@12move.nl) | |
| Date: | Nov 23, 2004 8:27:32 pm | |
| List: | org.freebsd.freebsd-ports | |
-----Original Message----- From: owne...@freebsd.org [mailto:owne...@freebsd.org]On Behalf Of Kris Kennaway Sent: dinsdag 23 november 2004 19:11 To: A. Nooitgedagt Cc: free...@freebsd.org Subject: Re: Pass variable to pkg-install
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
Ouch, pkg_add doesn't read the makefile variables.... That complicates things even more.
Would it be an option to create a config.sh on the fly while processing the Makefile (no interactive configure): http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/cvsup-mirror/scripts/configu re
script:
--------------------------------- #! /bin/sh
variables="USER GROUP UID GID"
echo "" echo -n "Building the \"config.sh\" file ... " for var in ${variables}; do eval echo ${var}=\\\"\${${var}}\\\" done > ${WRKSRC}/config.sh echo "Done."
---------------------------------
pkg-install:
--------------------------------- . ${base}/config.sh || exit
---------------------------------
Or something like that....
Would that be a good option or is there a less complicated example that would also work for pkg_add?
Aldert





