# Livecheck / Distcheck

Options livecheck and distcheck are especially useful for port maintainers, but others may also find this information valuable.

Livecheck checks to see if MacPorts can query the developer's download site to determine if a newer version of the software has become available since the port was installed.

livecheck.check

  Specify what kind of update check to perform.

  Open source mirror site options are to use the project's latest file release from `sourceforge` or `googlecode`, or the project's `date_updated` XML tag for `freshmeat`. These options are automatically used if a matching `${master_sites}` URL is used.

  Generic download site options are to specify a `moddate` (modification date of a URL resource), a `regex` (retrieve the version by applying a regex to a URL resource), `regexm` (retrieve the version by applying a multi-line regex to a URL resource), `md5` (compares the md5 sum of a URL resource) or `none` (no check).

  - Default: `sourceforge` or `googlecode` if the `${master_sites}` is one of these, else `freshmeat`.

  - Values: `freshmeat` `sourceforge` `googlecode` `moddate` `regex` `regexm` `md5` `none`

  - Examples:

        livecheck.check     regex
        livecheck.url       ${homepage}
        livecheck.regex     "Generally Available (\\d+(?:\\.\\d+)*)"

livecheck.name

  Name of the project for live checks. Is only used with freshmeat, sourceforge, and googlecode livechecks.

  - Default: `${name}` or the sourceforge, freshmeat or googlecode project name if it can be guessed from `${master_sites}`.

  - Example:

        livecheck.name      hibernate

livecheck.distname

  Name of the file release for sourceforge and googlecode checks. For sourceforge releases use the name of the package release. For googlecode releases use the name of the file download, including extension. You may use this keyword without `livecheck.version` if you replace the version part of the name with "`(.*)`".

  - Default: sourceforge: `${livecheck.name}`, googlecode: first `${distfiles}` item

  - Example:

        livecheck.distname  faad2.src

livecheck.version

  Version of the project for a check; used for regex-based checks.

  - Default: `${version}`

  - Example:

        livecheck.version   ${name}-${version}

livecheck.url

  URL to query for a check.

  - Default:

    - `${homepage}` or the first hit among the following sites:

    - `http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml`

    - `http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}`

    - `http://code.google.com/p/${livecheck.name}/downloads/list`

  - Example:

        livecheck.url       http://ftp.gnu.org/gnu/bison/

livecheck.regex

  Regular expression to parse the resource for regex checks. Be sure to use a regular expression grouping around the version component.

  - Default: none

  - Example:

        livecheck.regex     4th-([a-z0-9.]+)-unix${extract.suffix}

livecheck.md5

  md5 checksum to use for an md5 comparison.

  - Default: none

  - Example:

        livecheck.md5       37e6a5b6516a680c7178b72021d3b706

Distcheck reports whether or not the distfile(s) specified in a Portfile are still available on the developer's download site. Examples are given below.

distcheck.check

  This option can be used to disable distcheck. It specifies what kind of check should be performed on distfiles: `moddate` (check if the Portfile is older than the distfile) or `none` (no check).

  - Default: `moddate`

  - Example:

        distcheck.check     none