svn commit: r46370 - head/en_US.ISO8859-1/books/porters-handbook/makefiles

Mathieu Arnold <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
Author: mat (ports committer)
Date: Mon Mar 23 18:18:26 2015
New Revision: 46370
URL: https://svnweb.freebsd.org/changeset/doc/46370

Log:
  Correct GH_TAGNAME's default, and add another example.
  
  Differential Revision:	https://reviews.freebsd.org/D2118
  Reviewed by:	bcr bdrewery
  Sponsored by:	Absolight

Modified:
  head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml

Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml	Mon Mar 23 16:26:59 2015	(r46369)
+++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml	Mon Mar 23 18:18:26 2015	(r46370)
@@ -1829,8 +1829,8 @@ MASTER_SITE_SUBDIR=	stardict/WyabdcRealP
 		<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>
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.