addMacro(NULL, "_preScriptEnvironment",NULL, prescriptenviron,RMIL_DEFAULT);
addMacroDefault("_topdir",
- "/usr/src/packages", "%(echo $HOME)/rpmbuild");
+ "/usr/src/packages", "%{getenv:HOME}/rpmbuild");
addMacroDefault("_tmppath",
LOCALSTATEDIR "/tmp", "%{_var}/tmp");
addMacroDefault("_dbpath",
%_tmppath %{_var}/tmp
# Path to top of build area.
-%_topdir %(echo $HOME)/rpmbuild
+%_topdir %{getenv:HOME}/rpmbuild
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
break;
}
b = be;
+ } else if (STREQ("getenv", f, fn)) {
+ b = getenv(buf);
} else if (STREQ("S", f, fn)) {
for (b = buf; (c = *b) && risdigit(c);)
b++;
STREQ("uncompress", f, fn) ||
STREQ("url2path", f, fn) ||
STREQ("u2p", f, fn) ||
+ STREQ("getenv", f, fn) ||
STREQ("S", f, fn) ||
STREQ("P", f, fn) ||
STREQ("F", f, fn)) {