67b4fbb macros: define a %gobuildflags macro

Authored and Committed by berrange 4 years ago
    macros: define a %gobuildflags macro
    
    Using the %gobuild macro is fine for a project where the go
    code is the only thing being built, and can be built directly
    by invoking the Go toolchain from RPM.
    
    In more complex cases though, the Go code is just a small part
    of the project and the Go toolchain is invoked by a build
    system such as make (possibly automake), or meson. In such a
    case we need to be able to tell this build system what flags
    to pass to the compiler.
    
    The %gobuildflags macros services this purpose allowing a
    RPM spec todo
    
      GOBUILDFLAGS="%gobuildflags" %configure
    
    or
    
      %make GOBUILDFLAGS="%gobuildflags"
    
    Ideally the %gobuild macro would in turn reference the
    %gobuildflags macro, but that does not appear possible
    given the semantics around quote expansion and escaping
    across RPM and shell.
    
    Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>