[prev in list] [next in list] [prev in thread] [next in thread]
List: macports-users
Subject: creating new env variables in Portfiles
From: markd () macports ! org (markd () macports ! org)
Date: 2007-04-29 9:42:34
Message-ID: fc.004c4c580c80db983b9aca00ee7cbe0e.c80dcc3 () biola ! edu
[Download RAW message or body]
Michael Thon <mike012012@yahoo.com> on Sunday, April 29, 2007 at 3:23 AM
-0800 wrote:
>I would like my Portfile to create new directories and set system
>wide environment variables. Can anyone showl me the right way to do
>this or point me to an example?
post-destroot {
file mkdir ${destroot}${prefix}/etc/myport
file copy ${worksrcpath}/examples/example.conf
${destroot}${prefix}/etc/myport
}
If you wnt to set permissions on files or directorires explicitly, use
xinstall:
xinstall -m 755 -d ${destroot}${prefix}/etc/myport
xinstall -m 755 ${worksrcpath}/examples/example.conf
${destroot}${prefix}/etc/myport
${destroot} is the analogue to ${DESTDIR) in Makefiles. You always want
to write there, never directly to ${prefix}.
I don't believe you could set system wide variables in a port. You could
set a variable on your Mac and make McPorts respect it I think. But this
is not done in a portfile. But I've not done that either so perhaps
someone else should answer that.
Mark
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic