From: Thomas Petazzoni Date: Sat, 29 Aug 2020 12:43:11 +0000 (+0200) Subject: docs/manual/adding-packages-golang.txt: update following go.mod integration X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a289fc8b69b71a4ab0585e23e2004c01db821e2e;p=buildroot.git docs/manual/adding-packages-golang.txt: update following go.mod integration Signed-off-by: Thomas Petazzoni --- diff --git a/docs/manual/adding-packages-golang.txt b/docs/manual/adding-packages-golang.txt index 8c467689be..3b34579200 100644 --- a/docs/manual/adding-packages-golang.txt +++ b/docs/manual/adding-packages-golang.txt @@ -76,15 +76,13 @@ optionally be defined, depending on the package's needs. Many of them are only useful in very specific cases, typical packages will therefore only use a few of them, or none. -* If your package need a custom +GOPATH+ to be compiled in, you can - use the +FOO_WORKSPACE+ variable. The +GOPATH+ being used will be - +/+. If +FOO_WORKSPACE+ is not - specified, it defaults to +_gopath+. - -* +FOO_SRC_SUBDIR+ is the sub-directory where your source will be - compiled relatively to the +GOPATH+. An example value is - +github.com/bar/foo+. If +FOO_SRC_SUBDIR+ is not specified, it - defaults to a value infered from the +FOO_SITE+ variable. +* The package must specify its Go module name in the +FOO_GOMOD+ + variable. If not specified, it defaults to + +URL-domain/1st-part-of-URL/2nd-part-of-URL+, e.g +FOO_GOMOD+ will + take the value +github.com/bar/foo+ for a package that specifies + +FOO_SITE = $(call github,bar,foo,$(FOO_VERSION))+. The Go package + infrastructure will automatically generate a minimal +go.mod+ file + in the package source tree if it doesn't exist. * +FOO_LDFLAGS+ and +FOO_TAGS+ can be used to pass respectively the +LDFLAGS+ or the +TAGS+ to the +go+ build command.