Fedora
Documentation
Fedora Draft Documentation
0.1
Packagers_Guide
Prev
Packager's Guide
Next
A.2. Spec File Macros
In addition to the spec file directive syntax, you can define macros using the RPM
%global
syntax. For example:
%global
major
2
The example above defines a macro named
major
with a value of
2
.
Once defined, you can access macros using the syntax
%{macro_name}
or just
%macro_name
. For example:
source
:
%
{name}
-
%
{version}
.tar.gz