title: How to produce platform-specific and platform-independent RPM subpackages from one .spec?
body: <p>I have <code>dunno.spec</code> file with the following structure:</p>
  
  <pre><code>Name:                   dunno
  Version:                 1.0
  ...
  BuildArch:              x86_64
  
  %description
  ...
  %package common
  Summary:                Shared files
  BuildArch:              noarch
  </code></pre>
  
  <p>I suppose that after I run <code>rpmbuild -ba dunno.spec</code> I should get two binary packages:</p>
  
  <ul>
  <li><code>dunno-1.0.x86_64.rpm</code></li>
  <li><code>dunno-common-1.0.noarch.rpm</code></li>
  </ul>
  
  <p>however I get:</p>
  
  <ul>
  <li><code>dunno-1.0.x86_64.rpm</code></li>
  <li><code>dunno-common-1.0.x86_64.rpm</code></li>
  </ul>
  
  <p>If I remove the line <code>BuildArch: x86_64</code> from the spec, then I get</p>
  
  <ul>
  <li><code>dunno-1.0.noarch.rpm</code></li>
  <li><code>dunno-common-1.0.noarch.rpm</code></li>
  </ul>
  
  <p>How to fix that?</p>
  
  <p>RPM v4.4.2.3.</p>