2017-05-17 21:59:02 +00:00
|
|
|
#
|
|
|
|
# spec file for package golang-github-prometheus-promu
|
|
|
|
#
|
2023-01-11 15:53:40 +00:00
|
|
|
# Copyright (c) 2023 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
|
|
|
|
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
|
|
|
|
Source: promu-%{version}.tar.gz
|
|
|
|
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
|
2017-05-17 21:59:02 +00:00
|
|
|
BuildRequires: golang-packaging
|
2022-10-06 08:18:27 +00:00
|
|
|
ExcludeArch: s390
|
|
|
|
%{go_provides}
|
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
|
2023-08-17 15:14:57 +00:00
|
|
|
BuildRequires: golang >= 1.18
|
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
|
2022-05-06 08:16:39 +00:00
|
|
|
%autosetup -a1 -p1 -n promu-%{version}
|
2017-05-17 21:59:02 +00:00
|
|
|
|
|
|
|
%build
|
2022-10-06 08:18:27 +00:00
|
|
|
%{goprep} github.com/prometheus/promu
|
2020-03-04 17:25:30 +00:00
|
|
|
export VERSION=%{version}
|
|
|
|
export CGO_ENABLED=0
|
|
|
|
go build \
|
|
|
|
-mod=vendor \
|
|
|
|
-buildmode=pie \
|
|
|
|
-ldflags "-s -w -X main.version=$VERSION" \
|
|
|
|
-o promu ;
|
2017-05-17 21:59:02 +00:00
|
|
|
|
|
|
|
%install
|
2020-03-04 17:25:30 +00:00
|
|
|
install -D -m 0755 promu "%{buildroot}/%{_bindir}/promu"
|
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
|
2017-05-17 21:59:02 +00:00
|
|
|
%{_bindir}/promu
|
|
|
|
|
|
|
|
%changelog
|