I have dunno.spec file with the following structure:
Name: dunno
Version: 1.0
...
BuildArch: x86_64
%description
...
%package common
Summary: Shared files
BuildArch: noarch
I suppose that after I run rpmbuild -ba dunno.spec I should get two binary packages:
dunno-1.0.x86_64.rpmdunno-common-1.0.noarch.rpmhowever I get:
dunno-1.0.x86_64.rpmdunno-common-1.0.x86_64.rpmIf I remove the line BuildArch: x86_64 from the spec, then I get
dunno-1.0.noarch.rpmdunno-common-1.0.noarch.rpmHow to fix that?
RPM v4.4.2.3.
Split the build into 2 packages, one x86_64, the other noarch.
You can do 2 builds from a single spec using %ifarch logic (but its usually easier/cleaner to use 2 spec files even if annoying).
It also hurts nothing to include platform-independent content in an x86_64 sub-package instead of a noarch sub-package.
You could run the rpmbuild as this rpmbuild --target=x86_64,noarch ... then rpmbuild will build the package two pass for each arch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With