From ce3bf580ba97dd0cccb7482093133bc65df3e1cf Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Feb 18 2022 08:16:36 +0000 Subject: Fix go build with package-notes(RHBZ#2047029) --- diff --git a/startdde.spec b/startdde.spec index 18654db..e702c23 100644 --- a/startdde.spec +++ b/startdde.spec @@ -67,18 +67,15 @@ find * -type f -not -path "rpm/*" -print0 | xargs -0 sed -i 's:/lib/deepin-daemo sed -i '/polkit/s|lib|libexec|' watchdog/dde_polkit_agent.go %build -%if 0%{?openeuler} -export GOPATH=/usr/share/gocode -%make_build GO_BUILD_FLAGS=-trimpath -%else -export GOPATH="%{gopath}" -%make_build GO_BUILD_FLAGS="%{gobuildflags}" +make prepare +touch prepare +export GOPATH="$PWD/gopath:%{gopath}" +%gobuild -o startdde # rebuild other executables with different build-ids for cmd in fix-xauthority-perm greeter-display-daemon; do - rm $cmd - %make_build $cmd GO_BUILD_FLAGS="%{gobuildflags}" + %gobuild -o $cmd pkg.deepin.io/dde/startdde/cmd/$cmd done -%endif +%make_build %install %make_install