Fix java arch conditional evaluated at SRPM build time
This commit is contained in:
parent
c33c17a19b
commit
029fb3ee17
@ -7,11 +7,7 @@
|
|||||||
%if %{defined rhel}
|
%if %{defined rhel}
|
||||||
%bcond_with java
|
%bcond_with java
|
||||||
%else
|
%else
|
||||||
%ifarch %{java_arches}
|
|
||||||
%bcond_without java
|
%bcond_without java
|
||||||
%else
|
|
||||||
%bcond_with java
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#global rcver rc2
|
#global rcver rc2
|
||||||
@ -108,6 +104,7 @@ BuildRequires: gcc-c++
|
|||||||
BuildRequires: emacs
|
BuildRequires: emacs
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
|
%if %{with java}
|
||||||
%ifnarch %{java_arches}
|
%ifnarch %{java_arches}
|
||||||
Obsoletes: protobuf-java-util < 3.19.4-4
|
Obsoletes: protobuf-java-util < 3.19.4-4
|
||||||
Obsoletes: protobuf-javadoc < 3.19.4-4
|
Obsoletes: protobuf-javadoc < 3.19.4-4
|
||||||
@ -115,6 +112,7 @@ Obsoletes: protobuf-parent < 3.19.4-4
|
|||||||
Obsoletes: protobuf-bom < 3.19.4-4
|
Obsoletes: protobuf-bom < 3.19.4-4
|
||||||
Obsoletes: protobuf-javalite < 3.19.4-4
|
Obsoletes: protobuf-javalite < 3.19.4-4
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Protocol Buffers are a way of encoding structured data in an efficient
|
Protocol Buffers are a way of encoding structured data in an efficient
|
||||||
@ -207,6 +205,8 @@ descriptions in Vim editor
|
|||||||
|
|
||||||
|
|
||||||
%if %{with java}
|
%if %{with java}
|
||||||
|
%ifarch %{java_arches}
|
||||||
|
|
||||||
%package java
|
%package java
|
||||||
Summary: Java Protocol Buffers runtime library
|
Summary: Java Protocol Buffers runtime library
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -264,6 +264,7 @@ BuildArch: noarch
|
|||||||
%description bom
|
%description bom
|
||||||
Protocol Buffer BOM POM.
|
Protocol Buffer BOM POM.
|
||||||
|
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package emacs
|
%package emacs
|
||||||
@ -296,6 +297,7 @@ mv '../%{gtest_dir}' 'third_party/googletest'
|
|||||||
find -name \*.cc -o -name \*.h | xargs chmod -x
|
find -name \*.cc -o -name \*.h | xargs chmod -x
|
||||||
chmod 644 examples/*
|
chmod 644 examples/*
|
||||||
%if %{with java}
|
%if %{with java}
|
||||||
|
%ifarch %{java_arches}
|
||||||
%pom_remove_dep com.google.errorprone:error_prone_annotations java/util/pom.xml
|
%pom_remove_dep com.google.errorprone:error_prone_annotations java/util/pom.xml
|
||||||
%pom_remove_dep com.google.j2objc:j2objc-annotations java/util/pom.xml
|
%pom_remove_dep com.google.j2objc:j2objc-annotations java/util/pom.xml
|
||||||
|
|
||||||
@ -315,6 +317,7 @@ find -name '*.java' | xargs sed -ri \
|
|||||||
# Backward compatibility symlink
|
# Backward compatibility symlink
|
||||||
%mvn_file :protobuf-java:jar: protobuf/protobuf-java protobuf
|
%mvn_file :protobuf-java:jar: protobuf/protobuf-java protobuf
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
rm -f src/solaris/libstdc++.la
|
rm -f src/solaris/libstdc++.la
|
||||||
|
|
||||||
@ -339,6 +342,7 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with java}
|
%if %{with java}
|
||||||
|
%ifarch %{java_arches}
|
||||||
%ifarch %{ix86} s390x
|
%ifarch %{ix86} s390x
|
||||||
export MAVEN_OPTS=-Xmx1024m
|
export MAVEN_OPTS=-Xmx1024m
|
||||||
%endif
|
%endif
|
||||||
@ -346,6 +350,7 @@ export MAVEN_OPTS=-Xmx1024m
|
|||||||
%pom_disable_module kotlin-lite java/pom.xml
|
%pom_disable_module kotlin-lite java/pom.xml
|
||||||
%mvn_build -s -- -f java/pom.xml
|
%mvn_build -s -- -f java/pom.xml
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%{_emacs_bytecompile} editors/protobuf-mode.el
|
%{_emacs_bytecompile} editors/protobuf-mode.el
|
||||||
|
|
||||||
@ -373,8 +378,10 @@ install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/pr
|
|||||||
install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim
|
install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim
|
||||||
|
|
||||||
%if %{with java}
|
%if %{with java}
|
||||||
|
%ifarch %{java_arches}
|
||||||
%mvn_install
|
%mvn_install
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_emacs_sitelispdir}/protobuf
|
mkdir -p %{buildroot}%{_emacs_sitelispdir}/protobuf
|
||||||
install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/protobuf
|
install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/protobuf
|
||||||
@ -439,6 +446,8 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}
|
|||||||
%{_datadir}/vim/vimfiles/syntax/proto.vim
|
%{_datadir}/vim/vimfiles/syntax/proto.vim
|
||||||
|
|
||||||
%if %{with java}
|
%if %{with java}
|
||||||
|
%ifarch %{java_arches}
|
||||||
|
|
||||||
%files java -f .mfiles-protobuf-java
|
%files java -f .mfiles-protobuf-java
|
||||||
%doc examples/AddPerson.java examples/ListPeople.java
|
%doc examples/AddPerson.java examples/ListPeople.java
|
||||||
%doc java/README.md
|
%doc java/README.md
|
||||||
@ -458,6 +467,8 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}
|
|||||||
|
|
||||||
%files javalite -f .mfiles-protobuf-javalite
|
%files javalite -f .mfiles-protobuf-javalite
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user