File protoc-gen-go-grpc.spec of Package protoc-gen-go-grpc

#
# spec file for package protoc-gen-go-grpc
#
# copyright (c) 2023 munix9@googlemail.com
#

Name:           protoc-gen-go-grpc
Version:        1.2.0
Release:        0
Summary:        The Go language implementation of gRPC
License:        Apache-2.0
URL:            https://github.com/grpc/grpc-go
Source0:        https://github.com/grpc/grpc-go/archive/refs/tags/cmd/%{name}/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        vendor.tar.gz
BuildRequires:  golang-packaging

%description
The Go implementation of gRPC: A high performance, open source,
general RPC framework that puts mobile and HTTP/2 first.

%prep
%autosetup -n grpc-go-cmd-%{name}-v%{version} -p1
tar -xf %{SOURCE1} -C cmd/protoc-gen-go-grpc

%build
_pwd="$(pwd)"
mkdir -p build
export GOFLAGS="-mod=vendor -buildmode=pie -trimpath -ldflags=-buildid="
cd cmd/protoc-gen-go-grpc
go build -o $_pwd/build -v -x

%install
install -D -m 0755 -t %{buildroot}%{_bindir} build/%{name}

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by