golang-github-prometheus-promu/golang-github-prometheus-promu.spec
Witek Bedyk e5ff7d8fe0 Accepting request 1057808 from home:ojkastl_buildservice:Prometheus_Grafana_SLES15
- Update to version 0.14.0:
  * Add the ability to override tags per GOOS
  * Remove ioutil
  * Update common Prometheus files (#232) (#224)
  * Validate environment variable value
  * Set build date from SOURCE_DATE_EPOCH
- drop patch 0001-Set-build-date-from-SOURCE_DATE_EPOCH.patch that is
  included upstream now

OBS-URL: https://build.opensuse.org/request/show/1057808
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-promu?expand=0&rev=26
2023-01-11 15:53:40 +00:00

64 lines
1.7 KiB
RPMSpec

#
# spec file for package golang-github-prometheus-promu
#
# Copyright (c) 2023 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: golang-github-prometheus-promu
Version: 0.14.0
Release: 0
Summary: Prometheus Utility Tool
License: Apache-2.0
Group: System/Management
URL: https://github.com/prometheus/promu
Source: promu-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang-packaging
ExcludeArch: s390
%{go_provides}
%if 0%{?rhel}
# Fix ERROR: No build ID note found in
%undefine _missing_build_ids_terminate_build
BuildRequires: golang >= 1.17
%else
BuildRequires: golang(API) = 1.18
%endif
%description
The Prometheus Utility Tool is used by the Prometheus project to build other components.
%prep
%autosetup -a1 -p1 -n promu-%{version}
%build
%{goprep} github.com/prometheus/promu
export VERSION=%{version}
export CGO_ENABLED=0
go build \
-mod=vendor \
-buildmode=pie \
-ldflags "-s -w -X main.version=$VERSION" \
-o promu ;
%install
install -D -m 0755 promu "%{buildroot}/%{_bindir}/promu"
%files
%doc README.md
%license LICENSE
%{_bindir}/promu
%changelog