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

Name:		golang-%{provider}-%{project}-%{repo}
Version:	0
Release:	0.4.git%{shortcommit}%{?dist}
Summary:	An Amazon Library for Go
License:	LGPLv3+
URL:		http://%{import_path}
Source0:	https://github.com/%{project}/%{repo}/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/motain/gocheck)
BuildRequires:	golang(github.com/vaughan0/go-ini)
Requires:	golang >= 1.2.1-3
Requires:	golang(github.com/vaughan0/go-ini)
Requires:	golang(github.com/motain/gocheck)
Summary:	A golang library for logging to systemd
Provides:	golang(%{import_path}/autoscaling) = %{version}-%{release}
Provides:	golang(%{import_path}/aws) = %{version}-%{release}
Provides:	golang(%{import_path}/ec2) = %{version}-%{release}
Provides:	golang(%{import_path}/elb) = %{version}-%{release}
Provides:	golang(%{import_path}/exp) = %{version}-%{release}
Provides:	golang(%{import_path}/exp/mturk) = %{version}-%{release}
Provides:	golang(%{import_path}/exp/sdb) = %{version}-%{release}
Provides:	golang(%{import_path}/exp/sns) = %{version}-%{release}
Provides:	golang(%{import_path}/iam) = %{version}-%{release}
Provides:	golang(%{import_path}/rds) = %{version}-%{release}
Provides:	golang(%{import_path}/route53) = %{version}-%{release}
Provides:	golang(%{import_path}/s3) = %{version}-%{release}

%description devel
%{summary}.

%prep
%setup -q -n %{repo}-%{commit}

%build

%install
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
for d in autoscaling aws ec2 elb exp iam rds route53 s3 testutil; do
	cp -pav $d %{buildroot}/%{gopath}/src/%{import_path}/
done

%check
# ec2,elb failing locally
# rds,iam,route53,s3,autoscaling,aws,exp/mturk,exp/sdb,exp/sns locally ok

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

%changelog
* Tue Jan 13 2015 jchaloup <jchaloup@redhat.com> - 0-0.4.git32d1910
- Bump to upstream 32d1910e654ead1308d9073d8ccdd42d6922ee39
  related: #1142399

* Fri Oct 10 2014 jchaloup <jchaloup@redhat.com> - 0-0.3.git9cad7da
- Add dependencies, replace motain/gocheck with check.v1
  related: #1142399

* Fri Sep 19 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.2.git9cad7da
- Resolves: rhbz#1142399 - initial package upload
- don't redefine gopath
- don't own dirs owned by golang
- preserve timestamps of copied files
- devel package buildrequires golang
- noarch
- correct package name format

* Mon Sep 15 2014 Eric Paris <eparis@redhat.com - 0.0.0-0.1.git9cad7da
- Bump to upstream 9cad7da945e699385c1a3e115aa255211921c9bb