# Global Keywords

MacPorts keywords are used to specify required or optional items within a Portfile, or to override default options used by MacPorts base for individual ports. Keywords are to be used within the "global" and "variant" sections of Portfiles, and not within optional port phase declarations.

The global keywords listed below specify information for ports as a whole, whereas the keywords listed under a port phase specify information to be used during a particular installation phase.

PortSystem

  The top line of every Portfile; it must be followed by a blank line. It defines which version of the Portfile interpreter will be used.

      PortSystem          1.0

name

  The name of the Port; it should be lowercase to prevent uninstallation problems due to a macports base bug.

      name                foo

version

  The version of the ported software.

      version             1.23.45

revision

  Optional keyword (default is 0) that is used to track port revisions. It should not be incremented for port revisions unless it would benefit users to upgrade an installed port, and cleared when the port is updated to a newer version.

  It should be used if a bug in the Portfile was found and all installations of this port have to be updated. If the change only affects new installations, there is no need to increase it.

      revision            1

epoch

  An optional keyword (default value is 0) that may be used when ports are updated to a version that is numerically less than the previous version. For example 1.10 -> 1.2 or 20070928 -> 1.0. An epoch ensures that port version comparisons work correctly in these cases. Often the epoch is formatted like a date, but it can simply be a number such as 1.

      epoch               20080924

      epoch               1

  An epoch is not needed for most ports. If an epoch is used it must never be decreased or removed even when a port's version is updated; this would cause port version comparisons to be incorrect since epochs take precedence over versions once epochs have been used.

categories

  The category under which the ported software falls. The first category should be the same as the directory within which the Portfile is stored; secondary and tertiary categories may be selected.

      categories          net security

maintainers

  A port's maintainer is a person or persons who take responsibility for keeping the port up-to-date, and the maintainer keyword lists maintainer email addresses(s). However, many maintainers wish to hide these addresses from spambots; to do so follow these conventions:

  - For addresses in domain @macports.org, simply omit the domain name.

  - For addresses in other domains, say account@example.org, use the convention example.org:account to specify the address.

  In the example below, the maintainer email addresses jdoe@macports.org and julesverne@example.org are hidden using these conventions.

      maintainers         jdoe \
                          example.org:julesverne

description

  A one-sentence description of the ported software.

      description         A classic shooter arcade game.

long_description

  A long description of the ported software. Break long lines with escaped newlines.

      long_description    A classic shooter arcade game derived from \
                          the game alien-munchers.  Not suitable for \
                          children under two years old.

homepage

  Port application's homepage.

      homepage            http://www.example.org/apps

platforms

  The platforms on which the port has been tested.

      platforms           darwin freebsd