Building an rpm from source

If you have a .src.rpm file, you can rebuild it on your local system using

rpmbuild --rebuild /tmp/mypackage-1.0.0-1.src.rpm

This will extrack the source files from the file and rebuild it using the instructions in the spec file.