Article Title: Linux source code Installation Tool CheckInstall. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Checkinstall is a program that can automatically generate the RPM/Debian or Slackware installation package from the source code of the tar.gz class. With CheckInstall, you can use almost all the tar.gz class source code to generate a "clean" installation or uninstall package.
Introduction
This problem often occurs: only the source code (such as tar.gz) of the program that you want to try out is available, and no RPM or Debian package is provided. You have to download the source code, decompress it, And then compile it manually. So far, everything is normal. However, what if you want to delete it?
The Makefile file contains only a few unload routines. Of course, you can install the program to a temporary folder, write down all the files generated or modified by the program, and delete them. However, if this program needs to be re-compiled frequently, it will be very painful and the workload will be quite large. The CheckInstall written by Felipe Eduardo is used to solve this problem.
Install programs with GNU Autoconf
Generally, the following steps are used to compile and install a program configured by GNU Autoconf:
./configure && make && make install |
This configure script file is used to "Guess" a series of system-related variables that will be used in subsequent compilation processes. It checks whether the system variable value meets the compilation requirements, and then uses these variables to generate Makefile in each folder of the package. In addition, the configure script generates other files:
● One or more makefiles (s) under each folder/subfolders)
● A script named config. status
● A text file config. log
After the Configure script file runs successfully, you will enter make to compile the program and get the executable file you need. If make is successful, you can use make install to install the program.
Use CheckInstall to install the program
In the previous section, we used GNU Autoconf to compile the program. Now it is time to change the method. You can use the CheckInstall tool. It uses its own command checkinstall to replace make install. The other two commands are retained as before. Therefore, the command sequence is changed:
./configure && make && checkinstall
|
The command checkinstall not only runs make install by default, but also monitors all write operations during installation. Therefore, CheckInstall uses the program Installwatch written by Pancrazio de Mauro. After make install is complete, CheckInstall will generate an Slackware-, Debian-, or RPM-installation package, and then install the program according to the default configuration of the software package, the generated installation package is left in the current directory (or the standard installation package storage directory. You can modify the directory by modifying the PAK_DIR variable.
CheckInstall does not only use make install, but can also be coordinated with other installation commands. For example, if the installation command is setup. sh, the installation command sequence is:
./configure && make && checkinstall setup.sh
|
We can also run CheckInstall with many parameters.
Figure 1. Run the command "checkinstall? H "shows all available sub-Parameters
These subparameters are roughly divided:
● Install options)
● Scripting options)
● Info display options)
● Package tuning options)
● Cleanup options)
● About CheckInstall (About CheckInstall ).
● If CheckInstall runs with these parameters, it uses these parameter values to replace the corresponding values in the configuration file checkinstallrc.
CheckInstall also has its own limitations. It cannot process programs with static connections, because Installwatch cannot monitor files modified during installation. In general, there are two types of connected libraries: Dynamic and Static. These connection libraries are integrated into the program using the include command. The statically connected program already contains all the required library files, so you do not need to load these libraries into the memory at runtime. This program has nothing to do with the Connection Library installed in the system, because the so-called connector (Linker) has built these libraries into the executable program during compilation.
[1] [2] [3] Next page