From 2316b460bdc2013bcff9bd442f69ec4021f9c669 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Mon, 14 Aug 2017 14:59:20 +0000 Subject: [PATCH] Add another example about GitHub projects with no versions. Sponsored by: Absolight --- .../porters-handbook/makefiles/chapter.xml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) 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 ${WRKDIR}/foo-1.0.2. + + Using <varname>USE_GITHUB</varname> When Upstream Does + Not Use Versions + + If there never was a version upstream, do not invent one + like 0.1 or 1.0. + Create the port with a DISTVERSION of + gYYYYMMDD, + where g is for + Git, and + YYYYMMDD + represents the date the commit referenced in + GH_TAGNAME. + + PORTNAME= bar +DISTVERSION= g20140411 + +USE_GITHUB= yes +GH_TAGNAME= c472d66b + + This creates a versioning scheme that increases over + time, and that is still before version 0 + (see for + details on &man.pkg-version.8;): + + &prompt.user; pkg version -t g20140411 0 +< + + Which means using PORTEPOCH will not + be needed in case upstream decides to cut versions in the + future. + + Fetching Multiple Files from GitHub