From the Linux RPM HOWTO:
6. Building RPMs
Building RPMs is fairly easy to do, especially if you can get the
software you are trying to package to build on its own.
The basic procedure to build an RPM is as follows:
· Make sure your /etc/rpmrc is setup for your system.
· Get the source code you are building the RPM for to build on your
· Make a patch of any changes you had to make to the sources to get
them to build properly.
· Make a spec file for the package.
· Make sure everything is in its proper place.
· Build the package using RPM.
Under normal operation, RPM builds both binary and source packages.
I downloaded the HOWTO's some time ago in a tarball and I don't really remember where I got them... Sorry.
Of course, there are HOWTO's and a good description of the process at : http://www.rpm.org/