Blob Blame History Raw
%global debug_package   %{nil}
%global provider        github
%global provider_tld    com
%global project         prometheus
%global repo            procfs
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
%global commit          490cc6eb5fa45bf8a8b7b73c8bc82a8160e8531d
%global shortcommit     %(c=%{commit}; echo ${c:0:7})

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.3.git%{shortcommit}%{?dist}
Summary:        Functions to retrieve system, kernel and process metrics from the /proc fs
License:        ASL 2.0
URL:            https://%{import_path}
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
BuildArch:      noarch
%else
ExclusiveArch:  %{ix86} x86_64 %{arm}
%endif

%description
%{summary}

%package devel
BuildRequires:  golang >= 1.2.1-3
Requires:       golang >= 1.2.1-3
Summary:        %{summary}
Provides:       golang(%{import_path}) = %{version}-%{release}

%description devel
%{summary}

This package contains library source intended for 
building other packages which use %{project}/%{repo}.

%prep
%setup -q -n %{repo}-%{commit}

%build

%install
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav fixtures %{buildroot}/%{gopath}/src/%{import_path}/

%check
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}

%files devel
%doc AUTHORS.md CONTRIBUTING.md README.md LICENSE
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
%{gopath}/src/%{import_path}

%changelog
* Thu Apr 23 2015 jchaloup <jchaloup@redhat.com> - 0-0.3.git490cc6e
- Bump to upstream 490cc6eb5fa45bf8a8b7b73c8bc82a8160e8531d
  resolves: #1214778

* Wed Mar 04 2015 jchaloup <jchaloup@redhat.com> - 0-0.2.git6c34ef8
- Bump to upstream 6c34ef819e19b4e16f410100ace4aa006f0e3bf8
  related: #1190413

* Sat Feb 07 2015 jchaloup <jchaloup@redhat.com> - 0-0.1.git92faa30
- First package for Fedora
  resolves: #1190413