pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/go lang/go: add examples to the go-package.mk doc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/04327f074149
branches:  trunk
changeset: 374677:04327f074149
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Jan 27 15:49:30 2018 +0000

description:
lang/go: add examples to the go-package.mk documentation

diffstat:

 lang/go/go-package.mk |  54 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 34 insertions(+), 20 deletions(-)

diffs (70 lines):

diff -r 26f113c22ca2 -r 04327f074149 lang/go/go-package.mk
--- a/lang/go/go-package.mk     Sat Jan 27 12:38:31 2018 +0000
+++ b/lang/go/go-package.mk     Sat Jan 27 15:49:30 2018 +0000
@@ -1,6 +1,39 @@
-# $NetBSD: go-package.mk,v 1.10 2017/03/20 22:33:21 bsiegert Exp $
+# $NetBSD: go-package.mk,v 1.11 2018/01/27 15:49:30 rillig Exp $
 #
 # This file implements common logic for compiling Go programs in pkgsrc.
+#
+# === Package-settable variables ===
+#
+# GO_SRCPATH (required)
+#      The patch that can be used with "go get" to import the current
+#      package. This is usually the URL without the leading protocol.
+#
+#      Examples:
+#              github.com/username/repository
+#              gopkg.in/check.v1
+#
+# GO_DIST_BASE (optional)
+#      Path this package extracts to.
+#
+#      Default:
+#              The last path component of ${GO_SRCPATH}
+#      Examples:
+#              ${GITHUB_PROJECT}-${GITHUB_TAG}*
+#              ${GITHUB_PROJECT}-${GITHUB_TAG:S/v//}
+#              ${DISTNAME}
+#
+# GO_BUILD_PATTERN (optional)
+#      Argument used for 'go install'.
+#      In most cases, the default is fine.
+#
+#      Default:
+#              "${GO_SRCPATH}/...", which means all files below GO_SRCPATH.
+#
+# Keywords: go golang
+#
+
+# Implementation notes
+#
 # The compiled Go code is tied to a specific compiler version, and the
 # compilation is fast. So the plan is:
 #
@@ -15,25 +48,6 @@
 # All packages build-depend on the "master" Go release. Go packages
 # need to be revbumped when lang/go is updated.
 #
-# Packages using this should set GO_SRCPATH to the path that could
-# be used with "go get" (usually the URL without the leading protocol).
-#
-# === Package-settable variables ===
-#
-# GO_SRCPATH
-#      Path used for go 'import' lines in source code.
-#
-# GO_DIST_BASE
-#      Path this package extracts to; only set it if it's not the same
-#      as GO_SRCPATH.
-#
-# GO_BUILD_PATTERN
-#      Argument used for 'go install'
-#      Defaults to "${GO_SRCPATH}/..." which means all files
-#      below GO_SRCPATH.
-#
-# Keywords: go
-#
 
 .include "../../lang/go/version.mk"
 



Home | Main Index | Thread Index | Old Index