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

Name:           golang-%{provider}-%{project}-%{repo}
Version:        0
Release:        0.1.git%{shortcommit}%{?dist}
Summary:        The Go SDK for Openstack http://gophercloud.io
License:        ASL 2.0
URL:            https://%{import_path}
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
BuildArch:      noarch

%description
Gophercloud currently lets you authenticate with OpenStack providers to create
and manage servers. We are working on extending the API to further include
cloud files, block storage, DNS, databases, security groups,
and other features.

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

%package devel
BuildRequires:  golang >= 1.2.1-3
BuildRequires:  golang(github.com/mitchellh/mapstructure)
BuildRequires:  golang(github.com/racker/perigee)
BuildRequires:  golang(github.com/tonnerre/golang-pretty)
Requires:       golang >= 1.2.1-3
Requires:       golang(github.com/mitchellh/mapstructure)
Requires:       golang(github.com/racker/perigee)
Requires:       golang(github.com/tonnerre/golang-pretty)
Summary:        %{summary}
Provides:       golang(%{import_path}) = %{version}-%{release}
Provides:       golang(%{import_path}/acceptance) = %{version}-%{release}
Provides:       golang(%{import_path}/osutil) = %{version}-%{release}

%description devel
Gophercloud currently lets you authenticate with OpenStack providers to create 
and manage servers. We are working on extending the API to further include 
cloud files, block storage, DNS, databases, security groups, 
and other features.

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}/
cp -pav {acceptance,osutil} %{buildroot}/%{gopath}/src/%{import_path}/

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


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

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