4fd4153
%global debug_package   %{nil}
8726192
%global provider        github
8726192
%global provider_tld    com
8726192
%global project         spf13
8726192
%global repo            pflag
8726192
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
845447a
%global commit          18d831e92d67eafd1b0db8af9ffddbd04f7ae1f4
4fd4153
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
4fd4153
4fd4153
Name:           golang-github-spf13-pflag
4fd4153
Version:        0
845447a
Release:        0.7.git%{shortcommit}%{?dist}
4fd4153
Summary:        Replacement for Go's flag package
4fd4153
License:        ASL 2.0
4fd4153
URL:            http://%{import_path}
4fd4153
Source0:        https://%{import_path}/archive/%{commit}/pflag-%{shortcommit}.tar.gz
4fd4153
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
4fd4153
BuildArch:      noarch
4fd4153
%else
4fd4153
ExclusiveArch:  %{ix86} x86_64 %{arm}
4fd4153
%endif
4fd4153
4fd4153
%description
7b370ab
pflag is a drop-in replacement for Go's flag package,
7b370ab
implementing POSIX/GNU-style --flags.
7b370ab
7b370ab
pflag is compatible with the GNU extensions to the POSIX recommendations
7b370ab
for command-line options. For a more precise description,
7b370ab
see the "Command-line flag syntax" section below.
7b370ab
7b370ab
pflag is available under the same style of BSD license as the Go language,
7b370ab
which can be found in the LICENSE file.
4fd4153
4fd4153
%package devel
8726192
BuildRequires:       golang >= 1.2.1-3
8726192
Requires:       golang >= 1.2.1-3
4fd4153
Summary:        Replacement for Go's flag package
4fd4153
Provides:       golang(%{import_path}) = %{version}-%{release}
4fd4153
4fd4153
%description devel
7b370ab
pflag is a drop-in replacement for Go's flag package,
7b370ab
implementing POSIX/GNU-style --flags.
7b370ab
7b370ab
pflag is compatible with the GNU extensions to the POSIX recommendations
7b370ab
for command-line options. For a more precise description,
7b370ab
see the "Command-line flag syntax" section below.
7b370ab
7b370ab
pflag is available under the same style of BSD license as the Go language,
7b370ab
which can be found in the LICENSE file.
4fd4153
4fd4153
This package contains library source intended for building other packages
4fd4153
which use spf13/pflag.
4fd4153
4fd4153
%prep
13d9a0b
%setup -q -n %{repo}-%{commit}
4fd4153
4fd4153
%build
4fd4153
4fd4153
%install
4fd4153
install -d -p %{buildroot}/%{gopath}/src/%{import_path}
7b370ab
cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}
4fd4153
4fd4153
%check
7b370ab
# the test (using github.com/ogier/pflag or patching the deps to spf13/pflag
7b370ab
# still fails, no test -> no deps on ogier so far
7b370ab
#GOPATH={buildroot}/{gopath}:{gopath} go test {import_path}
4fd4153
4fd4153
%files devel
4fd4153
%doc LICENSE README.md
8726192
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
8726192
%{gopath}/src/%{import_path}
4fd4153
4fd4153
%changelog
845447a
* Thu Apr 23 2015 jchaloup <jchaloup@redhat.com> - 0-0.7.git18d831e
845447a
- Bump to upstream 18d831e92d67eafd1b0db8af9ffddbd04f7ae1f4
845447a
  resolves: #1214731
845447a
9719645
* Mon Mar 30 2015 jchaloup <jchaloup@redhat.com> - 0-0.6.git11b7cf8
9719645
- Bump to upstream 11b7cf8387a31f278486eaad758162830eca8c73
9719645
  related: #1085890
9719645
13d9a0b
* Wed Feb 25 2015 jchaloup <jchaloup@redhat.com> - 0-0.5.git370c317
13d9a0b
- Bump to upstream 370c3171201099fa6b466db45c8a032cbce33d8d
13d9a0b
  related: #1085890
13d9a0b
8726192
* Fri Feb 06 2015 jchaloup <jchaloup@redhat.com> - 0-0.4.gitf82776d
8726192
- Bump to upstream f82776d6cc998e3c026baef7b24409ff49fe5c8d
8726192
  related: #1085890
8726192
7b370ab
* Thu Oct 16 2014 jchaloup <jchaloup@redhat.com> - 0-0.3.git463bdc8
7b370ab
- Bump to 463bdc838f2b35e9307e91d480878bda5fff7232
7b370ab
3703697
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.2.git94e98a5
3703697
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3703697
4fd4153
* Fri Apr 04 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.1.git
4fd4153
- Initial package