4732751
%global debug_package   %{nil}
4732751
%global provider        github
4732751
%global provider_tld    com
4732751
%global project         prometheus
4732751
%global repo            client_golang
4732751
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
2ba8c98
%global commit          b0bd7e1be33327b85cb4853e7011156e3cedd657
4732751
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
4732751
4732751
Name:           golang-%{provider}-%{project}-%{repo}
2ba8c98
Version:        0.5.0
f500b46
Release:        1%{?dist}
4732751
Summary:        Prometheus instrumentation library for Go applications
4732751
License:        ASL 2.0
4732751
URL:            https://%{import_path}
4732751
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
4732751
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
4732751
BuildArch:      noarch
4732751
%else
4732751
ExclusiveArch:  %{ix86} x86_64 %{arm}
4732751
%endif
4732751
4732751
%description
4732751
%{summary}
4732751
4732751
%package devel
4732751
BuildRequires:  golang >= 1.2.1-3
2e4f7e9
BuildRequires:  golang(bitbucket.org/ww/goautoneg)
2e4f7e9
BuildRequires:  golang(github.com/beorn7/perks/quantile)
2e4f7e9
BuildRequires:  golang(github.com/golang/protobuf/proto)
f500b46
BuildRequires:  golang(github.com/matttproud/golang_protobuf_extensions/pbutil)
4732751
BuildRequires:  golang(github.com/prometheus/client_model/go)
4732751
BuildRequires:  golang(github.com/prometheus/procfs)
4732751
Requires:       golang >= 1.2.1-3
2e4f7e9
Requires:       golang(bitbucket.org/ww/goautoneg)
2e4f7e9
Requires:       golang(github.com/beorn7/perks/quantile)
2e4f7e9
Requires:       golang(github.com/golang/protobuf/proto)
f500b46
Requires:       golang(github.com/matttproud/golang_protobuf_extensions/pbutil)
4732751
Requires:       golang(github.com/prometheus/client_model/go)
4732751
Requires:       golang(github.com/prometheus/procfs)
4732751
Summary:        %{summary}
4732751
Provides:       golang(%{import_path}/extraction) = %{version}-%{release}
4732751
Provides:       golang(%{import_path}/model) = %{version}-%{release}
4732751
Provides:       golang(%{import_path}/prometheus) = %{version}-%{release}
4732751
Provides:       golang(%{import_path}/text) = %{version}-%{release}
4732751
4732751
%description devel
4732751
%{summary}
4732751
4732751
This package contains library source intended for 
4732751
building other packages which use %{project}/%{repo}.
4732751
4732751
%prep
4732751
%setup -q -n %{repo}-%{commit}
4732751
4732751
%build
4732751
4732751
%install
4732751
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
4732751
cp -rpav text %{buildroot}/%{gopath}/src/%{import_path}/
4732751
cp -rpav prometheus %{buildroot}/%{gopath}/src/%{import_path}/
4732751
cp -rpav model %{buildroot}/%{gopath}/src/%{import_path}/
4732751
cp -rpav extraction %{buildroot}/%{gopath}/src/%{import_path}/
4732751
cp -rpav examples %{buildroot}/%{gopath}/src/%{import_path}/
4732751
4732751
pushd %{buildroot}/%{gopath}/src/%{import_path}
4732751
rm -rf $(find . -iname .gitignore)
4732751
popd
4732751
4732751
%check
2e4f7e9
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/text
2e4f7e9
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/prometheus
2e4f7e9
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/model
2e4f7e9
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/extraction
4732751
4732751
%files devel
4732751
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md README.md LICENSE
4732751
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
4732751
%{gopath}/src/%{import_path}
4732751
4732751
%changelog
2ba8c98
* Mon May 11 2015 jchaloup <jchaloup@redhat.com> - 0.5.0-1
2ba8c98
- Bump to upstream b0bd7e1be33327b85cb4853e7011156e3cedd657
2ba8c98
  related: #1214784
2ba8c98
f500b46
* Thu Apr 23 2015 jchaloup <jchaloup@redhat.com> - 0.4.0-1
f500b46
- Bump to upstream 608ec8b69e284600a7ad1b36514a1e6876e22b9f
f500b46
  resolves: #1214784
f500b46
2e4f7e9
* Wed Mar 04 2015 jchaloup <jchaloup@redhat.com> - 0-0.3.gite5098ac
2e4f7e9
- Bump to upstream e5098ac1ff13c7f85b68b120b253dd834ba49682
2e4f7e9
  related: #1190442
2e4f7e9
6031231
* Thu Feb 26 2015 jchaloup <jchaloup@redhat.com> - 0-0.2.git39e4bc8
6031231
- Bump to upstream 39e4bc83f974fb141a9e67c042b26322bacc917b
6031231
  related: #1190442
6031231
4732751
* Sat Feb 07 2015 jchaloup <jchaloup@redhat.com> - 0-0.1.git52186fc
4732751
- First package for Fedora
4732751
  resolves: #1190442