A software package is a bundle of related programs that are ready for you to install. When you download a source code archive, you have to configure, compile, and install it by hand. With a software package, this has already been done for you. All that you have to do is install the package. Another handy feature of using software packages is that it is very easy to remove and upgrade them, if you so desire. Slackware comes with programs for all your package management needs. You can install, remove, upgrade, make, and examine packages very easily.
There's a myth that's been going around ever since RedHat debuted RedHat Package Manager, that Slackware has no package management tool. This simply couldn't be further from the truth. Slackware has always included a package manager, even before RedHat existed. While not as full-featured or as ubiquitous as rpm (or for that matter deb), pkgtool and its associated programs are every bit as good at installing packages as rpm. The truth about pkgtool is not that it doesn't exist, but that it doesn't do any dependency checking.
Apparently many people in the Linux community think that a packager manager must by definition include dependency checking. Well, that simply isn't the case, as Slackware most certainly does not. This is not to say that Slackware packages don't have dependencies, but rather that its package manager doesn't check for them. Dependency management is left up to the sysadmin, and that's the way we like it.
Before learning the utilities, you should become familiar with the format of a Slackware package. In Slackware, a package is simply a tar archive file that has been compressed with gzip. Packages are built to be extracted in the root directory.
Here is a fictitious program and its example package:
./ usr/ usr/bin/ usr/bin/makehejaz usr/doc/ usr/doc/makehejaz-1.0/ usr/doc/makehejaz-1.0/COPYING usr/doc/makehejaz-1.0/README usr/man/ usr/man/man1 usr/man/man1/makehejaz.1.gz install/ install/doinst.sh |
The package system will extract this file in the root directory to install it. An entry in the package database will be created that contains the contents of this package so that it can be upgraded or removed later.
Notice the install/ subdirectory. This is a special directory that can contain a postinstallation script called doinst.sh. If the package system finds this file, it will execute it after installing the package.
Other scripts can be embedded in the package, but those are discussed more in detail in Section 18.3.2 below.