You are encouraged to take full control of the building process by reviewing, customising and creating hintfiles. A hintfile is a file that supplements a SlackBuild's .info file, for example to specify options and additional dependencies for the SlackBuild, to override the version, downloads and md5sums, etc.
The format of a hintfile is based on the format of the SlackBuilds.org .info file, but all the variables are optional, and any unrecognised variables are ignored. Most SlackBuilds do not need hintfiles, and most hintfiles will only have one or two variables. The variables you can set are as follows:
OPTIONS="OPT1=yes OPT2=no ..." ADDREQUIRES="additional dependencies" GROUPADD="gid:groupname ..." USERADD="uid:username[:controlargs...] ..." VERSION="newversion" DOWNLOAD="new urls" MD5SUM="new md5sums" SHA256SUM="sha256sum" DOWNLOAD_arch="new urls" MD5SUM_arch="new md5sums" SHA256SUM_arch="sha256sum" SKIP="yesno" ARCH="arch" INSTALL="yesno" NUMJOBS="-j1" ANSWERS="strings" CLEANUP="commands" PRAGMA="pragmas"
Each repository has two directories for hintfiles: one for your own local hintfiles, and one for system-supplied default hintfiles. For the SBo repository, your own directory is
and the default hintfile directory is
You should always review the README files of the SlackBuilds that you are building,
and then consider whether you need to create a hintfile for your own requirements
The default hintfile directory contains a structure of subdirectories that
is the same as the subdirectories in the SlackBuilds repository.
For example, if the SBo repository's SlackBuild file for wxPython is
libraries/wxPython/wxPython.SlackBuild, then its default hintfile will be
In your own hintfile directory, you can use the same structure, or you can just
put your own hintfiles in
Your own local hintfiles override the default hintfiles.
The default hintfiles will be updated every time you upgrade slackrepo.
If you don't want to use the default hintfiles, you can disable them completely by setting the variable DEFAULT_HINTDIR to null or commenting it out in the configuration file.
OPTIONS="OPT1=yes OPT2=no ..."
This hint should define options that are described in the SlackBuild's README file.
To specify the optional requirements that are described in the SlackBuild's README file, you should set this variable to a list of dependencies, separated by spaces. Dependencies in this list will be added to the dependencies in the REQUIRES= list defined in the SlackBuild's .info file. If the .info file specifies %README%, you should set this hint (possibly with an empty value) to stop slackrepo displaying a warning.
This hint defines groups to be added on the host system. If a group already exists, nothing will be done. If more than one group is to be added, a space-separated list can be specified. Example:
This hint defines usernames to be added on the host system. If a username already exists, nothing will be done. Optionally, additional control arguments of the useradd command can be specified, separated by colons, with the space between the control argument and its argument omitted. If more than one username is required, a space-separated list of specifications can be defined. Examples:
USERADD="209:postgres:-d/var/lib/pgsql" USERADD="270:smtpd:-g0:-r:-s/bin/false:-d/var/empty 271:smtpq:-r:-s/bin/false:-d/var/empty"
This hint can be specified to override the version number in both the SlackBuild and .info files. This is done by a simple text substitution, so it is not guaranteed to work (particularly if the old version number is something like '1'), and you might need to set a new value for the DOWNLOAD variable in the hintfile. The md5sum of the source archive will not be checked, unless you have also supplied a new md5sum in the hint file. The patched SlackBuild and info files are not kept.
This hint redefines download URLs that replace the URLs specified in the .info file, for example if you have also defined VERSION=, or if the upstream URL has changed.
However, if specified as
DOWNLOAD="no", this hint indicates that the source needs to be downloaded
manually (for example, because of a licence agreement). If you have already downloaded
the source into the source cache, and if the md5sum is correct, then the package will be built.
Otherwise, a message will be displayed explaining what you should do, and the package will be skipped.
This hint redefines md5sums that replace the md5sums specified in the .info file, for example if you have also redefined VERSION=, or if the upstream source archive has been changed.
However, if specified as
MD5SUM="no", this hint indicates that the source md5sums are not
reliable (for example, because of an unversioned archive) and should not be checked.
This hint specifies an sha256sum that will be checked (in addition to any md5sum).
These hints redefine DOWNLOAD and MD5SUM, and specify SHA256SUM, as above, for the specified arch.
This hint can be specified if you want to skip the package when it would
otherwise be built, rebuilt, updated or removed. If the hint isn't specified
SKIP="no", it will be interpreted
as "yes", and the string will be displayed when the build is skipped, so that
you can put a helpful message into it, for example:
SKIP="Please remove the Slackware nc package before you build netcat-openbsd"
This hint temporarily overrides the value of ARCH given in the configuration file or environment. This hint is most useful for SlackBuilds that repackage binaries.
This hint temporarily overrides the value of INSTALL given in the configuration file or on the command line. Use this hint if you want a specific package to be installed after it has been built (e.g. nvidia-driver). Note that if the control argument --dry-run is specified, this hint will be ignored.
This hint temporarily overrides the value of NUMJOBS given in the configuration file or environment. Use this hint if the build process fails when multiple 'make' jobs are used, so that the build will be executed with MAKEFLAGS='-j1'.
This hint can be specified if the package needs extra cleanup when it is uninstalled (e.g. packages that replace standard Slackware packages or install kernel modules). The hint should define an appropriate shell command pipeline. For example, to reinstall Slackware packages:
CLEANUP="echo y | slackpkg -dialog=off -only_new_dotnew=on reinstall tetex tetex-doc"
or to clean up after a kernel module is uninstalled:
This hint can be specified if the build process wants to read answers to its questions during execution, for example concerning a licence agreement. The string is piped into the SlackBuild's standard input, so it should contain whatever will make the build process happy. Newlines can be specified as \n, for example
This hint can be specified to perform one or more pragmas (i.e. special actions). Pragmas are not guaranteed to work! The following pragmas are available:
download_basename — provide a symlink for source downloads using the URL's basename, for the benefit of SlackBuilds that don't expect content-disposition to be respected.
noexport_ARCH and noexport_BUILD and noexport_TAG — Set ARCH or BUILD or TAG by patching the SlackBuild instead of exporting it to the environment.
unset_ARCH — unset the value of ARCH, overriding the value given in the configuration file or environment. Other variables can be specified, for example
noremove — do not remove (uninstall) packages before building the item. This is particularly useful for gcc, glibc, etc.
— override building the package as a non-root user with fakeroot.
Build the package as root, using
no_make_test — patch the SlackBuild to comment out any 'make test' command.
— temporarily provide
as described in the memtest86+ README and xen SlackBuild.
— patch the SlackBuild to use the tar command's
control argument. Use this if you get the error message
tar: Directory renamed before its status could be extracted.