Install the .src.rpm file this way:
rpm -i somepackage-1.0-1.src.rpm
This will create files in the SOURCES directory of your RPM building directory
tree, and a .spec file in the SPECS directory.
Then go the SPECS directory and give the command to build the RPM:
cd /home/your_userid/rpm/SPECS
rpmbuild -bb somepackage.spec
Give the -ba option instead if you also want to build the SRPM. The binary RPM
packages will typically be created in the RPMS/i386 directory (on a PC-based
system).
How to compile from source into packaged binary
Download the source RPM and follow these instructions we found with Google: