fix sw_64 mips64el build error

(cherry picked from commit e9c61402b86bed902d459f4b1048525316543c4e)
This commit is contained in:
Hailiang 2025-05-13 12:52:54 +08:00 committed by openeuler-sync-bot
parent ed988b2c6d
commit 9da7e0850c
2 changed files with 13931 additions and 2 deletions

13916
add-sw-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,16 @@
Name: gendesk
Version: 1.0.9
Release: 2
Release: 3
Summary: Utility for generating desktop files
Group: Development/Tools
License: MIT
URL: http://gendesk.roboticoverlords.org/
Source0: http://roboticoverlords.org/%{name}/%{name}-%{version}.tar.xz
Source1: http://roboticoverlords.org/images/default.png
Patch1: add-sw-support.patch
#-------------------------------------
BuildRequires: golang
BuildRequires: git
@ -18,7 +21,7 @@ BuildRequires: git
Utility for generating desktop files
%prep
%autosetup -n %{name}-%{version}
%setup -n %{name}-%{version}
%ifarch loongarch64
sed 's/go 1.10/go 1.21/g' -i go.mod
export GOSUMDB="sum.golang.org"
@ -28,12 +31,19 @@ go mod tidy
go mod download
go mod vendor
%endif
%ifarch sw_64
%patch1 -p1
%endif
#GOPATH=`pwd` go get -d -v
%build
#GOPATH=`pwd` go build
#GOPATH=`pwd`
%ifarch sw_64 mips64el
go build -mod=vendor -gccgoflags="-s -w $LDFLAGS"
%else
go build -mod=vendor -buildmode=pie -gccgoflags="-s -w $LDFLAGS"
%endif
%install
@ -50,6 +60,9 @@ go build -mod=vendor -buildmode=pie -gccgoflags="-s -w $LDFLAGS"
%changelog
* Tue May 13 2025 mahailiang <mahailiang@uniontech.com> - 1.0.9-3
- fix sw_64 mips64el build error
* Mon Apr 22 2024 Pengda Dou <doupengda@loongson.cn> - 1.0.9-2
- add support for loongarch64