fix GOPATH in build macros
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=134
This commit is contained in:
parent
5331186feb
commit
9187e05af9
@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
%go_ver %(LC_ALL=C rpm -q --qf '%%{epoch}:%%{version}\\n' go | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
|
||||
%go_arch GOARCH
|
||||
%go_arch amd64
|
||||
%go_build_ver %(go version | sed 's/^go version //' | tr -d ' ')
|
||||
|
||||
%go_dir %{_libdir}/go
|
||||
@ -95,7 +95,7 @@ install -d %{buildroot}%{_bindir} \
|
||||
# See: go help install, go help packages
|
||||
%gobuild() \
|
||||
export BUILDFLAGS="-s -v -p 4" \
|
||||
export GOPATH=%{_builddir}/go:%{go_contribdir} \
|
||||
export GOPATH=%{_builddir}/go:%{_libdir}/go/contrib \
|
||||
export GOBIN=%{_builddir}/go/bin \
|
||||
MOD="" \
|
||||
if [ %# -gt 0 ]; then \
|
||||
@ -139,7 +139,7 @@ fi \
|
||||
%{nil}
|
||||
|
||||
%gotest() \
|
||||
export GOPATH=%{_builddir}/go \
|
||||
export GOPATH=%{_builddir}/go:%{_libdir}/go/contrib \
|
||||
if [ %# -eq 0 ]; then \
|
||||
echo "gotest: please specify a valid importpath, see: go help test" \
|
||||
exit 1 \
|
||||
|
Loading…
Reference in New Issue
Block a user