2017-05-17 21:59:02 +00:00
|
|
|
#
|
|
|
|
# spec file for package golang-github-prometheus-promu
|
|
|
|
#
|
2024-01-15 09:21:47 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-05-17 21:59:02 +00: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 18:24:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-17 21:59:02 +00:00
|
|
|
#
|
|
|
|
|
2022-05-06 08:16:39 +00:00
|
|
|
|
2024-02-15 11:01:48 +00:00
|
|
|
%define shortname promu
|
|
|
|
|
2017-05-17 21:59:02 +00:00
|
|
|
Name: golang-github-prometheus-promu
|
2023-07-11 13:27:27 +00:00
|
|
|
Version: 0.15.0
|
2017-05-17 21:59:02 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Prometheus Utility Tool
|
2019-02-08 18:24:14 +00:00
|
|
|
License: Apache-2.0
|
2017-05-17 21:59:02 +00:00
|
|
|
Group: System/Management
|
2020-03-04 17:25:30 +00:00
|
|
|
URL: https://github.com/prometheus/promu
|
2024-02-15 11:01:48 +00:00
|
|
|
Source: %{shortname}-%{version}.tar.gz
|
2020-03-04 17:25:30 +00:00
|
|
|
Source1: vendor.tar.gz
|
2023-08-17 15:14:57 +00:00
|
|
|
# PATCH-FIX-UPSTREAM Fix setting reproducible user and host during the build
|
|
|
|
# https://github.com/prometheus/promu/pull/267
|
|
|
|
Patch1: 0001-do_not_discover_user_host_for_reproducible_builds.patch
|
2024-01-15 09:21:47 +00:00
|
|
|
# PATCH-FIX-OPENSUSE Do not pass -static to external linker by default
|
|
|
|
Patch2: extldflags-no-static.patch
|
2022-10-06 08:18:27 +00:00
|
|
|
ExcludeArch: s390
|
2022-04-12 13:14:32 +00:00
|
|
|
%if 0%{?rhel}
|
2022-10-06 08:18:27 +00:00
|
|
|
# Fix ERROR: No build ID note found in
|
|
|
|
%undefine _missing_build_ids_terminate_build
|
2024-02-15 11:01:48 +00:00
|
|
|
BuildRequires: golang >= 1.19
|
2022-04-12 13:14:32 +00:00
|
|
|
%else
|
2023-08-17 15:14:57 +00:00
|
|
|
BuildRequires: golang(API) >= 1.19
|
2022-04-12 13:14:32 +00:00
|
|
|
%endif
|
2017-05-17 21:59:02 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The Prometheus Utility Tool is used by the Prometheus project to build other components.
|
|
|
|
|
|
|
|
%prep
|
2024-02-15 11:01:48 +00:00
|
|
|
%autosetup -a1 -p1 -n %{shortname}-%{version}
|
2017-05-17 21:59:02 +00:00
|
|
|
|
|
|
|
%build
|
2024-02-15 11:01:48 +00:00
|
|
|
%ifnarch ppc64
|
|
|
|
export GOFLAGS="-buildmode=pie"
|
|
|
|
%endif
|
|
|
|
go build
|
|
|
|
|
|
|
|
%check
|
|
|
|
# execute the binary as a basic check
|
|
|
|
./%{shortname} --help
|
2017-05-17 21:59:02 +00:00
|
|
|
|
|
|
|
%install
|
2024-02-15 11:01:48 +00:00
|
|
|
install -D -m 0755 %{shortname} "%{buildroot}/%{_bindir}/%{shortname}"
|
2017-05-17 21:59:02 +00:00
|
|
|
|
2022-11-11 09:44:09 +00:00
|
|
|
%files
|
2019-02-08 18:24:14 +00:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2024-02-15 11:01:48 +00:00
|
|
|
%{_bindir}/%{shortname}
|
2017-05-17 21:59:02 +00:00
|
|
|
|
|
|
|
%changelog
|