title: Automatically install build dependencies prior to building an RPM package
body: <p>I am trying to build a .rpm package. I have just followed the steps to do that. Till now all steps were gone fine but now i just stuck with this step. I just ran the following command and got this error:</p>
  
  <p><code>rpmbuild -ba asterisk.spec</code></p>
  
  <pre><code>error: Failed build dependencies: 
      gtk2-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
      libsrtp-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
      [... more ...]
      freetds-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
      uw-imap-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
  </code></pre>
  
  <p>I am using fedora-15. How to resolve this error? </p>
  
  <p>How I do install all depencencies during installation of <code>src.rpm</code> package. Is it possible?</p>