SLACKTRACK(8)

NAME
slacktrack - build Slackware packages from .build scripts

SYNOPSIS
slacktrack [options] -p "packagefilename" "buildscript"

DESCRIPTION
slacktrack is a packaging tool to build Slackware packages from simple .build scripts, some of which can be found in the distribution source tree. slacktrack has many features available to eliminate the majority of the manual element involved with producing packages from these scripts. slacktrack uses the standard Slackware makepkg program to produce the resulting packages.

OPTIONS - GENERAL

-h, --help
    Show the available options and exit

-v, --version
    Show the version information and exit

OPTIONS - SLACKWARE 'makepkg' PACKAGE MAKER
The values from these options are passed to the Slackware makepkg tool.

-p, --package <package_name>
    Resulting tar file name of the package. This will be in the format of name-version-arch-build.txz

    For example: slacktrack-2.20-i586-1.txz

-s,  --nosymlinks
    Tell makepkg not to search for symlinks in the package directory

-r,  --setrootowner
    Tell makepkg to set permissions on directories to 755 and owners to root.root

    See also --chown-bdirs-root-bin

--mpopts
    Supply additional options to makepkg.

    Example: # slacktrack --mpopts "--prepend" -Qnp foo-1.0-i586-1.txz ./foo.build

    Note: You must include the additional options in either quotes (as shown in the example above) or single quotes otherwise slacktrack will take them as options to itself.

OPTIONS - SPECIFIC SLACKTRACK OPTIONS

-t,  --notidy
    Do not delete temporary package directory when slacktrack has finished. slacktrack uses a temporary work space directory in /var/tmp (by default). This directory contains the package.t?z contents. This option can be useful when you are having difficulties with building the package, or for debugging slacktrack. slacktrack will inform you of the (randomly named) temporary directory when it has finished.

-b,  --buildstore <directory>
    Specify the location in which to store the built .t?z packages. By default this is /tmp/built-slackwarepackages, but you may wish to change it to another location. If this directory does not exist then slacktrack will default to using /tmp

    This directory also will contain any logs and the package description file (if specified).

-l,  --logfile <filename>
    slacktrack logs every element of the compilation and build process that the build script outputs along with slacktrack's own on-screen output. The log file is especially useful for debugging a failed build. The default log path is <buildstore_path>/<package_name>.log

    This option permits the user to specify a different directory for the logs rather than storing the .log in the same directory as the .t?z.

-n,  --nologging
    Do not save the log file when slacktrack has finished. See --logfile above for a description of the contents of the log file.

    The default is to log.

-D,  --md5sum
    Create an MD5sum of the resulting package file in the package store directory (where the resulting package will be built; usually this is /tmp). The MD5sum file will be the same name as the resulting package file but with .md5 suffixed (e.g. foobar-1.0-i586-5.txz.md5).

-G,  --gpg-sign <key id>
    Sign the resulting package file with specified GnuPG key and placed the detached, armored signature in the package store directory (where the resulting package will be stored; usually this is /tmp). The GnuPG signature file will have the same name as the resulting package file but with an extra .asc suffixed (e.g. foobar-1.0-i586-5.txz.asc).

-z,  --gzman
    Slackware's standard is that all man pages should be gzipped. This option makes slacktrack gzip any man pages that exist within the directories /usr/man, /usr/local/man and /usr/X11R?/man.

    The default is not to gzip man pages.

    Also see the --gzman-no-symfix, --gzinfo and --gzinfo-no-symfix options.

-I,  --gzinfo
    Slackware's standard is that all GNU info pages should be gzipped. This option makes slacktrack gzip any info pages that exist within the directories /usr/info and /usr/local/info

    The default is not to gzip info pages.

    Also see the --gzinfo-no-symfix, --gzman and --gzman-no-symfix options.

-P,  --delete-perllocalpod
    Delete any perllocal.pod files found in the package's /usr/lib directory.

    These files contain information about a system's Perl packages installed in addition to the vendor's Perl distribution. Typically these files are created by the installation script of the additional Perl add-on package.

    However, they are snapshots of the particular system on which the Slackware package is made - and most likely will not reflect the target system's environment (the target is unlikely to have an identical set of additional Perl modules installed); thus these files should not be present in Slackware packages.

    The default is not to delete these files.

