15.5.1 The pack meta data
A pack must have a file pack.pl
in its root directory.
The file contains Prolog terms. Defined terms are below. The argument
types are types registered with must_be/2
and described in the running text.
- name(atom)
- Name of the pack. This should be the same as the directory name. Names
can be constructed from the ASCII letters, underscore and digits, e.g.,
[a-zA-Z9-0_]+
- title(atom)
- Short summary of the package. Do not use line breaks and limit respect at maximum length of about 40 characters.
- keywords(list(atom))
- List of keywords that help finding your pack. There is no fixed set of keywords to choose from.
- description(list(atom))
- Longer description as a list of lines.
- version(version)
- Current version of the pack. This is a list of integers separated by dots. There is no limit to the number of sub revisions.
- author(atom, email_or_url_or_empty)
- Original author of the code. If the contact address is unknown it may be omitted (empty atom). Repeat this term for multiple authors.
- maintainer(atom, email_or_url)
- packager(atom, email_or_url)
- As
author
, but the contact cannot be empty. May be repeated. - pack_version(nonneg)
- Package convention number. Currently 1 (default) or 2. Version 2 provides better support for building foreign extensions.
- home(atom)
- Location of th home page. This is typically a URL.
- download(atom)
- Location for downloading. This is either the URL of the GIT repository or a wildcard URL for downloading the archive, e.g., https://me.com/packs/mypack-*.zip. An upgrade request fetches the https://me.com/packs/, expecting an HTML page with links to the available versions. It then selects the latest version.
- provides(atom)
- Announce that the pack provides facilities identified by the given
token. Optionally, the token may be given a version using
@(Token,Version)
. A pack implicitly provides@(PackName,PackVersion)
. The supplied tokens operate in the same name space as packages and thus the same care must be taken to select a name. Multiple of these claims may be present. - requires(dependency)
- The pack depends on the availability of Dependency. The
Dependency is a token, normally the name of another package.
See
provides
. The dependency may be further refined by writingToken Cmp Version
, where Cmp is one of Prolog's standard numerical comparison operators. See cmp_versions/3. This metadata is also used to state requirements on Prolog. See section 15.5.1.1. Multiple requirements are expressed with multiple claims. - conflicts(dependency)
- The pack cannot be use together with the indicated Dependency.
This is the negation of
requires
. - replaces(atom)
- This pack replaces some other pack.
- autoload(boolean)
- If
true
, add the library for the package as autoload library. This implies that the exported predicates may be used without explicitly importing the library. Use with care.
15.5.1.1 Pack requirements on Prolog
The file pack.pl
may contain requires(Requirement)
statements. Normally, Requirement is a pack or token,
optionally with a version requirement. The requirement prolog
is reserved for requirements on the Prolog version while
prolog:
Feature may be used to demand specific
features. Feature matching is described with
require_prolog_version/2.
Multiple requirements on Prolog must all be true. Below are some
examples
requires(prolog >= '9.2'). % 9.2.0 or later requires(prolog:threads). % flag threads = true requires(prolog:library(socket)). % library(socket) exists requires(prolog:bounded(false)). % flag bounded = false