SLACKREPO.HINT(5)

NAME
slackrepo.hint - slackrepo hintfile format

SYNOPSIS
/etc/slackrepo/ID/hintfiles/prgnam.hint

where ID is 'SBo' by default.

DESCRIPTION
A "hintfile" is a file that supplements a SlackBuild's .info file, for example to specify options and additional dependencies, to override the version, downloads and md5sums, etc.

Each repository ID should have a local hintfiles directory, as configured by the HINTDIR variable in the configuration file (see slackrepo.conf(5)). By default this will be /etc/slackrepo/ID/hintfiles.

The local hintfiles directory can optionally contain 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 hintfile would be /etc/slackrepo/SBo/hintfiles/libraries/wxPython/wxPython.hint. Alternatively, hintfiles can be placed in the top level directory, for example /etc/slackrepo/SBo/hintfiles/wxPython.hint. A hintfile in the top level directory takes precedence over a hintfile of the same name in a subdirectory.

Each repository ID should also have a default hint directory for system supplied hintfiles, as configured by the DEFAULT_HINTDIR variable in the configuration file (see slackrepo.conf(5)). For example, the SlackBuilds.org default hintfiles for Slackware 14.1 are supplied in the directory /usr/share/slackrepo/SBo/default_hintfiles/14.1 . The default hintfiles directory contains a structure of subdirectories that is the same as the subdirectories in the SlackBuilds repository.

Local hintfiles always take precedence over default hintfiles. You can disable the default hintfile directory completely by unsetting the DEFAULT_HINTDIR variable.

The format of a hintfile is based on the format of SlackBuilds.org .info files, but all the entries are optional, and any unrecognised entries are ignored. Most SlackBuilds do not need hintfiles, and most hintfiles will only have one or two variables.

  VERSION="newversion"

This hint can be specified to attempt an automatic patch of the version number in both the SlackBuild and info files. The automatic patch is done by a simple text substitution. This often won't work (particularly if the old version number is something like '1', or if the download URL has not been patched correctly and you have not supplied a new download URL in the hint file). The md5sum and/or sha256sum of the source archive will not be checked, unless you have also supplied a new md5sum and/or sha256sum in the hint file. The patched SlackBuild and info files are not kept.

  DOWNLOAD="new urls"

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.

  MD5SUM="new md5sums"

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.

  SHA256SUM="sha256sums"

This hint specifies an sha256sum that will be checked (in addition to any md5sum).

  DOWNLOAD_arch="new urls" and MD5SUM_arch="new md5sums" and SHA256SUM_arch="sha256sums"

These hints redefine DOWNLOAD and MD5SUM, and specify SHA256SUM, as above, for the specified arch.

  ADDREQUIRES="additional dependencies"

This hint should define a list of dependencies, separated by spaces. Dependencies in this list will be added to the dependencies defined by the REQUIRES= list defined in the .info file. If the .info file specifies %README%, you should set this hint (possibly as an empty string) to stop slackrepo displaying a warning.

  DELREQUIRES="dependencies to ignore"

To ignore dependencies in the REQUIRES= list, use this hint.

  BUILDTIME="dependencies to exclude from package manager metadata"

Use this hint to exclude dependencies from the package manager dependency metadata in the package repo (that is, the .dep files and optional FOR_SLAPTGET records).

  OPTIONS="OPT1=yes OPT2=no ..."

This hint should define options described in the SlackBuild's README file. Note that this is the only way in slackrepo that you can define SlackBuild options.

  GROUPADD="gid:groupname ..."

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:

        GROUPADD="209:postgres"

  USERADD="uid:username[:controlargs...] ..."

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"

  SKIP="yesno"

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 as SKIP="yes" or 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"

  ARCH="arch"

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.

  INSTALL="yesno"

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.

  NUMJOBS="-j1"

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'.

  NOWARNING="Extended RE"

This hint suppresses slackrepo warnings that match the specified extended regular expression. Multiple warnings can be suppressed by using a suitable expression, for example:

        NOWARNING="(Nonstandard directories|Unexpected owner/group)"

  ANSWERS="string"

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

        ANSWERS="ok\nyes"

  CLEANUP="commands"

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 line. to clean up after a kernel module is uninstalled:

        CLEANUP="depmod -a"

For your convenience, slackrepo provides a command s_reinstall that reinstalls the specified Slackware packages, for example:

        CLEANUP="s_reinstall tetex tetex-doc"

  PRAGMA="pragmas"

This hint can be specified to perform one or more pragmas. Pragmas are not guaranteed to work! Multiple pragmas can be specified, separated by spaces. The following pragmas are available:

python3

Force python3 support: add python3 to the dependencies, set the PYTHON3="yes" option, and if necessary patch the SlackBuild to support python3.

kernelmodule and kernel

Rebuild when the build host's kernel is upgraded; 'kernelmodule' also causes depmod to be run when the package is uninstalled.

kernelversion

Force uname to return the KERNEL env var as the version. This is useful if you are building a kernel on a host running a different kernel, but the slackbuild (or the software it is building) does not respect the environment variable.

multilib_ldflags

On a multilib host, attempt to patch the SlackBuild to specify LDFLAGS, as described in SlackBuilds.org FAQ 18.

wget or curl

Download with a fake wget or curl user agent string.

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.

need_net and need_X

Do not block the network, and/or the X display, when building.

x86arch=arch

When building on 32 bit x86, set the ARCH to arch.

noexport_ARCH and noexport_BUILD and noexport_TAG

Set ARCH and/or BUILD and/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 instead of ARCH, for example

        PRAGMA="unset_DISTCC_HOSTS"

noremove

Do not remove (uninstall) packages before building the item. This is particularly useful for gcc, glibc, etc.

nofakeroot

Override building the package as a non-root user with fakeroot. Build the package as root, using sudo.

no_make_test

Patch the SlackBuild to comment out any 'make test' command.

stubs-32

Temporarily provide /usr/include/gnu/stubs-32.h as described in the memtest86+ README and xen SlackBuild.

abstar

Patch the SlackBuild to use the tar command's --absolute-names control argument. Use this if you get the error message

download_urldecode

URL decode the values from DOWNLOAD before using them. Might need to be combined with download_basename if the slackbuild has a url-encoded DOWNLOAD configured and the slackbuilds expects the percent-encoded values.

        tar: Directory renamed before its status could be extracted

SEE ALSO
slackrepo(8), slackrepo.conf(5), installpkg(8), upgradepkg(8), removepkg(8), pkgtool(8), slackpkg(8).