-K,  --delete-usrinfodir
    Delete the package's /usr/info/dir file if it exists. This file is a special file used by the GNU 'info' program to provide the user with a list of the info pages present on the system. Some software's Makefile will create a new 'dir' page that only contains information pertaining to the newly compiled software itself, rather than appending to the existing list of software.

    In the main you will want to use this option to avoid replacing the original /usr/info/dir file.

    However, the default is not to delete this file.

-x,  --exclude pattern for egrep
    slacktrack traverses the filesystem using the UNIX 'find' utility and generates a 'snapshot' of the contents. grep -E (or 'egrep') is then used to remove a number of paths and specific files from this snapshot; this is because these paths/directories either are locations that should never be installation destinations for software, or are system files that are subject to change moment to moment.

    This option allows you to replace the entire default pattern.

    By default, slacktrack excludes the following:

    EXCLUDE_LIST="${PWD}$|${PWD}|/etc/ntp/drift|/var/run/|/var/run$|/var/lib/dhcpcd|/var/lib/dhcpcd$|/etc/dhcpc/|/etc/dhcpc$|/var/cache/|/var/cache$|/run$|/run/|/media$|/media/|/srv$|/srv/|/selinux$|/selinux/|/var/lib/rpm|/var/lib/rpm$|/var/yp$|/var/yp/|/sys$|/sys/|/initrd$|/initrd/|/dev/bus$|/dev/bus/|/dev/char$|/dev/char/|/dev/rfkill|/dev/input$|/dev/input/|/dev/.udev/|/dev/.udev$|/dev/vc$|/dev/vc/|/dev/console|/dev/pts$|/dev/pts/|/dev/ptmx|/dev/tty|/var/lib/pkgtools$|/var/lib/pkgtools/|/var/log|/etc/mtab|/etc/resolv.conf|/etc/ld.so.cache|/tmp|/root|/proc|/var/tmp|/var/run/utmp|/var/spool/cron/cron|/var/lib/NetworkManager|/var/lib/NetworkManager$|/usr/man/whatis|/usr/local/man/whatis|/var/lib/pgsql$|/var/lib/pgsql|/var/lib/mysql$|/var/lib/mysql"

    This is a pattern for grep -E. Please familiarise yourself with the grep man page if you wish to make changes.

    It is recommended that these defaults are unchanged.

    In addition, slacktrack excludes the PWD (present working directory) from which slacktrack was invoked. This allows a package's source directory to be in a non-default excluded path and receive updates (such as log files) and avoid slacktrack including them in the newly created package file.

-o,  --no-fs-search pattern for find -regex (pre and post file system scans)
    Prior to beginning a build, and post build, slacktrack uses the 'find' command to scan the OS' file system, and stores these records. The difference between the two records are used to determine the package's contents.

    There are some directory paths that should never be included within packages. By default this list is:

    SEARCH_EXCLUDE_LIST='mnt\|sys\|proc\|tmp\|home\|lib/udev/devices'

    Note: The list uses escaped pipes and does not have a leading forward slash. The regex is applied to the --rootdir argument, so the excluded paths should be relative to that.

    This is a good set for a default Slackware installation, but some users have data in other directories which should never be included in a package. Scanning these additional directories takes extra time and serves no purpose.

    While the -x,--exclude operator is applied to the final package contents list, -o, --no-fs-search is applied before and can be used to significantly speed up the searches that build the before/after file lists.

-d,  --depend 'package1,package2'
    Ensure the given Slackware packages are installed before executing the build script.

    This is a primative method of build-time dependency checking. It simply prevents the build from failing, or a certain feature from being compiled out because (at build time) you had not got a certain library installed.

    The packages are wildcarded by slacktrack, thus you do not have to specify version information. To depend on 'oggutils' being installed, you would specify -d "oggutils" and slacktrack would find any installed version of the Slackware oggutils package.

    No depdendencies are checked by default.

-j,  --striplib
    The Slackware standard is to run strip --strip-unneeded over any shared objects. This option causes slacktrack to strip any .so objects in /usr/lib, /usr/lib64, /lib64, /lib, /usr/local/lib and /usr/libexec

    Also see option -S, --stripallexec

    The default is not to strip.

