fix sw_64 mips64el build error

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