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