diff --git a/.gitignore b/.gitignore index e69de29..de149c9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/columnize-44cb478.tar.gz diff --git a/golang-github-ryanuber-columnize.spec b/golang-github-ryanuber-columnize.spec new file mode 100644 index 0000000..9423f85 --- /dev/null +++ b/golang-github-ryanuber-columnize.spec @@ -0,0 +1,70 @@ +%global debug_package %{nil} +%global provider github +%global provider_tld com +%global project ryanuber +%global repo columnize +# https://github.com/ryanuber/columnize +%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} +%global commit 44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: golang-%{provider}-%{project}-%{repo} +Version: 0 +Release: 0.1.git%{shortcommit}%{?dist} +Summary: Easy column formatted output for golang +License: MIT +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 +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 COPYING +%doc README.md +%else +%doc README.md COPYING +%endif +%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} +%{gopath}/src/%{import_path} + +%changelog +* Wed Apr 15 2015 jchaloup - 0-0.1.git44cb478 +- First package for Fedora + resolves: #1212124 diff --git a/sources b/sources index e69de29..c8259bc 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +97f291036cfc09f3e3dbec300e1c01f1 columnize-44cb478.tar.gz