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

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.1.git%{shortcommit}%{?dist}
Summary:        REST client optimized for use with APIs for request and response bodies
License:        ASL 2.0
URL:            https://%{import_path}
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
BuildArch:      noarch

%description
Perigee provides a REST client that, while it should be generic enough
to use with most any RESTful API, is nonetheless optimized to the needs
of the OpenStack APIs. Perigee grew out of the need to refactor out
common API access code from the gorax project.

Several things influenced the name of the project. Numerous elements
of the OpenStack ecosystem are named after astronomical artifacts.
Additionally, perigee occurs when two orbiting bodies are closest
to each other. Perigee seemed appropriate for something aiming to bring
OpenStack and other RESTful services closer to the end-user.

This library is still in the very early stages of development.

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

%description devel
Perigee provides a REST client that, while it should be generic enough
to use with most any RESTful API, is nonetheless optimized to the needs
of the OpenStack APIs. Perigee grew out of the need to refactor out
common API access code from the gorax project.

Several things influenced the name of the project. Numerous elements 
of the OpenStack ecosystem are named after astronomical artifacts. 
Additionally, perigee occurs when two orbiting bodies are closest 
to each other. Perigee seemed appropriate for something aiming to bring 
OpenStack and other RESTful services closer to the end-user.

This library is still in the very early stages of development.

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}/

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

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

%changelog
* Thu Oct 16 2014 jchaloup <jchaloup@redhat.com> - 0-0.1.git0c00cb0
- First package for Fedora
  resolves: #1153726