2017-05-17 23:59:02 +02:00
|
|
|
#
|
|
|
|
# spec file for package golang-github-prometheus-promu
|
|
|
|
#
|
2023-01-11 16:53:40 +01:00
|
|
|
# Copyright (c) 2023 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
|
|
|
|
2017-05-17 23:59:02 +02:00
|
|
|
Name: golang-github-prometheus-promu
|
2023-07-11 15:27:27 +02:00
|
|
|
Version: 0.15.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
|
|
|
|
Source: promu-%{version}.tar.gz
|
|
|
|
Source1: vendor.tar.gz
|
2023-08-17 17:14:57 +02: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 23:59:02 +02:00
|
|
|
BuildRequires: golang-packaging
|
2022-10-06 10:18:27 +02:00
|
|
|
ExcludeArch: s390
|
|
|
|
%{go_provides}
|
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
|
2023-08-17 17:14:57 +02:00
|
|
|
BuildRequires: golang >= 1.18
|
2022-04-12 15:14:32 +02:00
|
|
|
%else
|
2023-08-17 17:14:57 +02:00
|
|
|
BuildRequires: golang(API) >= 1.19
|
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
|
2022-05-06 10:16:39 +02:00
|
|
|
%autosetup -a1 -p1 -n promu-%{version}
|
2017-05-17 23:59:02 +02:00
|
|
|
|
|
|
|
%build
|
2022-10-06 10:18:27 +02:00
|
|
|
%{goprep} github.com/prometheus/promu
|
2020-03-04 18:25:30 +01: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 23:59:02 +02:00
|
|
|
|
|
|
|
%install
|
2020-03-04 18:25:30 +01:00
|
|
|
install -D -m 0755 promu "%{buildroot}/%{_bindir}/promu"
|
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
|
2017-05-17 23:59:02 +02:00
|
|
|
%{_bindir}/promu
|
|
|
|
|
|
|
|
%changelog
|