%global debug_package %{nil} %global import_path github.com/spf13/cobra %global gopath %{_datadir}/gocode %global commit e174a40cf5ac0768181065462ef36ec1ad07470c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: golang-github-spf13-cobra Version: 0 Release: 0.2.git%{shortcommit}%{?dist} Summary: A Commander for modern go CLI interactions License: ASL 2.0 URL: http://%{import_path} Source0: https://%{import_path}/archive/%{commit}/cobra-%{shortcommit}.tar.gz %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 BuildArch: noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} %endif %description %{summary} %package devel Requires: golang Summary: A Commander for modern go CLI interactions Provides: golang(%{import_path}) = %{version}-%{release} %description devel %{summary} This package contains library source intended for building other packages which use spf13/cobra. %prep %setup -n cobra-%{commit} %build %install install -d -p %{buildroot}/%{gopath}/src/%{import_path} cp -av *.go %{buildroot}/%{gopath}/src/%{import_path} %check %files devel %doc LICENSE.txt README.md %dir %attr(755,root,root) %{gopath} %dir %attr(755,root,root) %{gopath}/src %dir %attr(755,root,root) %{gopath}/src/github.com %dir %attr(755,root,root) %{gopath}/src/github.com/spf13 %dir %attr(755,root,root) %{gopath}/src/%{import_path} %{gopath}/src/%{import_path}/*.go %changelog * Fri Apr 04 2014 Lokesh Mandvekar 0-0.2.git - correct tarball name * Fri Apr 04 2014 Lokesh Mandvekar 0-0.1.git - Initial package