CheckInstall

CheckInstall is a computer program for Unix-like operating systems which eases the installation and uninstallation of software compiled from source by making use of package management systems. After software compilation it can automatically generate a Slackware-, RPM-, or Debian-compatible package that can later be cleanly uninstalled through the appropriate package manager.

CheckInstall monitors the installation phase of a normal software build process and notes the files that are added to the system. It then builds a package that contains these files, using additional information gathered from the user. Finally, the files installed by the original run are removed and the package is installed using the system package tools, so the package will be properly registered in the local installed packages database.

The primary benefits provided by CheckInstall versus simply running  are the ability to remove the package from the system using the system packaging tools, and the ability to install the resulting package on multiple machines. CheckInstall is sometimes cited as a mechanism for creating packages by open source projects instead of creating numerous platform-specific build packages.

Usage
Checkinstall is usually used after running a configure script and, as follows:

./configure make sudo checkinstall

After entering some information about the author and a package description, you will get the folder where the generated package has been saved to.