File golang-gopkgin-alecthomas-kingpin.v2.spec of Package golang-gopkgin-alecthomas-kingpin.v2

#
# spec file for package golang-github-alecthomas-kingpin
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define   provider        github
%define   provider_tld    com
%define   project         alecthomas
%define   repo            kingpin
# https://github.com/alecthomas/kingpin
%define   provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%define   import_path     %{provider_prefix}
%define   import_path2    gopkg.in/%{project}/%{repo}.v2
%define   commit          1087e65c9441605df944fb12c33f0fe7072d18ca
%define   shortcommit     %(c=%{commit}; echo ${c:0:7})

Name:           golang-gopkgin-%{project}-%{repo}.v2
Version:        2.2.6
Release:        0
Summary:        A Go command line and flag parser
License:        MIT
URL:            https://%{provider_prefix}
Source0:        %{repo}-%{version}.tar.xz
Source1:        %{name}-rpmlintrc
Group:          Development/Languages/Other
BuildRequires:  fdupes
BuildRequires:  golang-packaging
%if 0%{?suse_version} < 1330
Requires:       golang-github-alecthomas-template
Requires:       golang-github-alecthomas-units
%endif
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{go_provides}

%description
Kingpin is a fluent-style, type-safe command-line parser. It supports flags, 
nested commands, and positional arguments.

Features:
+ Help output that isn't as ugly as sin.
+ Fully customisable help, via Go templates.
+ Parsed, type-safe flags (kingpin.Flag("f", "help").Int())
+ Parsed, type-safe positional arguments (kingpin.Arg("a", "help").Int()).
+ Parsed, type-safe, arbitrarily deep commands (kingpin.Command("c", "help")).
+ Support for required flags and required positional arguments (kingpin.Flag("f", "").Required().Int()).
+ Support for arbitrarily nested default commands (command.Default()).
+ Callbacks per command, flag and argument (kingpin.Command("c", "").Action(myAction)).
+ POSIX-style short flag combining (-a -b -> -ab).
+ Short-flag+parameter combining (-a parm -> -aparm).
+ Read command-line from files (@<file>).
+ Automatically generate man pages (--help-man).


%prep
%setup -q -n %{repo}-%{version}

%build
%goprep %{import_path2}

%install
%gosrc
%gofilelist

%fdupes %{buildroot}

%files -f file.lst
%defattr(-,root,root)
%doc README.md 
%license COPYING

%changelog
openSUSE Build Service is sponsored by