how to build cascade dependences in spec?

时间:2017-04-18 11:22:56

标签: nginx dependencies specifications rpmbuild

Centos 7 trying to build nginx with devel gcc-5.3.1.rpm

manually goes

yum install centos-release-scl

only then

yum install devtoolset-4-gcc

how to add cascade installation of dependencies in spec rpmbuild?

BuildRequires: centos-release-scl
Requires: devtoolset-4-gcc

installs only first one the same as here

BuildRequires: centos-release-scl
BuildRequires: devtoolset-4-gcc

BuildRequires(pre): is not supported

1 个答案:

答案 0 :(得分:0)

如果在构建和运行时都真正需要,则必须在RequiresBuildRequires中列出先决条件。如果prepost scriptlet只使用 ,则将后缀添加到Requires。如果所有scriptlet,build和运行时都需要它,那么你必须在每个时间显式地列出它。一个人为的例子,你真的就像一个旧的编辑器:

Requires(pre): ed
Requires(post): ed
Requires(preun): ed
Requires(post): ed
Requires: ed
BuildRequires: ed

编辑:重新阅读此答案的问题和评论,我认为这是“Automatically install build dependencies prior to building an RPM package”的欺骗