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.
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 the project's
date_updated
XML tag for
freecode
. 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
freecode
.
Values: freecode
sourceforge
googlecode
moddate
regex
regexm
md5
none
Examples:
livecheck.type regex livecheck.url ${homepage} livecheck.regex "Generally Available (\\d+(?:\\.\\d+)*)"
Name of the project for live checks. Is only used with freecode, sourceforge
Default: ${name}
or the sourceforge,
freecode project name if it can be guessed from
${master_sites}
.
Example:
livecheck.name hibernate
Name of the file release for sourceforge
checks. Use the name of the package release.
You may use this keyword without
livecheck.version
if you replace the version part of
the name with “(.*)
”.
Default: sourceforge:
${livecheck.name}
Example:
livecheck.distname faad2.src
Version of the project for a check; used for regex-based checks.
Default: ${version}
Example:
livecheck.version ${name}-${version}
URL to query for a check.
Default:
${homepage}
or the first hit among
the following sites:
http://freecode.com/projects-xml/${livecheck.name}/${livecheck.name}.xml
https://sourceforge.net/api/file/index/project-name/${livecheck.name}/rss
https://code.google.com/p/${livecheck.name}/downloads/list
Example:
livecheck.url https://ftp.gnu.org/gnu/bison/
Regular expression to parse the resource for regex checks. Be sure to use a regular expression grouping around the version component. Also remember that square brackets need to be quoted because Tcl otherwise interprets them as a procedure call.
Default: none
Example:
livecheck.regex 4th-(\[a-z0-9.\]+)-unix${extract.suffix}
md5 checksum to use for an md5 comparison.
Default: none
Example:
livecheck.md5 37e6a5b6516a680c7178b72021d3b706
Disables verification of the server's SSL certificate.
Default: no
Example:
livecheck.ignore_sslcert yes
Sets the Accept-Encoding HTTP header in the request and automatically decompresses the server's response.
Default: yes
Example:
livecheck.compression no
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.
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