Blame golang-github-spf13-cobra.spec

3a94112
%global debug_package   %{nil}
352228d
%global provider        github
352228d
%global provider_tld    com
352228d
%global project         spf13
352228d
%global repo            cobra
352228d
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
cfd2eca
%global commit          8f5946caaeeff40a98d67f60c25e89c3525038a3
3a94112
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
3a94112
352228d
Name:           golang-%{provider}-%{project}-%{repo}
3a94112
Version:        0
cfd2eca
Release:        0.9.git%{shortcommit}%{?dist}
3a94112
Summary:        A Commander for modern go CLI interactions
3a94112
License:        ASL 2.0
3a94112
URL:            http://%{import_path}
352228d
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
39f14da
Patch0:         Remove-Windows-related-code.patch
39f14da
3a94112
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
3a94112
BuildArch:      noarch
3a94112
%else
3a94112
ExclusiveArch:  %{ix86} x86_64 %{arm}
3a94112
%endif
3a94112
3a94112
%description
72e7572
Cobra is a commander providing a simple interface to create powerful modern
72e7572
CLI interfaces similar to git & go tools.
72e7572
In addition to providing an interface, Cobra simultaneously provides
72e7572
a controller to organize your application code.
72e7572
72e7572
Inspired by go, go-Commander, gh and subcommand, Cobra improves on these
72e7572
by providing fully posix compliant flags (including short & long versions),
72e7572
nesting commands, and the ability to define your own help and usage
72e7572
for any or all commands.
3a94112
3a94112
%package devel
72e7572
BuildRequires:  golang >= 1.2.1-3
72e7572
BuildRequires:  golang(github.com/spf13/pflag)
72e7572
Requires:       golang >= 1.2.1-3
72e7572
Requires:       golang(github.com/spf13/pflag)
3a94112
Summary:        A Commander for modern go CLI interactions
3a94112
Provides:       golang(%{import_path}) = %{version}-%{release}
3a94112
3a94112
%description devel
72e7572
Cobra is a commander providing a simple interface to create powerful modern
72e7572
CLI interfaces similar to git & go tools.
72e7572
In addition to providing an interface, Cobra simultaneously provides
72e7572
a controller to organize your application code.
72e7572
72e7572
Inspired by go, go-Commander, gh and subcommand, Cobra improves on these
72e7572
by providing fully posix compliant flags (including short & long versions),
72e7572
nesting commands, and the ability to define your own help and usage
72e7572
for any or all commands.
3a94112
3a94112
This package contains library source intended for building other packages
3a94112
which use spf13/cobra.
3a94112
3a94112
%prep
352228d
%setup -q -n %{repo}-%{commit}
39f14da
%patch0 -p1
3a94112
3a94112
%build
3a94112
3a94112
%install
3a94112
install -d -p %{buildroot}/%{gopath}/src/%{import_path}
72e7572
cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}
3a94112
3a94112
%check
352228d
GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}
3a94112
3a94112
%files devel
3a94112
%doc LICENSE.txt README.md
352228d
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
352228d
%{gopath}/src/%{import_path}
3a94112
3a94112
%changelog
cfd2eca
* Tue Jun 02 2015 jchaloup <jchaloup@redhat.com> - 0-0.9.git8f5946c
cfd2eca
- Bump to upstream 8f5946caaeeff40a98d67f60c25e89c3525038a3
cfd2eca
  related: #1214769
cfd2eca
39f14da
* Thu Apr 23 2015 jchaloup <jchaloup@redhat.com> - 0-0.8.git3c187e9
39f14da
- Bump to upstream 3c187e904540cd62f0a197cddd6da02645a7cc5a
39f14da
  related: #1214769
39f14da
feeb894
* Tue Mar 31 2015 jchaloup <jchaloup@redhat.com> - 0-0.7.git79bd93d
feeb894
- Bump to upstream 79bd93d369fb73d640179208d4e2b1a748915567
feeb894
  related: #1085881
feeb894
352228d
* Wed Feb 25 2015 jchaloup <jchaloup@redhat.com> - 0-0.6.gitf8e1ec5
352228d
- Bump to upstream f8e1ec56bdd7494d309c69681267859a6bfb7549
352228d
  related: #1085881
352228d
c63f784
* Wed Dec 24 2014 jchaloup <jchaloup@redhat.com> - 0-0.5.gitb1e90a7
c63f784
- Bump to e1e66f7b4e667751cf530ddb6e72b79d6eeb0235
c63f784
  related: #1085881
c63f784
72e7572
* Thu Oct 16 2014 jchaloup <jchaloup@redhat.com> - 0-0.4.gite174a40
72e7572
- Bump to b1e90a7943957b51bb96a13b44b844475bcf95c0
72e7572
a653aa9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.3.gite174a40
a653aa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a653aa9
3a94112
* Fri Apr 04 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.2.git
3a94112
- correct tarball name
3a94112
3a94112
* Fri Apr 04 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.1.git
3a94112
- Initial package