Useful rpmbuild macros


package-125x125

Utilizing macros can make life easier when you’re dealing with building on, and for, multiple platforms. Why bother with hard-coding full paths to system utilities when you can simply refer to them by their macro name?

These can also be useful for avoiding things like rpm check-files errors, installed (but unpackaged) file(s) found, and debuginfo related stuff.

If you find these macros are not available in your version of rpmbuild, you can explicitly define them yourself. Most systems will have (most of) these preconfigured for you in /usr/lib/rpm or a similar path.

filesystem macros

Build system path macros

Avoid failures if tools are not installed when rpm is built

Other

If you need to override a system’s currently configured macros, rather than edit the etc config settings, you can override a macro or define your own from scratch in ~/.rpmmacros



One thought on “Useful rpmbuild macros

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">