specファイルのRecommendsタグ

OpenSUSE用のタグ。CentOS等での扱い方は、OpenSUSEガイドラインにあった。
openSUSE:Specfile guidelines - openSUSE

Recommends

SUSE's RPM supports the Recommends tag, but it was not available upstream until very recently. As a result, packages with Recommends will fail to build for OBS targets Fedora_18, RHEL_6 and CentOS_6, for example. A workaround is to exclude the Recommends tag from non-SUSE targets:

%if 0%{?suse_version}
Recommends: foo
%endif
Alternatively the Recommends tag could become a Requires tag so that a recommended package (foo) gets installed in any case on systems that do not support RPM Recommends:

%if 0%{?suse_version}
Recommends: foo
%else
Requires: foo
%endif
See also openSUSE:Build Service cross distribution howto