Product SiteDocumentation Site

18.2.3. Dealing with different macros

Different Linux vendors define different macros in their RPM setup. This may mean not only different values for the macros, but different macro names as well. Because of this, it is best to define your own local set of macros when building RPMs.
As much as possible, depend on your own RPM macros. You can define your macros in terms of vendor-specific macros using conditional statements in your spec files, a topic covered in Chapter 10, Advanced RPM Packaging . You can also read examples in the “Build Environment and Macros” section of this chapter.
This really boils down to creating a disciplined RPM build environment.