Couple of quick tips using the Red Hat Package Manager within aLinux™ OS:
TIP:  You can also use the  --nodeps  --force  tags with all  the options below.

Install & uninstall:
_______________
# rpm  -i  tuxracer-0.61-1.i386.rpm <performs install action. See also: (-ivh)>
# rpm  -e  tuxracer-0.61-1 <performs uninstall action. See also: (-ev)>
# rpm  -Uvh  tuxracer-0.61-1 <performs uninstall/install actions - ('v'erbosely)>
 

Compile using "src.rpm" or "tuxracer.spec":
____________________________________
# rpm  --rebuild  tuxracer-0.61-1.src.rpm
# rpm  -ba  tuxracer.spec
# rpm  -ta  tuxracer-0.61.tar.gz  <if it contains a spec file>
# rpm  -bp  tuxracer.spec  <just 'prep' & apply patches dont build>
All  (source SRPMS) and (binary RPMS) end up in: /usr/src/redhat/*  after the build.
 

(1.)
Compiling with --short-circuit
________________________
[Skip straight to the "compile stage" bypassing the 'prep' stage. This allows you to
stop the build at say 92% and restart later where it left off w/o recompiling the entire source again]

# rpm  -bc  --short-circuit  tuxracer.spec
 

(2.)
[Skip straight to "install stage" bypassing the 'prep' & 'compile' stages. This allows you to adjust %install & %files section of your "file.spec" & install the pkg to /pkg; and c/o where everything is going before actually creating the RPMS & SRPMS like I'll demonstrate below]

# rpm  -bi  --short-circuit  tuxracer.spec
 

(3.)
[Skip straight to the "packaging stage" once everythings nicely in /pkg; and you have your spec file correct and any needed patches applied. This allows you to RPM /pkg; into RPMS & SRPMS. Just make sure your spec file is perfect and you've finished building, installing & patching if necessary as needed before executing this stage]

NOTE: This stage also "assumes" your build will work for everybody else using # rpm -ba tuxracer.spec, so it's crucial to make sure everythings perfect for ppl not using --short-circuit; who are building from scratch.

# rpm  -ba  --short-circuit  tuxracer.spec

(4.) Not always needed: For Distributors - Create a fresh new /var/lib/rpm/* database.

rm /var/lib/rpm/* [Emptys the old rpm database].
# rpm  --initdb [Creates a new base starter rpm database].
# rpm  -i  --justdb  --ignoresize *.rpm [Creates an entire fresh rpm database for use with Synaptic, etc ... (doesn't really install anything, just makes us a nice rpm db)].



SEE ALSO:  RPM Documentation