SlackBuild is a shell script that is found in all Slackware source directories, and it can be executed by the shell to build the current package. It dumps the final package into the directory pointed to by the variable TMP, and if that is not set, into /tmp. I prefer to have things happening where I want them. For example, to build the xfractint package:
export TMP=where_ever_I_want_it cd /usr/src/slakware/source/xap/xfractint/ umask 022 sh SlackBuild
After it's done, the package, once expanded and once as a gzipped tar archive, and the build tree all are found in the directory build. Of course, if not run as root, it will have the wrong ownership in the tar archive. Hence it is better to complete with:
cd where_ever_I_want_it cd package-xfract chown -R root.root * tar -zcvf ../xfract.tgz *
You noticed that the package is not called xfractint but xfract, to keep the name shorter that nine digits. Then get from the corresponding binary distribution directory the necessary installation description file, that is here (because xfracint is in the xap1 directory) the file diskxap1. Finally run pkgtool, it will complain that there are packages missing, but it will allow you to install the newly comiled package. Of course, you could have simply untarred from the root directory, but then you won't get the file var/log/packages/xfract, which makes it so much easier to uninstall. The files diskap1 contains the entry below. Such an entry could be written for any .tgz file which untars from /, just make sure you also have the leading directories in the tar archive. The CONTENTS line may be as long as it needs to be. The entries describing the package must start at the eleventh column.
CONTENTS: fvwm95 xfract xgames xpaint xpdf xspread xv xvim xxgdb xfract: xfractint-3.04 xfract: xfract: Xfractint draws a wide variety of fractals. Xfractint is a port of xfract: the DOS program Fractint. The primary original authors of Fractint xfract: are Bert Tyler, Timothy Wegner, Mark Peterson, and Pieter xfract: Branderhorst. The Xfractint port is by Ken Shirriff. xfract:
Finally, it might be necessary to run some commands to finish off the installation. These should be collected in a shell script (without the usual #!/bin/sh header) called install/install.sh. This script should be part of the .tgz archive, and will be executed and stored by pkgtool under the name of the package in the /var/adm/scripts directory.