%global debug_package %{nil}
%global provider github
%global provider_tld com
%global project samalba
%global repo dockerclient
# https://github.com/samalba/dockerclient
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
%global commit c37a52f55ab5a9edb9ffd4cf6e78692962b29b8d
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: golang-%{provider}-%{project}-%{repo}
Version: 0
Release: 0.9.git%{shortcommit}%{?dist}
Summary: Docker client library in Go http://www.docker.com/
License: ASL 2.0
URL: https://%{import_path}
Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
ExcludeArch: ppc64
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
%description
%{summary}
%package devel
Summary: %{summary}
BuildRequires: golang >= 1.2.1-3
BuildRequires: golang(github.com/docker/docker/pkg/jsonlog)
BuildRequires: golang(github.com/docker/docker/pkg/stdcopy)
BuildRequires: golang(github.com/docker/docker/utils)
BuildRequires: golang(github.com/gorilla/mux)
BuildRequires: golang(github.com/stretchr/testify/mock)
Requires: golang(github.com/docker/docker/pkg/jsonlog)
Requires: golang(github.com/docker/docker/pkg/stdcopy)
Requires: golang(github.com/docker/docker/utils)
Requires: golang(github.com/gorilla/mux)
Requires: golang(github.com/stretchr/testify/mock)
Provides: golang(%{import_path}) = %{version}-%{release}
Provides: golang(%{import_path}/mockclient) = %{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}/
# copy directories
for file in ./* ; do
if [ -d $file ]; then
cp -rpav $file %{buildroot}%{gopath}/src/%{import_path}/
fi
done
chmod -x %{buildroot}%{gopath}/src/%{import_path}/auth_test.go
%check
# looks like this needs docker running
#.
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/mockclient
%files devel
%if 0%{?fedora}
%license LICENSE
%doc README.md
%else
%doc README.md LICENSE
%endif
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
%{gopath}/src/%{import_path}
%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.9.gitc37a52f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.8.gitc37a52f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.7.gitc37a52f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jun 27 2017 Jan Chaloupka <jchaloup@redhat.com> - 0-0.6.gitc37a52f
- Polish spec and exclude ppc64
related: #1212626
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.5.gitc37a52f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Jul 21 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.4.gitc37a52f
- https://fedoraproject.org/wiki/Changes/golang1.7
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.3.gitc37a52f
- https://fedoraproject.org/wiki/Changes/golang1.6
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.2.gitc37a52f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Apr 16 2015 jchaloup <jchaloup@redhat.com> - 0-0.1.gitc37a52f
- First package for Fedora
resolves: #1212626