diff options
| author | Mathieu Arnold <mat@FreeBSD.org> | 2017-08-14 14:59:20 +0000 |
|---|---|---|
| committer | Mathieu Arnold <mat@FreeBSD.org> | 2017-08-14 14:59:20 +0000 |
| commit | 2316b460bdc2013bcff9bd442f69ec4021f9c669 (patch) | |
| tree | 2d775c03dee9341b46efee67b5e0e3f5d39eea25 | |
| parent | 9a953bdba8424ba2d845959832777e174cf6c4c8 (diff) | |
Notes
| -rw-r--r-- | en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml index 4930352f95..e3fcfc1190 100644 --- a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -2516,6 +2516,39 @@ USE_GITHUB= yes</programlisting> <varname>${WRKDIR}/foo-1.0.2</varname>.</para> </example> + <example xml:id="makefile-master_sites-github-ex4"> + <title>Using <varname>USE_GITHUB</varname> When Upstream Does + Not Use Versions</title> + + <para>If there never was a version upstream, do not invent one + like <literal>0.1</literal> or <literal>1.0</literal>. + Create the port with a <varname>DISTVERSION</varname> of + <literal>g<replaceable>YYYY</replaceable><replaceable>MM</replaceable><replaceable>DD</replaceable></literal>, + where <literal>g</literal> is for + <application>Git</application>, and + <literal><replaceable>YYYY</replaceable><replaceable>MM</replaceable><replaceable>DD</replaceable></literal> + represents the date the commit referenced in + <varname>GH_TAGNAME</varname>.</para> + + <programlisting>PORTNAME= bar +DISTVERSION= g20140411 + +USE_GITHUB= yes +GH_TAGNAME= c472d66b</programlisting> + + <para>This creates a versioning scheme that increases over + time, and that is still before version <literal>0</literal> + (see <xref linkend="makefile-versions-ex-pkg-version"/> for + details on &man.pkg-version.8;):</para> + + <screen>&prompt.user; <userinput>pkg version -t g20140411 0</userinput> +<</screen> + + <para>Which means using <varname>PORTEPOCH</varname> will not + be needed in case upstream decides to cut versions in the + future.</para> + </example> + <sect3 xml:id="makefile-master_sites-github-multiple"> <title>Fetching Multiple Files from GitHub</title> |
