#24 Fix LDFLAGS macros typos
Merged 4 years ago by ngompa. Opened 4 years ago by eclipseo.
eclipseo/go-rpm-macros fix_ldflags  into  master

@@ -26,9 +26,9 @@ 

  # Define commands for building

  %gobuild(o:) %{expand:

  %{?gobuilddir:GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} \\

- go build -compiler gccgo -gccgoflags     "$RPM_OPT_FLAGS ${LDFLAGS:-}%{?currentgoldflags} %__global_ldflags %{?__golang_extldflags}" -a -v -x %{?**};

+ go build -compiler gccgo -gccgoflags     "$RPM_OPT_FLAGS ${LDFLAGS:-%{?currentgoldflags} %__global_ldflags} %{?__golang_extldflags}" -a -v -x %{?**};

  }

  

  # Define commands for testing

- %gotestflags -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS ${LDFLAGS:-}%{?currentgoldflags} %__global_ldflags %{?__golang_extldflags}"

+ %gotestflags -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS ${LDFLAGS:-%{?currentgoldflags} %__global_ldflags} %{?__golang_extldflags}"

  %gotest() go test %{gotestflags} %{?**};

file modified
+1 -1
@@ -350,7 +350,7 @@ 

          zsuffix = "-z " .. suffix .. " "

    end

    print(rpm.expand('%goenv ' .. zsuffix        .. myenvflags   .. '\\n'               ..

-                    '%{?currentgoldflags:LDFLAGS="${LDFLAGS}%{?currentgoldflags}" }'   ..

+                    '%{?currentgoldflags:LDFLAGS="${LDFLAGS} %{?currentgoldflags}" }'   ..

                     '%{?gotestflags:GO_TEST_FLAGS="%{gotestflags}" }'                  ..

                     '%{?gotestextldflags:GO_TEST_EXT_LD_FLAGS="%{gotestextldflags}" }' ..

                     'go-rpm-integration check ' .. mycheckflags .. '\\n'))

Signed-off-by: Robert-André Mauchin zebob.m@gmail.com

Fix #19

Pull-Request has been merged by ngompa

4 years ago