how to use RPM to biuld *.rpm

I have an application for linux writen by me. and before use it, I have to install it. I 've writen a shell program to install it. Now how can I turn it to the *.rpm ? Is this can done by shell command rpm? How to do it?
thanks

you make a specfile
and do rpmbuild -bb foo.spec

man rpmbuild might help

http://www.rpm.org/max-rpm/ might help

www.rpm.org might help

hope that helps