Chapter 16. Slackware Package Management

Table of Contents
Overview of Package Format
Package Utilities
Making Packages
Making Tags and Tagfiles (for setup)
Summary

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.

Overview of Package Format

Before learning the utilities, you should become familiar with the format of a Slackware package. A package is simply a tar archive file that has been compressed with gzip. A package is built so that it can be extracted in the root filesystem.

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 the section called makepkg.