On Sep 26, 2006, at 4:45 PM, Andrei Kazarov wrote:
Dear Gurus,
What is the scope of "BuildArch: " instruction of a spec file in
case if subpackages are defined? Does it have a scope of a
subpackage, as I would assume or is has a 'global' scope?
BuildArch: has the scope of a build. A build produces one or more
packages. So ...
My example is following:
(Note that I'm not _compiling_ my binaries with RPM, here I'm only
_packaging_ pre-built binaries for different architectures, so they
could be later installed elsewhere)
packageA.spec:
...
Name: PackA
BuildArch: $(myarch)
%package sub1
BuildArch: noarch
....
%package sub2
BuildArch: i386
...
One of subpackages should contain files for particular
architecture and the other one is containing files common for all
architectures.
It results in that all subpackages are build for $(myarch)
architecture, regardless what is defined in subpackages sections.
Is this expected or I'm missing something? I could create separate
package for each architecture, but is there a way to do that in
one .spec file?
The related question: can I create a .spec file for a number of
different architectures (e.g for i383 and x_86_64), and then run
rpmbuild -bb for each of them (on different machines/platforms)?
E.g.
...
%package sub3
BuildArch: x86_64
... there's no way to produce sub-packages with a different arch from
a build.
Well you can do some sick things with
BuildArch: i386 noarch
and
%ifarch noarch
...
%else
...
%endif
but I'm quite sure you will not be happy with the result, as very
little is gained by
merging 2 disparate spec files under a %ifarch construct.
73 de Jeff
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list