-A,  --striparchives
    This option causes slacktrack to run the strip program against any .a (archive) files that it finds in the package's directory.

    Only debugging symbols are stripped (strip -g).

    For information about such files you should read ar(1) and ranlib(1).

    Note: This option strips any .a files it finds within the package's directory rather than limiting itself to a pre-set list of directories (as with the other strip options that slacktrack provides).

    Also see option -S, --stripallexec

    The default is not to strip.

-k,  --stripbin
    The Slackware standard is to run strip --strip-unneeded over any binary files. This option causes slacktrack to strip any binaries found in /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin and /usr/X11R?/bin.

    Also see option -S, --stripallexec

    The default is not to strip.

-S,  --stripallexec
    This option performs --striplib, --stripbin and --striparchives but rather than limiting itself to a pre-set list of directories, it strips any files (with execute permissions) that the file program reports as being unstripped ELF binaries. This includes .a archives.

    The purpose of this command is to strip binaires and shared object files that are not in the normal locations. An example of a known deviations is /opt

    Using this option is slower (especially when used with packages containing many files in deep directory structures) than using --striplib, --stripbin or --striparchives options individually.

    If this option is also specified with --striplib, --stripbin or --striparchives then those options are dropped in favour of the --stripallexec mode of operation.

    The default is not to strip objects of any type.

-c,  --createdescription
    From Slackware 8.1 and upwards, the package series directories contain a name-version-arch-build.txt along with the package.

    Using this option causes slacktrack to create such a file in the build store directory (see the --buildstore option)

    The default is not to create a description file.

-e,  --chown-bdirs-root-bin
    Prior to Slackware v11, the standard was to have the /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/sbin, /usr/local/bin and /usr/X11R?/bin directories owned by root:bin.

    Slackware v11 changed binary directory ownerships to 'root:root'. If you are building packages for a version of Slackware prior to version 11, you should use this operator.

    Note: If you use the --setrootowner option then makepkg will reset the directory permissions to root.root

    The default is not to set these ownerships.

-f,  --chown-bfiles-root-bin
    Prior to Slackware v11, the standard was to have binaries contained within the /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/sbin, /usr/local/bin and /usr/X11R?/bin directories owned by root:bin.

    If you are building packages for a version of Slackware prior to version 11, you should use this operator.

    The default is not to set these ownerships.

-m,  --chown-bins-root-root
    The Slackware standard is to have the /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/sbin, /usr/local/bin and /usr/X11R?/bin directories owned by root:root.

    If you are intending on building Slackware compliant packages, please use this operator.

    If you are building packages for Slackware versions prior to 11, please see the two operators listed above.

    The default is not to set these ownerships.

-g,  --chmod644docs
    Often when installing documents, the permissions vary wildly. It is preferable if documents are chmod 644 and owned by the user 'root' and group 'root'.

    Using this option causes slacktrack to set all files contained within /usr/doc to chmod 644 and runs chmod -R root.root on the package's /usr/doc directory.

    The default is not to set these permissions.

-U,  --nousrtmp
    When compiling some programs (such as Apache), slacktrack sometimes picks up the /usr/tmp symlink. This symlink is part of another Slackware package and therefore should not be present in other packages.

    Using this option causes slacktrack to prevent this symlink from appearing in the resulting package.

    This behaviour is not the default.

-Q, --standard
    This option is the combination of the following slacktrack's options: --gzman (-z), --gzinfo (-I), --delete-usrinfodir (-K), --stripallexec (-S), --createdescription (-c), --chown-bdirs-root-bin (-m), --chown-bins-root-root (-f), --chmod644docs (-g), --delete-perllocalpod (-P), --delete-overlapping (-X) and --nousrtmp (-U).

    It can be considered the quick way to build a package which follows the Slackware standard without specifying each individual command line switch.

    You would use this option as follows:

    # slacktrack -Qp foo-2.0-i586-1.txz ./foo.build

