# Generated by go2rpm 1
%bcond_without check
# https://github.com/protocolbuffers/protobuf-go
%global goipath google.golang.org/protobuf
%global forgeurl https://github.com/protocolbuffers/protobuf-go
Version: 1.27.1
%gometa
%global common_description %{expand:
Go support for Google's protocol buffers.}
%global golicenses LICENSE PATENTS
%global godocs AUTHORS CONTRIBUTING.md CONTRIBUTORS README.md
Name: %{goname}
Release: %autorelease
Summary: Go support for Google's protocol buffers
# Upstream license specification: BSD-3-Clause
License: BSD
URL: %{gourl}
Source0: %{gosource}
BuildRequires: protobuf-compiler
Requires: protobuf
Provides: protoc-gen-go = %{version}-%{release}
Provides: golang(%{goipath}/protoc-gen-go) = %{version}-%{release}
BuildRequires: golang(github.com/google/go-cmp/cmp)
BuildRequires: golang(github.com/google/go-cmp/cmp/cmpopts)
%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 -d internal/impl
%endif
%files
%license LICENSE PATENTS
%doc AUTHORS CONTRIBUTING.md CONTRIBUTORS README.md
%{_bindir}/*
%gopkgfiles
%changelog
%autochangelog