Add sw_64 and mips64el support
This commit is contained in:
parent
41a22d1e9e
commit
53b4864157
12
0001-restic-uos-add-sw_64-and-mips64el.patch
Normal file
12
0001-restic-uos-add-sw_64-and-mips64el.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -Naur a/build.go b/build.go
|
||||||
|
--- a/build.go 2023-10-30 02:50:07.000000000 +0800
|
||||||
|
+++ b/build.go 2024-12-10 19:36:17.460157795 +0800
|
||||||
|
@@ -127,7 +127,7 @@
|
||||||
|
a := []string{"build", "-trimpath"}
|
||||||
|
|
||||||
|
if enablePIE {
|
||||||
|
- a = append(a, "-buildmode=pie")
|
||||||
|
+ a = append(a, "-buildmode=exe")
|
||||||
|
}
|
||||||
|
|
||||||
|
a = append(a, args...)
|
||||||
16
restic.spec
16
restic.spec
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: restic
|
Name: restic
|
||||||
Version: 0.16.2
|
Version: 0.16.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Backup program with deduplication and encryption
|
Summary: Backup program with deduplication and encryption
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Productivity/Archiving/Backup
|
Group: Productivity/Archiving/Backup
|
||||||
@ -16,6 +16,8 @@ BuildRequires: bash-completion
|
|||||||
BuildRequires: zsh
|
BuildRequires: zsh
|
||||||
BuildRequires: golang >= 1.18
|
BuildRequires: golang >= 1.18
|
||||||
|
|
||||||
|
Patch0001: 0001-restic-uos-add-sw_64-and-mips64el.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
restic is a backup program. It supports verification, encryption,
|
restic is a backup program. It supports verification, encryption,
|
||||||
snapshots and deduplication.
|
snapshots and deduplication.
|
||||||
@ -42,6 +44,9 @@ Zsh command line completion support for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a 3
|
%setup -q -a 3
|
||||||
|
%ifarch sw_64 mips64el
|
||||||
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Set up GOPATH.
|
# Set up GOPATH.
|
||||||
@ -52,9 +57,15 @@ cp -rT $PWD $HOME/go/src/%{import_path}
|
|||||||
# Build restic. We don't use build.go because it builds statically, uses go
|
# Build restic. We don't use build.go because it builds statically, uses go
|
||||||
# modules, and also restricts the Go version in cases where it's not actually
|
# modules, and also restricts the Go version in cases where it's not actually
|
||||||
# necessary. We disable go modules because restic still provides a vendor/.
|
# necessary. We disable go modules because restic still provides a vendor/.
|
||||||
|
%ifarch sw_64 mips64el
|
||||||
|
GO111MODULE=off go build -o %{name} -buildmode=exe \
|
||||||
|
-ldflags "-s -w -X main.version=%{version}" \
|
||||||
|
%{import_path}/cmd/restic
|
||||||
|
%else
|
||||||
GO111MODULE=off go build -o %{name} -buildmode=pie \
|
GO111MODULE=off go build -o %{name} -buildmode=pie \
|
||||||
-ldflags "-s -w -X main.version=%{version}" \
|
-ldflags "-s -w -X main.version=%{version}" \
|
||||||
%{import_path}/cmd/restic
|
%{import_path}/cmd/restic
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
|
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||||
@ -78,6 +89,9 @@ install -Dm0644 doc/zsh-completion.zsh %{buildroot}%{_sysconfdir}/zsh_completion
|
|||||||
%config %{_sysconfdir}/zsh_completion.d/%{name}
|
%config %{_sysconfdir}/zsh_completion.d/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 28 2025 zhangshaoning <zhangshaoning@uniontech.com> - 0.16.2-2
|
||||||
|
- Add sw_64 and mips64el support
|
||||||
|
|
||||||
* Wed Jan 03 2024 Paul Thomas <paulthomas100199@gmail.com> 0.16.2-1
|
* Wed Jan 03 2024 Paul Thomas <paulthomas100199@gmail.com> 0.16.2-1
|
||||||
- update to version 0.16.2
|
- update to version 0.16.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user