How to compile rpm from src.rpm
1) download src.rpm
2) rpm -ivh file.src.rpm
3) cd /usr/src/
4) rpmbuild -bb file.spec
new rpm should be in /usr/src/distro/rpms/…
other RPM commands:
rpm -ivh file.rpm (install)
rpm -Uvh file.rpm (upgrade)
rpm -qav (list rpms installed)
rpm -qil (list files in an installed rpm)
rpm -qilp file.rpm (list files that are included in the rpm)
rpm -qf /path/to/somefile (find rpm that installed the file)
rpm -qav | grep name (look to see if some rpm is installed)