19.3.2. Creating the RPM environment
The RPM environment is made up of a large number of RPM settings and macro definitions. Run the rpm --showrc command to see the current environment settings on Linux:
$ rpm –showrc
ARCHITECTURE AND OS:
build arch : i386
compatible build archs: i686 i586 i486 i386 noarch
build os : Linux
compatible build os's : Linux
install arch : i686
install os : Linux
compatible archs : i686 i586 i486 i386 noarch
compatible os's : Linux
RPMRC VALUES:
macrofiles : /usr/lib/rpm/macros:/usr/lib/rpm/i686-linux/macros:/etc/
rpm/macros.specspo:/etc/rpm/macros.db1:/etc/rpm/macros.cdb:/etc/rpm/macros:/etc/
rpm/i686-linux/macros:~/.rpmmacros
optflags : -O2 -march=i686
This output was truncated for space. As you can see, there are a lot of expected settings. You need to set up these same settings and macros, but with the proper values for the new system on which you are running RPM.
The files rpmrc.in and macros.in serve as the default templates used to create the rc and macro settings, respectively. These files are modified by the configure script to include values specific to the local operating system. You can edit these files as needed for your system, prior to installing RPM. That is, edit these files between calling the make command and the make install command.
Cross Reference
The INSTALL file in the RPM sources also describes some modifications you may want to make to the macros.