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

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.3.git%{shortcommit}%{?dist}
Summary:        A multiplexed stream library using spdy
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/go.net/spdy)
BuildRequires:  golang(github.com/gorilla/websocket)
Requires:       golang >= 1.2.1-3
Requires:       golang(code.google.com/p/go.net/spdy)
Requires:       golang(github.com/gorilla/websocket)
Summary:        %{summary}
Provides:       golang(%{import_path}) = %{version}-%{release}
Provides:       golang(%{import_path}/ws) = %{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 ws %{buildroot}/%{gopath}/src/%{import_path}/

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

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

%changelog
* Tue Mar 31 2015 jchaloup <jchaloup@redhat.com> - 0-0.3.gite731c8f
- Bump to upstream e731c8f9f19ffd7e51a469a2de1580c1dfbb4fae
  resolves: #1196363

* Tue Mar 03 2015 jchaloup <jchaloup@redhat.com> - 0-0.2.gite9bf991
- Bump to upstream e9bf9912b85eec0ed6aaf317808a0eab25e3ca43
  resolves: #1196363

* Wed Feb 25 2015 jchaloup <jchaloup@redhat.com> - 0-0.1.git29e1da2
- First package for Fedora
  resolves: #1196363