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

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.2.git%{shortcommit}%{?dist}
Summary:        Support for streaming Protocol Buffer messages for the Go language (golang)
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(code.google.com/p/goprotobuf/proto)
BuildRequires:  golang(code.google.com/p/goprotobuf/proto/testdata)
Requires:       golang >= 1.2.1-3
Requires:       golang(code.google.com/p/goprotobuf/proto)
Requires:       golang(code.google.com/p/goprotobuf/proto/testdata)
Summary:        %{summary}
Provides:       golang(%{import_path}/ext) = %{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 ext %{buildroot}/%{gopath}/src/%{import_path}/

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

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

%changelog
* Thu Mar 05 2015 jchaloup <jchaloup@redhat.com> - 0-0.2.gitba7d65a
- Bump to upstream ba7d65ac66e9da93a714ca18f6d1bc7a0c09100c
  related: #1190438

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