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

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.3.git%{shortcommit}%{?dist}
Summary:        Data model artifacts for Prometheus
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
BuildRequires:  golang(github.com/golang/protobuf/proto)
Requires:       golang >= 1.2.1-3
Requires:       golang(github.com/golang/protobuf/proto)
Summary:        %{summary}
Provides:       golang(%{import_path}/go) = %{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 -rpav go %{buildroot}/%{gopath}/src/%{import_path}/

%check

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

%changelog
* Thu Mar 05 2015 jchaloup <jchaloup@redhat.com> - 0-0.3.gitfa8ad6f
- Update build-time dependencies
  related: #1190437

* Wed Mar 04 2015 jchaloup <jchaloup@redhat.com> - 0-0.2.gitfa8ad6f
- Bump to upstream fa8ad6fec33561be4280a8f0514318c79d7f6cb6
  related: #1190437

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