From a71dffe8fe633830a274568c4b910f57073e0ef7 Mon Sep 17 00:00:00 2001 From: jackie_wu Date: Wed, 12 Aug 2020 11:17:20 +0800 Subject: [PATCH] enhace java function and fix build errors --- protobuf.spec | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/protobuf.spec b/protobuf.spec index 0fcb682..0390eb2 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -1,14 +1,14 @@ # Build -python subpackage %bcond_without python # Build -java subpackage -%bcond_with java +%bcond_without java #global rcver rc2 Summary: Protocol Buffers - Google's data interchange format Name: protobuf Version: 3.12.3 -Release: 11 +Release: 12 License: BSD URL: https://github.com/protocolbuffers/protobuf Source: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}%{?rcver}/%{name}-all-%{version}%{?rcver}.tar.gz @@ -102,6 +102,13 @@ Obsoletes: %{name}-javanano < 3.6.0 %description java This package contains Java Protocol Buffers runtime library. +%package javalite +Summary: Java Protocol Buffers lite runtime library +BuildArch: noarch + +%description javalite +This package contains Java Protocol Buffers lite runtime library. + %package java-util Summary: Utilities for Protocol Buffers BuildArch: noarch @@ -124,6 +131,13 @@ BuildArch: noarch %description parent Protocol Buffer Parent POM. +%package bom +Summary: Protocol Buffer BOM POM +BuildArch: noarch + +%description bom +Protocol Buffer BOM POM. + %endif %prep @@ -132,12 +146,26 @@ Protocol Buffer Parent POM. find -name \*.cc -o -name \*.h | xargs chmod -x chmod 644 examples/* %if %{with java} -%pom_remove_parent java/pom.xml -%pom_remove_dep org.easymock:easymockclassextension java/pom.xml java/*/pom.xml +#%pom_remove_dep com.google.truth:truth java/pom.xml +#%pom_remove_dep org.easymock:easymockclassextension java/pom.xml java/*/pom.xml +%pom_remove_dep org.easymock:easymockclassextension java/pom.xml java/core/pom.xml java/lite/pom.xml java/util/pom.xml +%pom_remove_dep com.google.truth:truth java/pom.xml java/util/pom.xml java/lite/pom.xml java/core/pom.xml +%pom_remove_dep com.google.errorprone:error_prone_annotations java/util/pom.xml +%pom_remove_dep com.google.guava:guava-testlib java/pom.xml java/util/pom.xml + # These use easymockclassextension rm java/core/src/test/java/com/google/protobuf/ServiceTest.java + #rm -r java/core/src/test +# These use truth or error_prone_annotations or guava-testlib +rm java/core/src/test/java/com/google/protobuf/LiteralByteStringTest.java +rm java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java +rm java/core/src/test/java/com/google/protobuf/RopeByteStringTest.java +rm java/core/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java +rm -r java/util/src/test/java/com/google/protobuf/util +rm -r java/util/src/main/java/com/google/protobuf/util + # Make OSGi dependency on sun.misc package optional %pom_xpath_inject "pom:configuration/pom:instructions" "sun.misc;resolution:=optional,*" java/core @@ -149,6 +177,8 @@ rm java/core/src/test/java/com/google/protobuf/ServiceTest.java %ifarch %{arm} mv java/core/src/test/java/com/google/protobuf/IsValidUtf8Test.java \ java/core/src/test/java/com/google/protobuf/IsValidUtf8Test.java.slow +mv java/core/src/test/java/com/google/protobuf/DecodeUtf8Test.java \ + java/core/src/test/java/com/google/protobuf/DecodeUtf8Test.java.slow %endif %endif @@ -265,9 +295,18 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %files parent -f .mfiles-protobuf-parent %license LICENSE + +%files bom -f .mfiles-protobuf-bom +%license LICENSE + +%files javalite -f .mfiles-protobuf-javalite +%license LICENSE %endif %changelog +* Wed Aug 12 2020 wutao - 3.12.3-12 +- enhace java function and fix build errors + * Thu Jul 23 2020 openEuler Buildteam - 3.12.3-11 - Type:enhancement - ID:NA -- Gitee