This shows you the differences between two versions of the page.
rpm_macros [2015/05/22 08:44] stephdl |
rpm_macros [2019/06/05 19:48] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== RPM Macros ===== | ||
- | Here are the definitions for some common specfile macros as they are defined on Fedora 13 (rpm-4.8.0-14.fc13). For definitions of more macros, examine the output of "< | ||
- | |||
- | Keep in mind that some of these macros may evaluate differently on older Fedora or EPEL releases. | ||
- | |||
- | ==== Macros mimicking autoconf variables ==== | ||
- | |||
- | %{_sysconfdir} | ||
- | %{_prefix} | ||
- | %{_exec_prefix} | ||
- | %{_bindir} | ||
- | %{_libdir} | ||
- | %{_libexecdir} | ||
- | %{_sbindir} | ||
- | %{_sharedstatedir} | ||
- | %{_datarootdir} | ||
- | %{_datadir} | ||
- | %{_includedir} | ||
- | %{_infodir} | ||
- | %{_mandir} | ||
- | %{_localstatedir} | ||
- | %{_initddir} | ||
- | |||
- | <WRAP center round tip 60%> | ||
- | Differences in EPEL 4 & 5 | ||
- | * **%{_initddir}** does not exist in EPEL 4 & 5, use the deprecated **%{_initrddir}** macro instead | ||
- | * **%{_sharedstatedir}** expands to **%{_prefix}/ | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ==== Other macros and variables for paths ==== | ||
- | These macros should be used for paths that are not covered by the macros mimicking autoconf variables. The < | ||
- | |||
- | %{_var} | ||
- | %{_tmppath} | ||
- | %{_usr} | ||
- | %{_usrsrc} | ||
- | %{_lib} | ||
- | %{_docdir} | ||
- | %{buildroot} | ||
- | $RPM_BUILD_ROOT | ||
- | |||
- | |||
- | ==== Build flags macros and variables ==== | ||
- | These macros should be used as flags for the compiler or linker. Note that the values for the macros below reflect the settings on Fedora 13 (i686) with redhat-rpm-config installed. | ||
- | |||
- | |||
- | %{__global_cflags} | ||
- | %{optflags} | ||
- | $RPM_OPT_FLAGS | ||
- | |||
- | |||
- | |||
- | ==== RPM directory macros ==== | ||
- | The macros are usually used with < | ||
- | |||
- | %{_topdir} | ||
- | %{_builddir} | ||
- | %{_rpmdir} | ||
- | %{_sourcedir} | ||
- | %{_specdir} | ||
- | %{_srcrpmdir} | ||
- | %{_buildrootdir} | ||
- | |||
- | |||
- | <WRAP center round tip 60%> | ||
- | **%{_buildrootdir}** does not exist in EPEL 4 & 5 | ||
- | </ | ||
- | |||
- | {{tag> rpm }} |