7326e46
# Generated by go2rpm 1
7326e46
%bcond_without check
7326e46
7326e46
# https://github.com/google/wire
7326e46
%global goipath         github.com/google/wire
7b0f669
Version:                0.4.0
7326e46
7326e46
%gometa
7326e46
7326e46
%global common_description %{expand:
7326e46
Wire is a code generation tool that automates connecting components using
7326e46
dependency injection. Dependencies between components are represented in Wire as
7326e46
function parameters, encouraging explicit initialization instead of global
7326e46
variables. Because Wire operates without runtime state or reflection, code
7326e46
written to be used with Wire is useful even for hand-written initialization.}
7326e46
7326e46
%global golicenses      LICENSE
7326e46
%global godocs          docs AUTHORS CODE_OF_CONDUCT.md CONTRIBUTING.md\\\
7326e46
                        CONTRIBUTORS README.md
7326e46
7326e46
Name:           %{goname}
7b0f669
Release:        1%{?dist}
7326e46
Summary:        Compile-time Dependency Injection for Go
7326e46
7326e46
# Upstream license specification: Apache-2.0
7326e46
License:        ASL 2.0
7326e46
URL:            %{gourl}
7326e46
Source0:        %{gosource}
7326e46
7326e46
BuildRequires:  golang(github.com/google/subcommands)
7326e46
BuildRequires:  golang(github.com/pmezard/go-difflib/difflib)
7326e46
BuildRequires:  golang(golang.org/x/tools/go/ast/astutil)
7326e46
BuildRequires:  golang(golang.org/x/tools/go/packages)
7326e46
BuildRequires:  golang(golang.org/x/tools/go/types/typeutil)
7326e46
7326e46
%if %{with check}
7326e46
# Tests
7326e46
BuildRequires:  golang(github.com/google/go-cmp/cmp)
7326e46
%endif
7326e46
7326e46
%description
7326e46
%{common_description}
7326e46
7326e46
%gopkg
7326e46
7326e46
%prep
7326e46
%goprep
7326e46
7326e46
%build
7326e46
for cmd in cmd/* ; do
7326e46
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
7326e46
done
7326e46
7326e46
%install
7326e46
%gopkginstall
7326e46
install -m 0755 -vd                     %{buildroot}%{_bindir}
7326e46
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
7326e46
7326e46
%if %{with check}
7326e46
%check
7326e46
%gocheck
7326e46
%endif
7326e46
7326e46
%files
7326e46
%license LICENSE
7326e46
%doc docs AUTHORS CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS README.md
7326e46
%{_bindir}/*
7326e46
7326e46
%gopkgfiles
7326e46
7326e46
%changelog
7b0f669
* Sun Feb 16 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.4.0-1
7b0f669
- Update to latest version
7b0f669
0c03fd3
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2
0c03fd3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0c03fd3
7326e46
* Tue Aug 20 22:26:05 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.3.0-1
7326e46
- Initial package