manpages

slackrepo(8)slackrepo.conf(5)slackrepo.hint(5)

slackrepo.hint (5)

NAME

slackrepo.hint - slackrepo hintfile format

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

/etc/slackrepo/ID/hintfiles/prgnam.hint
/etc/slackrepo/ID/default_hintfiles/slackversion/.../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. The entries that can be defined 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"
ARCH="arch"
DOWNLOAD_arch="new urls"
MD5SUM_arch="new md5sums"
SHA256SUM_arch="sha256sum"
SKIP="yesno"
INSTALL="yesno"
NUMJOBS="-j1"
CLEANUP="commands"
ANSWERS="strings"
PRAGMA="pragmas"

    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.

    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.

    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"

    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 and/or sha256sum 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).

    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.

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

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

    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"

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

    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. For example, 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"

    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"

    PRAGMA="pragmas"

This hint can be specified to perform one or more pragmas. Pragmas are not guaranteed to work! The hint name 'PRAGMA' used to be 'SPECIAL', which is still accepted as a synonym. The following pragmas are available:

multilib_ldflags

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

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
noexport_BUILD
noexport_TAG

Set the value of 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

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


slackrepo-0.2.0 SLACKREPO.HINT (5) 2015-04-12