diff --git a/.gitignore b/.gitignore index e69de29..380e060 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/memberlist-dad1009.tar.gz diff --git a/golang-github-hashicorp-memberlist.spec b/golang-github-hashicorp-memberlist.spec new file mode 100644 index 0000000..1a5dddf --- /dev/null +++ b/golang-github-hashicorp-memberlist.spec @@ -0,0 +1,74 @@ +%global debug_package %{nil} +%global provider github +%global provider_tld com +%global project hashicorp +%global repo memberlist +# https://github.com/hashicorp/memberlist +%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} +%global commit dad1009e26ac60199c094f2e91cdd7769a7f46cc +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: golang-%{provider}-%{project}-%{repo} +Version: 0 +Release: 0.1.git%{shortcommit}%{?dist} +Summary: Golang package for gossip based membership and failure detection +License: MPLv2.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 +Summary: %{summary} +BuildRequires: golang >= 1.2.1-3 +BuildRequires: golang(github.com/armon/go-metrics) +BuildRequires: golang(github.com/hashicorp/go-msgpack/codec) +Requires: golang(github.com/armon/go-metrics) +Requires: golang(github.com/hashicorp/go-msgpack/codec) +Provides: golang(%{import_path}) = %{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 + +%check +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path} + +%files devel +%if 0%{?fedora} +%license LICENSE +%doc README.md todo.md +%else +%doc README.md todo.md LICENSE +%endif +%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} +%{gopath}/src/%{import_path} + +%changelog +* Wed Apr 15 2015 jchaloup - 0-0.1.gitdad1009 +- First package for Fedora + resolves: #1212065 diff --git a/sources b/sources index e69de29..347a981 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ac14b1e768aa3313c5e2eadf8f3e0ed8 memberlist-dad1009.tar.gz