Blob Blame History Raw
# Generated by go2rpm 1.5.0
# https://github.com/prometheus/procfs/issues/432
%ifnarch %{ix86} %{arm32}
%bcond_without check
%endif

# https://github.com/prometheus/procfs
%global goipath         github.com/prometheus/procfs
Version:                0.7.3
# Meeded by golang-github-prometheus-node-exporter
%global commit          fbe360a68cc652b7d44167e8ec79e2ee70261569

%gometa

%global common_description %{expand:
Procfs provides functions to retrieve system, kernel and process metrics from
the pseudo-filesystem proc.}

%global golicenses      LICENSE NOTICE
%global godocs          CODE_OF_CONDUCT.md CONTRIBUTING.md MAINTAINERS.md\\\
                        README.md SECURITY.md

%global gosupfiles glide.lock glide.yaml

Name:           %{goname}
Release:        %autorelease
Summary:        Retrieve system, kernel and process metrics from proc

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}
Source1:        glide.yaml
Source2:        glide.lock
# https://github.com/prometheus/procfs/issues/430
Patch0:         0001-Convert-w-verb-in-t.Errorf-function-to-v.patch

BuildRequires:  golang(golang.org/x/sync/errgroup)
BuildRequires:  golang(golang.org/x/sys/unix)

%if %{with check}
# Tests
BuildRequires:  golang(github.com/google/go-cmp/cmp)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep
%patch0 -p1
cp %{S:1} %{S:2} .

%install
%gopkginstall

%if %{with check}
%check
# Tests require that fixtures are extracted
./ttar -x -f fixtures.ttar
%gocheck
%endif

%gopkgfiles

%changelog
%autochangelog