Open alexandrevicenzi opened 3 years ago
If you pass any arguments to %gobuild
, the last one is interpreted as "importpath modifier".
There were some nice examples included in macros.go
but they were "refactored out".
Check last version here: https://github.com/openSUSE/golang-packaging/blob/3229c62bb83d710c0994661f6c98099924fcc39a/macros.go#L61
I noticed something that does not seem right.
%gobuild
seems to get lost and expands to something that is broken.The following code:
Expands to:
Note that for some reason
-ldflags
is wrong, the project name was injected into the middle of the variable. Since-ldflags
is now invalid, the build will fail.The following code:
Expands to:
Note that this works, it injects the project name after
-ldflags
values.