Correct GH_TAGNAME's default, and add another example.

Differential Revision:	https://reviews.freebsd.org/D2118
Reviewed by:	bcr bdrewery
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2015-03-23 18:18:26 +00:00
parent 466294a886
commit c2a8bc3e28
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46370

View file

@ -1829,8 +1829,8 @@ MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
<entry>Name of the tag to download (2.0.1, hash, ...)
Using the name of a branch here is incorrect. It is
also possible to use the hash of a commit id to do a
snapshot</entry>
<entry><literal>${DISTVERSION}</literal></entry>
snapshot.</entry>
<entry><literal>${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}</literal></entry>
</row>
</tbody>
</tgroup>
@ -1883,6 +1883,30 @@ GH_TAGNAME= 6dbb17b</programlisting>
<literal>${WRKDIR}/pkg-6dbb17b</literal>.</para>
</example>
<example xml:id="makefile-master_sites-github-ex3">
<title>Use of <varname>USE_GITHUB</varname> with
<varname>DISTVERSIONPREFIX</varname></title>
<para>From time to time, <varname>GH_TAGNAME</varname> is a
slight variation from <varname>PORTREVISION</varname>.
For example, if the version is <literal>1.0.2</literal>,
the tag is <literal>v1.0.2</literal>. In those cases, it
is possible to use <varname>DISTVERSIONPREFIX</varname> or
<varname>DISTVERSIONSUFFIX</varname>:</para>
<programlisting>PORTNAME= foo
PORTVERSION= 1.0.2
DISTVERSIONPREFIX= v
USE_GITHUB= yes</programlisting>
<para>It will automatically set
<varname>GH_TAGNAME</varname> to
<literal>v1.0.2</literal>, while <varname>WRKSRC</varname>
will be kept to
<varname>${WRKDIR}/foo-1.0.2</varname>.</para>
</example>
</sect3>
</sect2>