Blob Blame History Raw
# Generated by go2rpm 1.10.0
%bcond_without check
%global debug_package %{nil}

# https://github.com/prometheus/client_golang
%global goipath         github.com/prometheus/client_golang
Version:                1.19.0

%gometa -f


%global common_description %{expand:
This is the Go client library for Prometheus. It has two separate parts, one for
instrumenting application code, and one for creating clients that talk to the
Prometheus HTTP API.}

%global golicenses      LICENSE NOTICE
%global godocs          examples CODE_OF_CONDUCT.md CONTRIBUTING.md\\\
                        MAINTAINERS.md SECURITY.md CHANGELOG.md README.md\\\
                        README-prometheus.md

Name:           %{goname}
Release:        %autorelease
Summary:        Prometheus instrumentation library for Go applications

License:        Apache-2.0
URL:            %{gourl}
Source:         %{gosource}
# https://github.com/prometheus/client_golang/pull/1445
#Patch:          1445.patch

%description %{common_description}

%gopkg

%prep
%goprep
%autopatch -p1

# Avoid extra deps
rm -rf .bingo examples tutorial

%generate_buildrequires
%go_generate_buildrequires

%install
%gopkginstall
mv prometheus/README.md README-prometheus.md

%if %{with check}
%check
# Fails on some arch with Go 1.16
for test in "TestSummaryDecay" "TestMemStatsEquivalence" "TestBuckets" "TestNativeHistogram" \
; do
awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test)
done
%ifarch %{ix86} %{arm}
%gocheck -d api/prometheus/v1
%else
%gocheck
%endif
%endif

%gopkgfiles

%changelog
%autochangelog