# Generated by go2rpm 1.6.0 %bcond_without check # https://github.com/grpc-ecosystem/grpc-gateway %global goipath github.com/grpc-ecosystem/grpc-gateway/v2 Version: 2.7.3 %gometa %global common_description %{expand: GRPC to JSON proxy generator following the gRPC HTTP spec.} %global golicenses LICENSE.txt %global godocs docs examples ADOPTERS.md CONTRIBUTING.md README.md Name: %{goname} Release: %autorelease Summary: GRPC to JSON proxy generator following the gRPC HTTP spec # Upstream license specification: BSD-3-Clause License: BSD URL: %{gourl} Source0: %{gosource} # Remove in F43 Provides: golang-github-grpc-ecosystem-gateway-2 = %{version}-%{release} Obsoletes: golang-github-grpc-ecosystem-gateway-2 < 2.7.3-10 %global godevelheader %{expand: Provides: golang-github-grpc-ecosystem-gateway-2-devel = %{version}-%{release} Obsoletes: golang-github-grpc-ecosystem-gateway-2-devel < 2.7.3-10} %description %{common_description} %gopkg %prep %goprep sed -i 's/\r$//' examples/internal/proto/examplepb/standalone_echo_service.yaml sed -i 's/\r$//' examples/internal/proto/examplepb/unannotated_echo_service.yaml find . -name ".gitignore" -exec rm {} \; find . -name ".swagger-codegen" -exec rm -rf {} + find . -name ".swagger-codegen-ignore" -exec rm {} \; %generate_buildrequires %go_generate_buildrequires %build for cmd in protoc-gen-grpc-gateway protoc-gen-openapiv2; 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}/ install -m 0755 -vd %{buildroot}%{_includedir}/protoc-gen-openapiv2/options install -m 0755 -vp %{gobuilddir}/src/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/*.proto %{buildroot}%{_includedir}/protoc-gen-openapiv2/options %if %{with check} %check %if 0%{?__isa_bits} == 64 %gocheck %else %gocheck -d protoc-gen-openapiv2/internal/genopenapi %endif %endif %files %license LICENSE.txt %doc docs examples ADOPTERS.md CONTRIBUTING.md README.md %{_bindir}/* %{_includedir}/* %gopkgfiles %changelog %autochangelog