From 7326e4670b238c67a719de9e0db128494514d7f1 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Sep 16 2019 22:43:58 +0000 Subject: Initial import (#1743861) Signed-off-by: Robert-André Mauchin --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d6e5d63 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/wire-0.3.0.tar.gz diff --git a/golang-github-google-wire.spec b/golang-github-google-wire.spec new file mode 100644 index 0000000..ff32b61 --- /dev/null +++ b/golang-github-google-wire.spec @@ -0,0 +1,73 @@ +# 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 - 0.3.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..94d6c37 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (wire-0.3.0.tar.gz) = 5fbf8f5c357cde8b429cab129ec88c8dfab5acd73f11059f3bc51bea12388cb7b2a95feb12a2625a78027b93949aca725e5e9b047196b4271d001745f9a42590