Essentially rpm --rebuild <sourcerpm>
From man rpm:
Code:
REBUILD AND RECOMPILE OPTIONS
There are two other ways to invoke building with rpm:
rpm {--rebuild|--recompile} SOURCEPKG ...
When invoked this way, rpm installs the named source package, and does a prep, compile and install. In
addition, --rebuild builds a new binary package. When the build has completed, the build directory is
removed (as in --clean) and the the sources and spec file for the package are removed.
THE rpm book:
Maximum RPM
# Guides to software management
LNAG - How do I install a program I downloaded from the Internet?
Rute Guide's software explanation
You might want to check out
CheckInstall to manage source code installations/uninstallation