I am building an RPM from source tarball, patches, and a .spec file. I am doing so to add my platform-specific patch.
I have read the given .spec file, and got notice that there are lines such as:
%ifarch %{arm}
When I saw similar lines like that, I could sometimes see a definition, for example, as follows:
%global shared 0
Later on, %shared is used as 0. However, I could not find the definition of %arm. I guessed that it might be pre-defined, or defined somewhere else (system-wide?).
What does the %arm variable mean in a .spec file? If it is pre-defined, where is the definition?
If you look in /usr/lib/rpm/macros
, arm
is defined as a list of possible ARM architectures. So that macro is saying "if the target architecture matches any of these, do this..."