-T,  --tempdir '<path>'
    slacktrack uses a temporary work space to store the package contents. By default, slacktrack will choose one in /var/tmp. However, you may wish to change it to another location should there not be enough space in /var/tmp to hold the temporary files.

    Please note that if the temporary directory (either automatically chosen by slacktrack or specified using this operator) already exists, slacktrack will exit with error code 6; the directory should be deleted prior to invoking slacktrack.

-L,  --nologhardlinks
    Some software distribution archive build scripts will use ln (hard link) instead of ln -s (soft link). Hard links which should not be allowed to make their way into a package that is to be distributed.

    By default, hard links are logged to screen and an additional .hardlinks.log file will be created in the build store directory.

-O,  --chmod-og-w
    Run 'chmod -R og-w' over the package directory.

    Some packages (such as PHP 4.3.0) install globally writeable files when it should not. This option runs chmod -R og-w over the entire package directory.

    This behaviour is not the default.

-Z,  --gzman-no-symfix
    Do not repair broken man page symlinks caused by the --gzman option

    Some man pages are symlinks to other man pages. When the original file is gzipped, its name changes to name.x.gz and thus the symlink is broken.

    This option repairs such broken symlinks by renaming the symlink to name.x.gz and pointing it to the new .gz man page file. The symlink also has to be named .gz otherwise the man program fails because it doesn't know that it is expecting a gzipped file.

    The default behaviour is to repair any broken symlinks.

-F,  --gzinfo-no-symfix
    Do not repair broken info page symlinks caused by the --gzinfo option

    Some info pages are symlinks to other info pages. When the original file is gzipped, its name changes to name.gz and thus the symlink is broken.

    This option repairs such broken symlinks by renaming the symlink to name.gz and pointing it to the new .gz info page file.

    The GNU info program is capable of working with broken symlinks but it is desirable to have the symlink corrected.

    The default behaviour is to repair any broken symlinks.

-M, --extra-mandir <path>
    Append additional man page directories to the default list (/usr/man, /usr/local/man, /usr/X11R?/man).

    You would want to use this option if you are storing man pages in non-system locations such as /opt/kde/man and wish to gzip them using slacktrack's --gzman option.

    Extra paths can be comma separated as shown below:
     # slacktrack --extra-mandir /opt/kde/man,/opt/prog/man

    Warning: Do not specify paths other than directories that will contain man pages, otherwise normal files will become gzipped !

-W, --extra-infodir <path>
    Append additional info page directories to the default list (/usr/info, /usr/local/info).

    You would want to use this option if you are storing info pages in non-system locations such as /opt/kde/info and wish to gzip them using slacktrack's --gzinfo option.

    Extra paths can be comma separated as shown below:
     # slacktrack --extra-infodir /opt/kde/info,/opt/prog/info

    Warning: Do not specify paths other than directories that will contain info pages, otherwise normal files will become gzipped !

-E, --extra-libdir <path>
    Append additional shared object (library) directories to the default list (/lib, /usr/lib, /usr/local/lib).

    You would want to use this option if you are storing shared objects in non-standard locations and wish slacktrack to strip them using the --striplib option.

    Multiple paths may be supplied by comma separating them.

-B, --extra-bindir <path>
    Append additional binary directories to the default list (/bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin, /usr/X11R?/bin).

    You would want to use this option if you are storing binaries in non-standard locations and wish slacktrack to strip them using the --stripbin option.

    Multiple paths may be supplied by comma separating them.

-N, --strip-prog <path>
    Specify a different binary name for the strip program. You may need to use this option if you are cross compiling and wanting to strip the resulting binaries.

    Example: # slacktrack --strip-prog /usr/local/arm/2.95.3/bin/arm-linux-strip -mnzSIP foo-2.0-arm-1.txz

    By default slacktrack will use the version of strip that it finds in the $PATH.

-R, --run-after <command>
    Run the specified command/script after the specified build script has finished and prior to creating the package.

    The purpose of this is to allow the user to inspect and if required, modify the contents of the package before the package file is created.

    Note: The CWD (working directory) is changed to the package's root directory before the specified command is executed. This allows you to specify (for example) /usr/bin/mc (Midnight Commander) and have it automatically display the contents of the package.

    Example:

    The following slacktrack command would run the Midnight Commander program mc prior to creating the package foo-2.0-arm-1.txz.

    # slacktrack -Rmc -mnzSIP foo-2.0-arm-1.txz

    By default slacktrack does not execute any commands prior to creating the package.

