Will not be taken into account, because it is overwriten by .rpmrc or rpmbuild cmd line –buildroot
This behavior was introduced in rpm version 4.6.0 ( which was released 6th of January 2009 ). The BuildRoot should not be used any more, because to cite rpm mailing list:
Buildroot from spec is ignored on purpose in rpm 4.6.0. That specs should
(have to) define their own buildroot is simply bad design and a leftover
from ancient times.
The new default build root directory is simple:
So this explains a lot. If you are like me and read all kind of rpm tutorials on the internet. Then wonder why the hell it does not work as expected.
It is pity that this little detail is not mentioned in some tutorials, created even after 2009.