Hi,
On Thu, Dec 09, 2004 at 05:35:56PM -0600, Jonathan Hutchins wrote:
A lot of RPM creation depends on how well the source package has been structured. For instance, you can build an RPM for the most recent spamassassin by downloading Mail-SpamAssassin-3.0.1.tar.gz and then running:
rpmbuild -tb Mail-SpamAssassin-3.0.1.tar.gz
That won't work on your average source package though. If a source package were set up properly for rpmbuild, it would probably include an "Uninstall" hook in the makefile too.
Actually, I've been surprised at how often this works. "rpmbuild -tb" means "use the rpm .spec file you find inside the tarball". If you have a rpm .spec file then you're home free. The .spec file has a list of files that get installed so the uninstall (rpm -e) works. If you have a .spec file then you don't need checkinstall. Checkinstall's claim to fame is that it uses "installwatch" to make a list of files that get installed and then uses that to make a .spec file.
Your point about how the source package is structured (in particular the makefile) does affect checkinstall. It defaults to "make install" as the command that causes the files to be installed but realizes that this is not always the case. Its examples are "make install_packages" or "make modules_install" or "install.sh". So it requires that you read the README and/or INSTALL files to see what to do. This is probably why it isn't already part of something like Synaptic, Aptitude, or Karchiver.