From Fedora Project Wiki


It is important that your package list all necessary build dependencies using the BuildRequires: tag. You may assume that enough of an environment exists for RPM to function and execute basic shell scripts, but you should not assume any other packages are present, as RPM dependencies and anything brought into the buildroot by the build system may change over time.

BuildRequires and %{_isa}

You MUST NOT use arched BuildRequires. The arch ends up in the built SRPM but SRPMs need to be architecture independent. For instance, if you did this:

# Example of what *not* to do
BuildRequires:	python%{?_isa} >= 2.7

Then the SRPM that is built in Fedora would have one of these Requirements depending on what builder the SRPM was created on:

python(x86-32) >= 2.7
# or
python(x86-64) >= 2.7

This would prevent yum-builddep or similar tools that use the SRPM's requirements from operating correctly.

BuildRequires based on pkg-config

Fedora packages which use pkg-config to build against a library (e.g. 'foo') on which they depend, SHOULD express their build dependency correctly as pkgconfig(foo). For more information, see Packaging:PkgConfigBuildRequires.