# # spec file for package grpc-java # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # ##### WARNING: please do not edit this auto generated spec file. Use the grpc-java.spec! ##### %bcond_without extras %global base_name grpc-java %global protoc_arch %{_arch} %ifarch x86_64 %{?x86_64} %global protoc_arch x86_64 %endif %ifarch ppc %global protoc_arch ppc_32 %endif %ifarch ppc64 %global protoc_arch ppc_64 %endif %ifarch ppc64le %global protoc_arch ppcle_64 %endif %ifarch %{ix86} %global protoc_arch x86_32 %endif %ifarch ia64 %global protoc_arch itanium_64 %endif %ifarch s390 %global protoc_arch s390_32 %endif %ifarch s390x %global protoc_arch s390_64 %endif %ifarch %{arm} %global protoc_arch arm_32 %endif %ifarch aarch64 %{arm64} %global protoc_arch aarch_64 %endif %ifarch riscv64 %{?riscv64} %global protoc_arch riscv64 %endif # 32 bit sparc, optimized for v9 %ifarch sparcv9 %global protoc_arch sparc_32 %endif # 64 bit sparc %ifarch sparc64 %global protoc_arch sparc_64 %endif Version: 1.68.1 Release: 0 Summary: gRPC-Java - An RPC library and framework License: Apache-2.0 Group: Development/Libraries/Java URL: https://github.com/grpc Source0: https://github.com/grpc/%{base_name}/archive/refs/tags/v%{version}.tar.gz Source100: aggregator.pom Source101: https://repo1.maven.org/maven2/io/grpc/grpc-all/%{version}/grpc-all-%{version}.pom Source102: https://repo1.maven.org/maven2/io/grpc/grpc-alts/%{version}/grpc-alts-%{version}.pom Source103: https://repo1.maven.org/maven2/io/grpc/grpc-api/%{version}/grpc-api-%{version}.pom Source104: https://repo1.maven.org/maven2/io/grpc/grpc-auth/%{version}/grpc-auth-%{version}.pom Source105: https://repo1.maven.org/maven2/io/grpc/grpc-bom/%{version}/grpc-bom-%{version}.pom Source106: https://repo1.maven.org/maven2/io/grpc/grpc-context/%{version}/grpc-context-%{version}.pom Source107: https://repo1.maven.org/maven2/io/grpc/grpc-core/%{version}/grpc-core-%{version}.pom Source108: https://repo1.maven.org/maven2/io/grpc/grpc-grpclb/%{version}/grpc-grpclb-%{version}.pom Source109: https://repo1.maven.org/maven2/io/grpc/grpc-gcp-csm-observability/%{version}/grpc-gcp-csm-observability-%{version}.pom Source110: https://repo1.maven.org/maven2/io/grpc/grpc-inprocess/%{version}/grpc-inprocess-%{version}.pom Source111: https://repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/%{version}/grpc-netty-shaded-%{version}.pom Source112: https://repo1.maven.org/maven2/io/grpc/grpc-netty/%{version}/grpc-netty-%{version}.pom Source113: https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/%{version}/grpc-okhttp-%{version}.pom Source114: https://repo1.maven.org/maven2/io/grpc/grpc-opentelemetry/%{version}/grpc-opentelemetry-%{version}.pom Source115: https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/%{version}/grpc-protobuf-lite-%{version}.pom Source116: https://repo1.maven.org/maven2/io/grpc/grpc-protobuf/%{version}/grpc-protobuf-%{version}.pom Source117: https://repo1.maven.org/maven2/io/grpc/grpc-rls/%{version}/grpc-rls-%{version}.pom Source118: https://repo1.maven.org/maven2/io/grpc/grpc-services/%{version}/grpc-services-%{version}.pom Source119: https://repo1.maven.org/maven2/io/grpc/grpc-servlet-jakarta/%{version}/grpc-servlet-jakarta-%{version}.pom Source120: https://repo1.maven.org/maven2/io/grpc/grpc-servlet/%{version}/grpc-servlet-%{version}.pom Source121: https://repo1.maven.org/maven2/io/grpc/grpc-stub/%{version}/grpc-stub-%{version}.pom Source122: https://repo1.maven.org/maven2/io/grpc/grpc-testing/%{version}/grpc-testing-%{version}.pom Source123: https://repo1.maven.org/maven2/io/grpc/grpc-util/%{version}/grpc-util-%{version}.pom Source124: https://repo1.maven.org/maven2/io/grpc/grpc-xds/%{version}/grpc-xds-%{version}.pom BuildRequires: %{base_name}-protoc-gen BuildRequires: fdupes BuildRequires: googleapis-source BuildRequires: jurand BuildRequires: maven-local BuildRequires: protobuf-devel BuildRequires: mvn(com.google.auto.value:auto-value) BuildRequires: mvn(com.google.auto.value:auto-value-annotations) BuildRequires: mvn(com.google.code.gson:gson) BuildRequires: mvn(com.google.protobuf:protobuf-java) BuildRequires: mvn(com.google.protobuf:protobuf-java-util) BuildRequires: mvn(org.conscrypt:conscrypt-openjdk-uber) %if %{without extras} Name: %{base_name} BuildRequires: mvn(com.github.fridrich:netty-resource-transformers) BuildRequires: mvn(com.google.api.grpc:proto-google-common-protos) BuildRequires: mvn(com.google.code.findbugs:jsr305) BuildRequires: mvn(com.google.errorprone:error_prone_annotations) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.google.protobuf:protobuf-javalite) BuildRequires: mvn(io.netty:netty-codec-http2) BuildRequires: mvn(io.netty:netty-handler-proxy) BuildRequires: mvn(io.netty:netty-tcnative::linux-%{protoc_arch}:) BuildRequires: mvn(io.netty:netty-transport-native-unix-common) BuildRequires: mvn(io.perfmark:perfmark-api) BuildRequires: mvn(jakarta.servlet:jakarta.servlet-api) BuildRequires: mvn(javax.servlet:javax.servlet-api) >= 4.0.0 BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) %else Name: %{base_name}-extras BuildRequires: mvn(com.google.auth:google-auth-library-credentials) BuildRequires: mvn(com.google.auth:google-auth-library-oauth2-http) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.google.re2j:re2j) BuildRequires: mvn(io.grpc:grpc-api) = %{version} BuildRequires: mvn(io.grpc:grpc-context) = %{version} BuildRequires: mvn(io.grpc:grpc-core) = %{version} BuildRequires: mvn(io.grpc:grpc-grpclb) = %{version} BuildRequires: mvn(io.grpc:grpc-inprocess) = %{version} BuildRequires: mvn(io.grpc:grpc-netty) = %{version} BuildRequires: mvn(io.grpc:grpc-netty-shaded) = %{version} BuildRequires: mvn(io.grpc:grpc-protobuf) = %{version} BuildRequires: mvn(io.grpc:grpc-rls) = %{version} BuildRequires: mvn(io.grpc:grpc-services) = %{version} BuildRequires: mvn(io.grpc:grpc-servlet) = %{version} BuildRequires: mvn(io.grpc:grpc-servlet-jakarta) = %{version} BuildRequires: mvn(io.grpc:grpc-stub) = %{version} BuildRequires: mvn(io.grpc:grpc-util) = %{version} BuildRequires: mvn(io.opencensus:opencensus-api) BuildRequires: mvn(io.opentelemetry:opentelemetry-api) BuildRequires: mvn(junit:junit) %endif %description A high performance, open source universal RPC framework. %package -n %{base_name}-all Summary: gRPC: All Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-all A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-all. %package -n %{base_name}-alts Summary: gRPC: ALTS Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-alts A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-alts. %package -n %{base_name}-api Summary: gRPC: API Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-api A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-api. %package -n %{base_name}-auth Summary: gRPC: Auth Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-auth A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-auth. %package -n %{base_name}-bom Summary: gRPC: BOM Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-bom A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-bom. %package -n %{base_name}-context Summary: gRPC: Context Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-context A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-context. %package -n %{base_name}-core Summary: gRPC: Core Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-core A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-core. %package -n %{base_name}-grpclb Summary: gRPC: GRPCLB LoadBalancer plugin Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-grpclb A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-grpclb. %package -n %{base_name}-inprocess Summary: gRPC: Inprocess Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-inprocess A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-inprocess. %package -n %{base_name}-netty Summary: gRPC: Netty Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-netty A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-netty. %package -n %{base_name}-netty-shaded Summary: gRPC: Netty Shaded Group: Development/Libraries/Java %description -n %{base_name}-netty-shaded A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-netty-shaded. %package -n %{base_name}-okhttp Summary: gRPC: OkHttp Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-okhttp A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-okhttp. %package -n %{base_name}-opentelemetry Summary: gRPC: OpenTelemetry Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-opentelemetry A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-opentelemetry. %package -n %{base_name}-protobuf Summary: gRPC: Protobuf Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-protobuf A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-protobuf. %package -n %{base_name}-protobuf-lite Summary: gRPC: Protobuf Lite Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-protobuf-lite A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-protobuf-lite. %package -n %{base_name}-rls Summary: gRPC: gRPC: RouteLookupService Loadbalancing plugin Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-rls A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-rls. %package -n %{base_name}-services Summary: gRPC: Services Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-services A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-services. %package -n %{base_name}-servlet Summary: gRPC: Servlet Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-servlet A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-protobuf-servlet. %package -n %{base_name}-servlet-jakarta Summary: gRPC: Jakarta Servlet Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-servlet-jakarta A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-servlet-jakarta. %package -n %{base_name}-stub Summary: gRPC: Stub Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-stub A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-stub. %package -n %{base_name}-testing Summary: gRPC: Testing Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-testing A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-testing. %package -n %{base_name}-util Summary: gRPC: Util Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-util A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-util. %package -n %{base_name}-xds Summary: gRPC: XDS Plugin Group: Development/Libraries/Java BuildArch: noarch %description -n %{base_name}-xds A high performance, open source universal RPC framework. This package contains the artifact io.grpc:grpc-xds. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML BuildArch: noarch %description javadoc API documentation for %{name}. %prep %setup -q -n %{base_name}-%{version} cp %{SOURCE100} pom.xml cp %{SOURCE101} all/pom.xml cp %{SOURCE102} alts/pom.xml cp %{SOURCE103} api/pom.xml cp %{SOURCE104} auth/pom.xml cp %{SOURCE105} bom/pom.xml cp %{SOURCE106} context/pom.xml cp %{SOURCE107} core/pom.xml cp %{SOURCE108} grpclb/pom.xml cp %{SOURCE109} gcp-csm-observability/pom.xml cp %{SOURCE110} inprocess/pom.xml cp %{SOURCE111} netty/shaded/pom.xml cp %{SOURCE112} netty/pom.xml cp %{SOURCE113} okhttp/pom.xml cp %{SOURCE114} opentelemetry/pom.xml cp %{SOURCE115} protobuf-lite/pom.xml cp %{SOURCE116} protobuf/pom.xml cp %{SOURCE117} rls/pom.xml cp %{SOURCE118} services/pom.xml cp %{SOURCE119} servlet/jakarta/pom.xml cp %{SOURCE120} servlet/pom.xml cp %{SOURCE121} stub/pom.xml cp %{SOURCE122} testing/pom.xml cp %{SOURCE123} util/pom.xml cp %{SOURCE124} xds/pom.xml %pom_xpath_inject pom:project " src/main/proto " grpclb rls services #pom_xpath_set "pom:project/pom:artifactId" "grpc-netty-shaded" netty/shaded %pom_add_plugin "org.apache.maven.plugins:maven-shade-plugin:3.1.1" netty/shaded " package shade *:* META-INF/maven/io.netty/** META-INF/maven/io.grpc/grpc-netty/** io.grpc:grpc-netty io.netty:* io.grpc.netty io.grpc.netty.shaded.io.grpc.netty io.netty io.grpc.netty.shaded.io.netty META-INF/native/libnetty META-INF/native/libio_grpc_netty_shaded_netty META-INF/native/netty META-INF/native/io_grpc_netty_shaded_netty false com.github.fridrich netty-resource-transformers 0.0.0 " %pom_add_dep "io.grpc:grpc-netty:1.68.1:runtime" netty/shaded %pom_add_dep "io.netty:netty-tcnative:2.0.68.Final:runtime:linux-%{protoc_arch}" netty/shaded %pom_add_dep "org.apache.maven.plugins:maven-shade-plugin:3.1.1:provided" netty/shaded protoc --java_out grpclb/src/main/java \ grpclb/src/main/proto/grpc/lb/v1/load_balancer.proto protoc --grpc-java_out grpclb/src/main/java \ grpclb/src/main/proto/grpc/lb/v1/load_balancer.proto protoc --java_out rls/src/main/java \ rls/src/main/proto/grpc/lookup/v1/rls_config.proto \ rls/src/main/proto/grpc/lookup/v1/rls.proto protoc --grpc-java_out rls/src/main/java \ rls/src/main/proto/grpc/lookup/v1/rls_config.proto \ rls/src/main/proto/grpc/lookup/v1/rls.proto protoc --java_out services/src/main/java \ services/src/main/proto/grpc/binlog/v1/binarylog.proto \ services/src/main/proto/grpc/health/v1/health.proto \ services/src/main/proto/grpc/channelz/v1/channelz.proto \ services/src/main/proto/grpc/reflection/v1/reflection.proto \ services/src/main/proto/grpc/reflection/v1alpha/reflection.proto protoc --grpc-java_out services/src/main/java \ services/src/main/proto/grpc/binlog/v1/binarylog.proto \ services/src/main/proto/grpc/health/v1/health.proto \ services/src/main/proto/grpc/channelz/v1/channelz.proto \ services/src/main/proto/grpc/reflection/v1/reflection.proto \ services/src/main/proto/grpc/reflection/v1alpha/reflection.proto protoc --java_out alts/src/main/java -I alts/src/main/proto \ alts/src/main/proto/grpc/gcp/handshaker.proto \ alts/src/main/proto/grpc/gcp/altscontext.proto \ alts/src/main/proto/grpc/gcp/transport_security_common.proto protoc --grpc-java_out alts/src/main/java -I alts/src/main/proto \ alts/src/main/proto/grpc/gcp/handshaker.proto \ alts/src/main/proto/grpc/gcp/altscontext.proto \ alts/src/main/proto/grpc/gcp/transport_security_common.proto protoc --java_out xds/src/main/java \ -I xds/third_party/envoy/src/main/proto \ -I xds/third_party/cel-spec/src/main/proto \ -I xds/third_party/xds/src/main/proto \ -I xds/third_party/protoc-gen-validate/src/main/proto \ -I xds/third_party/googleapis/src/main/proto \ -I %{_prefix}/src/googleapis \ $(find xds/third_party -name \*.proto | xargs) protoc --grpc-java_out xds/src/main/java \ -I xds/third_party/envoy/src/main/proto \ -I xds/third_party/cel-spec/src/main/proto \ -I xds/third_party/xds/src/main/proto \ -I xds/third_party/protoc-gen-validate/src/main/proto \ -I xds/third_party/googleapis/src/main/proto \ -I %{_prefix}/src/googleapis \ $(find xds/third_party -name \*.proto | xargs) cp -r xds/third_party/zero-allocation-hashing/main/java/* xds/src/main/java/ # Clone the servlet sources for jakarta. namespace mkdir -p servlet/jakarta/src/main/java/io/grpc/servlet/jakarta cp -r servlet/src/main/java/io/grpc/servlet/* servlet/jakarta/src/main/java/io/grpc/servlet/jakarta/ sed -i -e s/javax.servlet/jakarta.servlet/ -e s/io.grpc.servlet/io.grpc.servlet.jakarta/\ $(find servlet/jakarta/src/main/java/io/grpc/servlet/jakarta -name \*.java | sort -u) %pom_change_dep -r :::runtime :::compile %pom_remove_dep -r org.codehaus.mojo:animal-sniffer-annotations %{java_remove_annotations} core -p "org.codehaus.mojo.animal_sniffer" %{java_remove_annotations} util -p "org.codehaus.mojo.animal_sniffer" %pom_remove_dep -r com.google.android:annotations %{java_remove_annotations} core -p "android.annotation" cp -r api/src/context/* api/src/main/ %pom_add_dep javax.servlet:javax.servlet-api:4.0.1:provided servlet %pom_add_dep jakarta.servlet:jakarta.servlet-api:6.1.0:provided servlet/jakarta %pom_change_dep com.google.auto.value:auto-value-annotations :::provided opentelemetry rls xds %pom_add_dep com.google.auto.value:auto-value:1.11.0:provided rls opentelemetry xds %pom_add_dep io.opencensus:opencensus-api:0.31.1:provided testing %pom_disable_module gcp-csm-observability # io.opentelemetry.contrib:opentelemetry-gcp-resources %pom_remove_dep -r :grpc-gcp-csm-observability %pom_disable_module okhttp # com.squareup.okio:okio %pom_remove_dep -r :grpc-okhttp %if %{without extras} %pom_disable_module all %pom_disable_module alts %pom_disable_module auth %pom_disable_module bom %pom_disable_module opentelemetry %pom_disable_module testing %pom_disable_module xds %else %pom_disable_module api %pom_disable_module context %pom_disable_module core %pom_disable_module grpclb %pom_disable_module inprocess %pom_disable_module netty %pom_disable_module netty/shaded %pom_disable_module protobuf %pom_disable_module protobuf-lite %pom_disable_module rls %pom_disable_module services %pom_disable_module servlet %pom_disable_module servlet/jakarta %pom_disable_module stub %pom_disable_module util %endif %{mvn_file} :grpc-{*} %{base_name}/@1 %{mvn_package} :aggregator __noinstall %{mvn_package} :grpc-{*} @1 %build %{mvn_build} -f -- -Dmaven.compiler.release=8 %install %mvn_install %fdupes -s %{buildroot}%{_javadocdir} #files -n %{base_name}-all -f .mfiles-all #license LICENSE what #doc README.md %if %{without extras} %files -n %{base_name}-api -f .mfiles-api %files -n %{base_name}-context -f .mfiles-context %files -n %{base_name}-core -f .mfiles-core %files -n %{base_name}-grpclb -f .mfiles-grpclb %files -n %{base_name}-inprocess -f .mfiles-inprocess %files -n %{base_name}-netty -f .mfiles-netty %files -n %{base_name}-netty-shaded -f .mfiles-netty-shaded %files -n %{base_name}-protobuf -f .mfiles-protobuf %files -n %{base_name}-protobuf-lite -f .mfiles-protobuf-lite %files -n %{base_name}-rls -f .mfiles-rls %files -n %{base_name}-services -f .mfiles-services %files -n %{base_name}-servlet -f .mfiles-servlet %files -n %{base_name}-servlet-jakarta -f .mfiles-servlet-jakarta %files -n %{base_name}-stub -f .mfiles-stub %files -n %{base_name}-util -f .mfiles-util %else %files -n %{base_name}-all -f .mfiles-all %files -n %{base_name}-alts -f .mfiles-alts %files -n %{base_name}-auth -f .mfiles-auth %files -n %{base_name}-bom -f .mfiles-bom %files -n %{base_name}-opentelemetry -f .mfiles-opentelemetry %files -n %{base_name}-testing -f .mfiles-testing %files -n %{base_name}-xds -f .mfiles-xds %endif %files javadoc -f .mfiles-javadoc %license LICENSE %changelog