Install dependencies while installing a rpm package

view full story

http://unix.stackexchange.com – I am trying to create the rpm package from source. I just created the rpm file and as we know that some packages are needed the dependencies to be installed in order to install the rpm properly. So is there any way to install that dependencies prior to installation of rpm. As we are specifying the require packages to build rpm in .spec file. but what about the installation can't we install them at same time id its not installed? My initial goal is to create a such a rpm which can get installed smoothly without any error or warning regarding missing dependencies. And if is there any missing d (HowTos)