If you want to create Slackware, Red Hat, or Debian packages from source code, use CheckInstall. Again using Joe's Own Editor in this example, on Debian, do the following:
# mkdir /doc-pak # tar zxvf joe-2.9.8.tar.gz # cd joe-2.9.8 # ./configure # make # checkinstall -D
CheckInstall replaces make install, so it
must run from the root of the source tree. Follow the prompts and do
what they say. It will build and install a .
deb, as we can verify:
$ dpkg -l | grep joe ii joe 2.9.8-1 joe's own editor, my fave
And that's it. It's installed and ready to go to work. A copy of the package will remain in the source directory.
To build a Slackware package, use:
# checkinstall -S
To build an RPM package, use:
# checkinstall -R
The doc-pak directory is where CheckInstall places READMEs and other program documentation. If you don't create the doc-pak directory, CheckInstall asks if you want to build a default documentation directory. If you say no, your package will have no documentation.
CheckInstall uses the native installation program's package
manager: RPM on Red Hat,
installpkg on Slackware, .
apt on Debian. To remove a CheckInstall
package, simply use your system's package manager.
CheckInstall supports any install scripts. For example:
# checkinstall -D make install_packages # checkinstall -R make modules_install # checkinstall -S install.sh # checkinstall -D setup
Remember to study the README of the program you're installing,
and any other included documentation. Not all source packages use the
install dance. Some use other installation scripts, as in
the example above.
CheckInstall does not yet allow creating a package without automatically installing it, though this may change in future releases.
Learn more about this topic from Linux Cookbook.
Linux information can be found scattered in man pages, texinfo files, and source code comments, but the best source is the experts who have built up a working knowledge of managing Linux systems. The Linux Cookbook's tested techniques distill years of hard-won experience into practical cut-and-paste solutions to everyday Linux dilemmas. Use just one recipe from this collection of real-world solutions, and the hours of tedious trial-and-error saved will more than pay for the cost of the book. It's more than a time-saver; it's a sanity saver.