I'm trying to figure out how $RPM_BUILD_ROOT relates to BuildRoot. It's clear that BuildRoot is the temporary path used during RPM construction. But here for example, they say buildroot is used during actual installation? http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
" RPM_BUILD_ROOT — This environment variable is used to hold the "build root", into which the newly built software will be installed. If no explicit build root has been specified (either by command line option, spec file tag line, or rpmrc file entry), this variable will be null. "
So, does buildroot has any effect during actual installation? Or it's only needed for RPM building, and user always specifies the target path via --prefix?
Also, during files and postun sections, any sense to use the buildroot? If not, what is the correct way to specify files and directories, taking into account the prefix set by user?
Thanks.