Re: how to set a system/user-wide env var?
Corey <corey_s-r9/[email protected]>
| Newsgroups | gmane.linux.gentoo.java |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday 29 August 2007 03:35:43 pm William L. Thomson Jr. wrote: > On Wed, 2007-08-29 at 15:23 -0700, Corey wrote: > > Say a java package needs to set a system-wide environment variable > > (e.g. $FOO_HOME ) - how to I get the ebuild to do do so? > > Is this a user space app, like run per use? Or something that would be > started via a init script? Do you just need to set it for compile? > > If via an init script any global env variables for the application > should be set in either the init script. Or if adjustable via a file > in /etc/conf.d/ > > If via a user space application like Netbeans, Limewire, Azereus, etc. > then you usually want to set the global env variables in the startup > script for the app. If it does not have one, make a wrapper which you > should likely do anyway. > > If needed during compile using setting the variable in src_unpack or > src_compile should be suffice. If it's static, you might go so far as > putting it globally in the ebuild. But that should be avoided in most > all cases. > First off - thanks a ton for the fast response, and the great info. I'm just beginning to cut my teeth on ebuild maintenance/development. Secondly, due to being very new to this, it's very well likely that what I'm about to describe is not the proper method - so just let me know. I'm kindof experimenting and doing trial-and-error here: it's how I learn best. > If none of those scenario, please provide more details as to what you > are doing, what app, etc. Then we can advise from there :) Specifically - I'm trying to help out in getting the java-experimental gant ebuild and the groovy ebuild to include a couple missing starter/runner scripts: namely, 'gant' and 'startGroovy'. The 'gant' script/runner from the gant-0.3.1 distro wants the 'startGroovy' script/runner from the groovy distro. Anyhow - 'startGroovy' wants a $GROOVY_HOME; the user shouldn't have to set this himself after emerging groovy. I want to keep startGroovy prestine, so I don't have to include a patch - therefore, I think the groovy ebuild should set a system/user-wide $GROOVY_HOME. Thoughts? -- [email protected] mailing list