[golang-github-golang-groupcache/f20] First package for Fedora - resolves: #1196368

Jan Chaloupka jchaloup at fedoraproject.org
Thu Feb 26 16:43:12 UTC 2015


commit 8a18910853f356f917fff1725bef3098e6b54f55
Author: Jan Chaloupka <jchaloup at redhat.com>
Date:   Thu Feb 26 17:36:04 2015 +0100

    First package for Fedora
    - resolves: #1196368

 .gitignore                           |  1 +
 golang-github-golang-groupcache.spec | 73 ++++++++++++++++++++++++++++++++++++
 sources                              |  1 +
 3 files changed, 75 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..954d415 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/groupcache-604ed57.tar.gz
diff --git a/golang-github-golang-groupcache.spec b/golang-github-golang-groupcache.spec
new file mode 100644
index 0000000..869299e
--- /dev/null
+++ b/golang-github-golang-groupcache.spec
@@ -0,0 +1,73 @@
+%global debug_package   %{nil}
+%global provider        github
+%global provider_tld    com
+%global project         golang
+%global repo            groupcache
+%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
+%global commit          604ed5785183e59ae2789449d89e73f3a2a77987
+%global shortcommit     %(c=%{commit}; echo ${c:0:7})
+
+Name:           golang-%{provider}-%{project}-%{repo}
+Version:        0
+Release:        0.1.git%{shortcommit}%{?dist}
+Summary:        Caching and cache-filling library as a replacement for memcached in many cases
+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(github.com/golang/protobuf/proto)
+Requires:       golang >= 1.2.1-3
+Requires:       golang(github.com/golang/protobuf/proto)
+Summary:        %{summary}
+Provides:       golang(%{import_path}) = %{version}-%{release}
+Provides:       golang(%{import_path}/consistenthash) = %{version}-%{release}
+Provides:       golang(%{import_path}/groupcachepb) = %{version}-%{release}
+Provides:       golang(%{import_path}/lru) = %{version}-%{release}
+Provides:       golang(%{import_path}/singleflight) = %{version}-%{release}
+Provides:       golang(%{import_path}/testpb) = %{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 testpb %{buildroot}/%{gopath}/src/%{import_path}/
+cp -rpav singleflight %{buildroot}/%{gopath}/src/%{import_path}/
+cp -rpav lru %{buildroot}/%{gopath}/src/%{import_path}/
+cp -rpav groupcachepb %{buildroot}/%{gopath}/src/%{import_path}/
+cp -rpav consistenthash %{buildroot}/%{gopath}/src/%{import_path}/
+
+%check
+GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}
+GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/singleflight
+GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/lru
+GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/consistenthash
+
+%files devel
+%doc README.md LICENSE
+%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
+%{gopath}/src/%{import_path}
+
+%changelog
+* Wed Feb 25 2015 jchaloup <jchaloup at redhat.com> - 0-0.1.git604ed57
+- First package for Fedora
+  resolves: #1196368
diff --git a/sources b/sources
index e69de29..f3aa49a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+816a6b8de5c9ecf3747cc7e0415e6e1e  groupcache-604ed57.tar.gz


More information about the scm-commits mailing list