2017-05-17 23:59:02 +02:00
|
|
|
#
|
|
|
|
# spec file for package golang-github-prometheus-promu
|
|
|
|
#
|
2024-01-15 10:21:47 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-05-17 23:59:02 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-02-08 19:24:14 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-17 23:59:02 +02:00
|
|
|
#
|
|
|
|
|
2022-05-06 10:16:39 +02:00
|
|
|
|
2024-02-15 12:01:48 +01:00
|
|
|
%define shortname promu
|
|
|
|
|
2017-05-17 23:59:02 +02:00
|
|
|
Name: golang-github-prometheus-promu
|
2024-05-10 16:37:01 +02:00
|
|
|
Version: 0.17.0
|
2017-05-17 23:59:02 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Prometheus Utility Tool
|
2019-02-08 19:24:14 +01:00
|
|
|
License: Apache-2.0
|
2017-05-17 23:59:02 +02:00
|
|
|
Group: System/Management
|
2020-03-04 18:25:30 +01:00
|
|
|
URL: https://github.com/prometheus/promu
|
2024-02-15 12:01:48 +01:00
|
|
|
Source: %{shortname}-%{version}.tar.gz
|
2020-03-04 18:25:30 +01:00
|
|
|
Source1: vendor.tar.gz
|
2024-01-15 10:21:47 +01:00
|
|
|
# PATCH-FIX-OPENSUSE Do not pass -static to external linker by default
|
|
|
|
Patch2: extldflags-no-static.patch
|
2022-10-06 10:18:27 +02:00
|
|
|
ExcludeArch: s390
|
2022-04-12 15:14:32 +02:00
|
|
|
%if 0%{?rhel}
|
2022-10-06 10:18:27 +02:00
|
|
|
# Fix ERROR: No build ID note found in
|
|
|
|
%undefine _missing_build_ids_terminate_build
|
2024-05-10 16:37:01 +02:00
|
|
|
BuildRequires: golang >= 1.21
|
2022-04-12 15:14:32 +02:00
|
|
|
%else
|
2024-05-10 16:37:01 +02:00
|
|
|
BuildRequires: golang(API) >= 1.21
|
2022-04-12 15:14:32 +02:00
|
|
|
%endif
|
2017-05-17 23:59:02 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The Prometheus Utility Tool is used by the Prometheus project to build other components.
|
|
|
|
|
|
|
|
%prep
|
2024-02-15 12:01:48 +01:00
|
|
|
%autosetup -a1 -p1 -n %{shortname}-%{version}
|
2017-05-17 23:59:02 +02:00
|
|
|
|
|
|
|
%build
|
2024-02-15 12:01:48 +01:00
|
|
|
%ifnarch ppc64
|
|
|
|
export GOFLAGS="-buildmode=pie"
|
|
|
|
%endif
|
|
|
|
go build
|
|
|
|
|
|
|
|
%check
|
|
|
|
# execute the binary as a basic check
|
|
|
|
./%{shortname} --help
|
2017-05-17 23:59:02 +02:00
|
|
|
|
|
|
|
%install
|
2024-02-15 12:01:48 +01:00
|
|
|
install -D -m 0755 %{shortname} "%{buildroot}/%{_bindir}/%{shortname}"
|
2017-05-17 23:59:02 +02:00
|
|
|
|
2022-11-11 10:44:09 +01:00
|
|
|
%files
|
2019-02-08 19:24:14 +01:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2024-02-15 12:01:48 +01:00
|
|
|
%{_bindir}/%{shortname}
|
2017-05-17 23:59:02 +02:00
|
|
|
|
|
|
|
%changelog
|