We are trying to make a relocatable rpm and wanted to use the prefixs below to relocate the files .
Prefix: %{buildroot}/etc
Prefix: %{buildroot}/usr/bin
Prefix: %{buildroot}/usr/sbin
Prefix: %{buildroot}/usr/share
Prefix: %{buildroot}/var
%install
mkdir -p $RPM_INSTALL_PREFIX
However we are not able to get the value of $RPM_INSTALL_PREFIX while running the rpm build
RPM_INSTALL_PREFIX
is only available at install time (e.g. %pre
) for relocatable RPMs (which nearly never work BTW). See http://ftp.rpm.org/max-rpm/s1-rpm-reloc-building-relocatable.html for more info.