--run-after-withlog <command>
    This option is the same as -R, --run-after, with the only difference being that any output from that script is logged to the slacktrack build log.

    If any of your post build scripts perform any checks that should be inspected manually after the package build completes, you'd be best choosing this option; but note that logging may not work properly for any scripts that require keyboard input or use curses based applications (such as 'dialog').

--showdeps
    This option lists the installed Slackware packages that contain shared libraries upon which your new package depends.

    The purpose of this option for interest only but you may find it useful to ensure that you haven't built a package on a box that Xfree86 (for example) installed but intend to install and use the package on a box that does not, when the package has become linked against X's libraries.

    Using this option will also flag up 'orphaned' libraries (ones that do not belong to an installed package, which is especially handy if you're going to be distributing a package).

    The package dependencies (and orphans, if any) will be logged (regardless of whether logging is turned off) in text files that will be stored in the package build store (usually /tmp) under the following names:

    packagename.orphaned_ld_deps.log

    packagename.ld_deps.log

    Note: Slackware does not have any form of dependency checking and as such any file you produce will not be considered by pkgtools. However, third parties have developed a standard that uses a single file to assist with the handling of automated dependency checking (when the package is installed via 3rd party package managers such as swaret, slapt-get et al). This file resides within the package as /install/slack-required. You may like to use this feature of slacktrack to help you generate such a file.

    The default behaviour is not to display dependencies.

-X, --delete-overlapping
    After the filesystem comparison has been completed, slacktrack determines whether there are any files that overlap between the new package and those already installed on the running system. Normally there should be no overlapping files; however, some packages that provide additional Python or Perl libraries often re-process or re-compile some parts of the vendor-supplied package contents, causing slacktrack to correctly identify that the files have changed after the package build process has finished.

    It is undesirable for packages to have overlapping files because it is not possible to identify which is the master package. One of the side effects may be that the end user has problems with the installation order of the packages.

    slacktrack will identify any overlapping files and match them with the package(s) to which the file also belongs. Using this operator, slacktrack will erase any overlapping files from the content of the newly created package.

    The best practice is to review the package build log and investigate any overlapping files. It is the responsibility of the package builder (you) to determine why the file is overlapping and decide what to do with them.

--allow-overlapping
    Allow the package to contain files that overlap with packages that are already installed on the system. This is the default behaviour, if if you like to use slacktrack's -Q option to build an otherwise Slackware standards compliant package, you will need to supply this option afterwards to permit files to overlap.

--touch-filesystem-first
    Use the UNIX touch(1) tool to touch (set the objects' time stamps to the current system time) a pre-defined list of directories and their contents prior to generating the snapshot of the filesystem.

    The pre-defined paths are:
        /opt /bin /boot /dev /etc /install /lib /sbin /usr /var

    It excludes by default '/lib/udev/devices' since this contains live device data that doesn't take kindly to being touched. You may see errors from 'touch' about certain binaries, including /sbin/vol_id because this is a symlink into /lib/udev/devices.

    This is intended to be used on a throwaway development installation that's reinstalled daily or more often.

    The reason behind this is that if you run slacktrack and your build partially fails, then it will leave some data on the filesystem. You then fix the problem and re-try: this time the build may succeed. However, if the original data on the filesystem from the first part-failed build has *not* changed (for example, if it was some static data that was copied with cp -a (preserved time stamp & ownership)) between the first part-failed build and second successful build, slacktrack will miss this data from the final package file.

    This option updates the file stamps contained within standard package directories, therefore allowing slacktrack to detect changes (even if the data contains an *old* time stamp from 1982, it will still detect the difference).

    Note: This is an expert option and is not recommended for use unless you are working on a throw-away development installation.

--touch-filesystem-faster
    This operator performs the same function as --touch-filesystem-first except that it uses a faster method; except that potentially speed comes at a price.

    If this method finds files or directories with spaces in the name, it may create empty files in your package's source build directory.

    For example:

    /usr/doc/prog-2.0/FILE WITH A SPACE IN IT

    You may find that you have six new files, "FILE", "WITH", "A", "SPACE," "IN", and "IT" existing in your package's build source directory.

    However, if you know that there are no files or directories with spaces in their names, feel free to use this option in preference to --touch-filesystem-first.

    Note: This is an expert option and is not recommended for use unless you are working on a throw-away development installation.

-Y, --delete-orphaned-pyc
    After the build has completed, this option scans the contents of the new package, and if it finds any '*.pyc' files without a matching '*.py' file, the *.pyc file will be removed from the package contents (but not from the filesystem).

    This scan only checks the content of the package not the filesystem. There may be a corresponding '*.py' file on the filesystem, but it wasn't created or modified during the build process of this particular package.

    When building Slackware's 'ap/linuxdoc-tools' package, we found that 'gnome doc-tools' was causing some Python '*.py' system files from the Python package to be recompiled (generating '*.pyc' files) but was not modifying the original '*.py' files. This meant that slacktrack was correctly detecting the changed '*.pyc' files and including them in the 'linuxdoc-tools' package; but this meant that we had file overlap with the 'd/python' package. Since the original '*.py' files were not modified, and the '*.pyc' files already existed in the Slackware Python package, they didn't need to be included in the 'linuxdoc-tools' package - and the overlapping files would have caused problems with package upgrades.

    This option is not on by default because it's quite conceivable that the user may wish to include '*.pyc' files without '*.py' files.

    If the directories and parent directories containing the *.pyc files become empty after this operation, then these directories are removed from the package.

--keep-la-files
    Slackware versions 15.0 and greater do not include any '*.la' (Library Archive) files within the /usr/lib and /usr/lib64 directories.

    By default, slacktrack removes any '*.la' contained within these two library paths.

    Specifying this option causes any such files to be retained.

SPECIAL SLACKTRACK ENVIRONMENT VARIABLES
slacktrack makes a small number of environment variables available to the build script(s). The variables allow build scripts to gain access to various inner-workings of slacktrack.

SLACKTRACKFAKEROOT
    This directory is the 'root' directory of the package. You may wish to access this directory during build or post-build time so that you can perform special operations that slacktrack itself cannot perfom.

    However, the to-be-packaged contents won't exist in this directory until after the build script finishes and the package has installed itself to the filesystem; but you can still pre-populate it with content if you wish, although typically you'd perform these actions directly onto the filesystem and let slacktrack take care of packaging it.

    For example, whilst slacktrack is able to strip all ELF objects, it may be that a small number of the objects will not function when stripped, yet the rest will. Therefore you cannot use slacktrack's stripping options to accomplish this task; instead you can access the package's directory directly.

    You could do this using the following script, called from slacktrack using the -R, --run-after operator:

# slacktrack -R $CWD/postbuildfixes.sh -Qp foo-1.0-i586-2.txz ./foo.build
    Example post build script 1:

    Where the 'postbuildfixes.sh' script contains:

    ( cd ${SLACKTRACKFAKEROOT}
          strip usr/bin/foo
          strip bin/bar )

    Example post build script 2:

    Another example would be to remove known files that were detected by slacktrack as being changed/added/updated during the build process, but that we do not want to be packaged. This is an easier method than using the -x,--exclude operator.

    # Incase you had CUPS running:
      rm -rf etc/cups etc/printcap
      # crond:
      rm -rf var/spool/cron
      rmdir var/spool
      # perllocal.pod files don't belong in packages.
      # SGMLSPL creates this:
      find . -name perllocal.pod -print0 | xargs -0 rm -f
      # Some doc dirs have attracted setuid.
      # We don't need setuid for anything in this package:
      chmod -R a-s .

    Note: You may use any shell commands once inside the package's root directory but be careful never to specify any paths within the real root directory (for example /usr rather than usr) in any of your commands.

SLACKTRACKSCRATCHDIR
    This directory provides a temporary 'scratch' directory for use by the build scripts. Its purpose is to allow the author to simplify the build scripts by removing the need to create and manage temporary directories where the source archives will be unpacked.

    Example usage:

    cd ${SLACKTRACKSCRATCHDIR}
       tar jxf /path/to/source/ball.bz2
       cd ball-2.3
       ./configure && make install

    This directory is subject to the same command line options as the rest of the slacktrack temporary build tree; if --notidy is specified then this directory will remain, otherwise it is deleted.

EXAMPLES

# slacktrack -p foo-0.10-i586-1.txz '/bin/sh -x foo.build'
    This is the minimum selection of options you must pass to slacktrack. You are simply telling slacktrack the name of the resulting package file and specifying that slacktrack should launch "foo.build" via "/bin/sh"

# slacktrack -jmkznp bar-3.20-arm-5.txz ./bar.build
    We are telling slacktrack to strip libraries, chown root:root /bin /sbin, /usr/bin, /usr/sbin, /usr/local/sbin, /usr/local/bin and /usr/X11R?/bin directories, chown root:root files in the binary dirs, strip binaries found in the binary dirs listed above and gzip man pages.

    The resulting Slackware package name is 'bar-3.20-arm-5.txz'

    Note that I have compounded the various options; the above option list could also be specified as -j -m -k -z -n -p bar-3.20-arm-5.txz

There are various example scripts in /usr/doc/slacktrack-2.20/examples

WARNINGS

Do not use slacktrack on production machines
    Please do not run slacktrack on a production machine. Infact, it is advisable not build any packages (either SlackBuild or .build) on production machines.

    Always use a development box.

Slackware versions
    slacktrack has only been tested on Slackware 8.1 & Slackware-9 and Splack (Slackware on SPARC, using Slackware 9's pkgtools & tar-1.13).

    It may works on previous releases of Slackware, it may not.

slacktrack default working space
    By default, slacktrack puts its work space in /var/tmp/

    It is essential that you have enough disk space on the partition on which /var/tmp resides. If you do not then you can pass --tempdir to slacktrack to change the base temporary directory:

    # slacktrack --tempdir /tmp/slacktrack -jefknzp "foobar-4.1-arm-2.txz" "/bin/sh foobar.build">

RETURN VALUES
These are the exit codes that slacktrack will produce when it encounters certain problems. You may wish to use these return codes to indicate success or failure when slacktrack is called from unattended auto builder scripts.

0 Clean exit
    slacktrack exited without encountering any errors. This is the default exit code.

1 Reserved
    This error code is not currently used.

2 Missing command line parameters
    slacktrack was called with insufficient parameters or a parameter that requires a value was specified but no value was given.

3 Slackware package dependencies failed
    slacktrack was asked to check that certain Slackware packages were installed. It didn't find at least one of the specified packages.

4 Missing external helper
    slacktrack failed to find a required external helper. Currently the external helpers is the Slackware 'makepkg' utility.

5 Zero files found in slacktrack's package-content-tracking working directory
    slacktrack failed to find any files installed as part of the build process.

    This error may be due to any of the following reasons:

    1. The build script or command line specified did not exist or could not be executed.

    2. The build script/command line exists but failed to be executed or executed and died with an error

    3. The build script/command worked as expected but slacktrack failed to detect any activity.

    It is suggested that you run slacktrack with the --notidy option and inspect the working space directory in /var/tmp/ to discover what the problem is.

6 Possibly unsafe to continue operation.
    slacktrack determined that it was possibly unsafe to continue. This may be because it found the temporary directory to already exist (slacktrack needs to wipe the temporary directory), or it may get to a point where it needs to overwrite an existing file which would require manual intervention.

    Since slacktrack is designed to be scriptable, it will never prompt for human interaction - just fail with pre-set error codes which can be collected by caller scripts.

FILES
/usr/bin/slacktrack the slacktrack script

/usr/doc/slacktrack-2.20/LICENCE a copy of the GPLv2 licence

/usr/doc/slacktrack-2.20/OVERVIEW an overview of the Slackware package system & build scripts

/usr/doc/slacktrack-2.20/PACKAGE_BUILDING_CHECKLIST a checklist for package builders

AUTHOR
Stuart Winter <mozes@slackware.com>

SEE ALSO
    makepkg(8), installpkg(8), explodepkg(8), removepkg(8), pkgtool(8), upgradepkg(8), slackdtxt(8)