Add sw_64 support
Signed-off-by: 张少宁 <zhangshaoning@uniontech.com>
This commit is contained in:
parent
16accae4b6
commit
b6a61cc0ef
@ -3,7 +3,7 @@
|
||||
Name: prometheus-ha_cluster_exporter
|
||||
# Version will be processed via set_version source service
|
||||
Version: 1.3.3
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Prometheus exporter for Pacemaker HA clusters metrics
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ClusterLabs/ha_cluster_exporter
|
||||
@ -19,7 +19,7 @@ BuildRequires: systemd
|
||||
|
||||
Provides: ha_cluster_exporter = %{version}-%{release}
|
||||
Provides: prometheus(ha_cluster_exporter) = %{version}-%{release}
|
||||
ExclusiveArch: aarch64 x86_64 loongarch64 riscv64
|
||||
ExclusiveArch: aarch64 x86_64 loongarch64 riscv64 sw_64
|
||||
|
||||
%description
|
||||
Prometheus exporter for Pacemaker HA clusters metrics
|
||||
@ -29,11 +29,17 @@ Prometheus exporter for Pacemaker HA clusters metrics
|
||||
tar -xzvf %{SOURCE1}
|
||||
|
||||
%define shortname ha_cluster_exporter
|
||||
%ifarch sw_64
|
||||
# Replace sys provided by golang
|
||||
cp -af %{_prefix}/lib/golang/src/cmd/vendor/golang.org/x/sys vendor/golang.org/x/
|
||||
%endif
|
||||
|
||||
%build
|
||||
export CGO_ENABLED=0
|
||||
go build -mod=vendor \
|
||||
%ifnarch sw_64
|
||||
-buildmode=pie \
|
||||
%endif
|
||||
-ldflags="-s -w -X github.com/prometheus/common/version.Version=%{version}" \
|
||||
-o %{shortname}
|
||||
|
||||
@ -60,6 +66,9 @@ install -D -m 644 %{shortname}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig.%{
|
||||
%{_sysconfdir}/sysconfig.%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Feb 27 2025 zhangshaoning <zhangshaoning@uniontech.com> - 1.3.3-4
|
||||
- Add sw_64 support
|
||||
|
||||
* Mon Apr 22 2024 laokz <zhangkai@iscas.ac.cn> - -1.3.3-3
|
||||
- add riscv64 to ExclusiveArch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user