Blob Blame History Raw
# Run tests in check section
%bcond_without check

# https://github.com/anacrolix/tagflag
%global goipath         github.com/anacrolix/tagflag
Version:                1.0.0

%global common_description %{expand:
Package tagflag uses reflection to derive flags and positional arguments to a
program, and parses and sets them from a slice of arguments.}

%gometa

Name:           %{goname}
Release:        1%{?dist}
Summary:        Declarative flag parsing for Go using struct tags
# Detected licences
# - Expat License at 'LICENSE'
License:        MIT
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(github.com/anacrolix/missinggo)
BuildRequires:  golang(github.com/anacrolix/missinggo/slices)
BuildRequires:  golang(github.com/bradfitz/iter)
BuildRequires:  golang(github.com/dustin/go-humanize)
BuildRequires:  golang(github.com/huandu/xstrings)
BuildRequires:  golang(github.com/pkg/errors)
# Tests
%if %{with check}
BuildRequires:  golang(github.com/stretchr/testify/assert)
BuildRequires:  golang(github.com/stretchr/testify/require)
%endif

%description
%{common_description}


%package devel
Summary:       %{summary}
BuildArch:     noarch

%description devel
%{common_description}

This package contains library source intended for
building other packages which use import path with
%{goipath} prefix.


%prep
%forgeautosetup


%install
%goinstall


%if %{with check}
%check
%gochecks
%endif


%files devel -f devel.file-list
%license LICENSE
%doc README.md


%changelog
* Tue Mar 26 20:28:59 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1.0.0-1
- Release 1.0.0 (#1692672)

* Sun Mar 03 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.1.20190326git3a8ff54
- First package for Fedora