docs/manual/adding-packages-golang.txt: update following go.mod integration

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas Petazzoni 2020-08-29 14:43:11 +02:00
parent 92584815ba
commit a289fc8b69

View File

@ -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
+<package-srcdir>/<FOO_WORKSPACE>+. 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.