Making Slackware packages can be both easy and difficult. There is no specific method for building a package. The only requirement is that the package be a tar gzipped file and if there is a postinstallation script, it must be /install/doinst.sh.
If you are interested in making packages for your system or for a network that you manage, you should have a look at the various build scripts in the Slackware source tree. There are several methods we use for making packages.
explodepkg(8) will do the same thing that installpkg does to extract the package, but it doesn't actually install it and it doesn't record it in the packages database. It simply extracts it to the current directory.
If you look at the Slackware source tree, you will see how we use this command for “framework” packages. These packages contain a skeleton of what the final package will look like. They hold all the necessary filenames (zero-length), permissions, and ownerships. The build script will cat the package contents from the source directory to the package build directory.
makepkg(8) will package up the current directory into a valid Slackware package. It will search the tree for an symbolic links and add a creation block to the postinstallation script for creating them during the package install. It also warns of any zero-length files in the package tree.
This command is typically run after you have created your package tree.