Check out checkinstall
; it's a very nice tool for making RPM, DEB or Slack's TGZ packages. The usual procedure to build a program from source is
but installing stuff this way tends to make it very difficult to track down the installed components if you some day would like to remove the package. So, instead one can do
and checkinstall will build a package for you of your preferred format and install it. You then both have the package for future installs, and it's also easy to remove it.