File golang-github-prometheus-promu.spec of Package golang-github-prometheus-promu

# spec file for package golang-github-prometheus-promu
# Copyright (c) 2022 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


Name:           golang-github-prometheus-promu
Version:        0.13.0
Release:        0
Summary:        Prometheus Utility Tool
License:        Apache-2.0
Group:          System/Management
Source:         promu-%{version}.tar.gz
Source1:        vendor.tar.gz
BuildRequires:  golang-packaging
BuildRequires:  golang(API) = 1.15
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The Prometheus Utility Tool is used by the Prometheus project to build other components.

%setup -q -n promu-%{version}
%setup -q -T -D -a 1 -n promu-%{version}

export VERSION=%{version}
export CGO_ENABLED=0
go build \
   -mod=vendor \
   -buildmode=pie \
   -ldflags "-s -w -X main.version=$VERSION" \
   -o promu ;

install -D -m 0755 promu "%{buildroot}/%{_bindir}/promu"


%files -f file.lst
%license LICENSE

openSUSE Build Service is sponsored by