Creating .deb-Packages With Checkinstall
.deb-Packages With Checkinstall
Checkinstall is a nice tool to create simple .deb-packages that you can use in your local network (e.g. if you have to install the same piece of software on multiple computers running Debian). It lets you compile and install software from the sources like before, but with the difference that you end up with a simple Debian package which also means that you can easily uninstall the software you just compiled by running dpkg -r!
I will demonstrate
the use of checkinstall
by compiling and installing the anti-virus software ClamAV
on a Debian system.
This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.
This document comes without warranty of any kind!
1 Install Checkinstall
It is as easy as 1-2-3:
apt-get install checkinstall
If your system tells you that it does not know a package called checkinstall then add the following line to /etc/apt/sources.list:
deb http://www.backports.org/debian/ woody checkinstall
Then try again to install checkinstall.
2 Install ClamAV
We need the ClamAV sources . We will install the software from the /tmp directory.
(Please note: ./configure --help gives a list of all configuration options available.)
Now comes the main difference: instead of make install we run
checkinstall -D make install
Answer the question
"The package documentation
directory ./doc-pak does not exist.
Then enter a description for your package (e.g. ClamAV 0.81). A summary of the configuration options for your .deb-package will come up:
You can change them here or just hit enter to continue. Now ClamAV will be installed plus a Debian package will be created which you can find in the installation directory /tmp/clamav-0.81 as the final checkinstall summary states:
Now you can copy clamav-0.81_0.81-1_i386.deb to other Debian computers and run
dpkg -i /path/to/clamav-0.81_0.81-1_i386.deb
to install it. If you want to remove it, just run
dpkg -r clamav-0.81
This even works on the computer you compiled ClamAV on! This is a nice way to install software from the sources and remove it if you are unsatisfied with the result.