revert some of the changes that would make upgrades a pain

OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=195
This commit is contained in:
2024-10-28 10:24:05 +00:00
committed by Git OBS Bridge
parent c9b8c58def
commit 3e6097693c
5 changed files with 69 additions and 145 deletions

View File

@@ -22,9 +22,6 @@ Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Thu Oct 24 20:56:51 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- C++: split a compiler subpackage from the devel one.
Allows using the protoc compiler without having to install all the
headers and static libraries
- Added patch: static-utf8-ranges.patch
* Build the libutf8_range and libutf8_validity as static library
to avoid installcheck failures
@@ -41,13 +38,6 @@ Mon Oct 21 20:55:21 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Java: mimic the bazel build and build also the protobuf-javalite
artifact
- Java: put the runtime artifacts to a protobuf-java-runtime package
and the protoc metadata into protobuf-java-protoc package.
* allows to make the runtime noarch
* keep the protoc subpackage archful
- Java: Let protobuf-java-runtime provide and obsolete protobuf-java
to render upgrade easier after we changed to the upstream
versioning for java bindings
-------------------------------------------------------------------
Mon Oct 21 13:27:27 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -18,61 +18,21 @@
%define tarname protobuf
%define baseversion 28.3
%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
# 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
Name: protobuf-java
Version: 4.%{baseversion}
Version: 28.3
Release: 0
Summary: Java Bindings for Google Protocol Buffers
License: BSD-3-Clause
Group: Development/Libraries/Java
URL: https://github.com/protocolbuffers/protobuf
Source0: https://github.com/protocolbuffers/protobuf/releases/download/v%{baseversion}/%{tarname}-%{baseversion}.tar.gz
Source1: https://repo1.maven.org/maven2/com/google/protobuf/%{name}/%{version}/%{name}-%{version}.pom
Source2: https://repo1.maven.org/maven2/com/google/protobuf/%{name}lite/%{version}/%{name}lite-%{version}.pom
Source3: https://repo1.maven.org/maven2/com/google/protobuf/%{name}-util/%{version}/%{name}-util-%{version}.pom
Source0: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}/%{tarname}-%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/com/google/protobuf/%{name}/%{version}/%{name}-4.%{version}.pom
Source2: https://repo1.maven.org/maven2/com/google/protobuf/%{name}lite/%{version}/%{name}lite-4.%{version}.pom
Source3: https://repo1.maven.org/maven2/com/google/protobuf/%{name}-util/%{version}/%{name}-util-4.%{version}.pom
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: protobuf-compiler >= %{baseversion}
BuildRequires: protobuf-devel >= %{version}
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(com.google.code.gson:gson)
BuildRequires: mvn(com.google.errorprone:error_prone_annotations)
@@ -80,6 +40,7 @@ BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(com.google.j2objc:j2objc-annotations)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
Requires: java >= 1.8
BuildArch: noarch
%description
Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -88,33 +49,8 @@ RPC protocols and file formats.
This package contains the Java bindings.
%package runtime
Summary: Java Bindings for Google Protocol Buffers
Provides: %{name} = %{baseversion}
Obsoletes: %{name} < %{baseversion}
BuildArch: noarch
%description runtime
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.
This package contains the runtime for Java bindings.
%package protoc
Summary: Java Bindings for Google Protocol Buffers (maven metadata for protoc)
Requires: %{tarname}-compiler >= %{baseversion}
%description protoc
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.
This package contains the maven artifact metadata to describe the protoc binary.
%package parent
Summary: Java Bindings for Google Protocol Buffers (parent pom)
BuildArch: noarch
%description parent
Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -125,7 +61,6 @@ This package contains the parent pom of the Java bindings.
%package bom
Summary: Java Bindings for Google Protocol Buffers (bom)
BuildArch: noarch
%description bom
Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -137,13 +72,12 @@ This package contains the bill-of-materials pom of the Java bindings.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
BuildArch: noarch
%description javadoc
This package contains the API documentation for %{name}.
%prep
%autosetup -p1 -n %{tarname}-%{baseversion}
%autosetup -p1 -n %{tarname}-%{version}
# The previous blank line is crucial for older system being able
# to use the autosetup macro
@@ -335,30 +269,10 @@ popd
pushd java
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
# create maven metadata for the protoc executable
install -dm 0755 %{buildroot}%{_datadir}/maven-metadata
cat <<__PROTOBUF__ >>%{buildroot}%{_datadir}/maven-metadata/%{name}-protoc.xml
<metadata xmlns="http://fedorahosted.org/xmvn/METADATA/2.3.0">
<artifacts>
<artifact>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<extension>exe</extension>
<classifier>linux-%{protoc_arch}</classifier>
<version>%{version}</version>
<path>$(type -p protoc)</path>
</artifact>
</artifacts>
</metadata>
__PROTOBUF__
popd
%files runtime -f java/.mfiles
%files -f java/.mfiles
%license LICENSE
%files protoc
%{_datadir}/maven-metadata/%{name}-protoc.xml
%files bom -f java/.mfiles-bom
%files parent -f java/.mfiles-parent

View File

@@ -22,9 +22,6 @@ Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Thu Oct 24 20:56:51 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- C++: split a compiler subpackage from the devel one.
Allows using the protoc compiler without having to install all the
headers and static libraries
- Added patch: static-utf8-ranges.patch
* Build the libutf8_range and libutf8_validity as static library
to avoid installcheck failures
@@ -41,13 +38,6 @@ Mon Oct 21 20:55:21 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Java: mimic the bazel build and build also the protobuf-javalite
artifact
- Java: put the runtime artifacts to a protobuf-java-runtime package
and the protoc metadata into protobuf-java-protoc package.
* allows to make the runtime noarch
* keep the protoc subpackage archful
- Java: Let protobuf-java-runtime provide and obsolete protobuf-java
to render upgrade easier after we changed to the upstream
versioning for java bindings
-------------------------------------------------------------------
Mon Oct 21 13:27:27 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -26,6 +26,45 @@
%endif
# requires gmock, which is not yet in the distribution
%bcond_with check
%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
# 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
Name: protobuf
Version: 28.3
Release: 0
@@ -86,22 +125,6 @@ Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.
%package compiler
Summary: Protocol Buffers compiler
Group: Development/Libraries/C and C++
Conflicts: protobuf2-devel
Conflicts: protobuf21-devel
Provides: protobuf-devel:/usr/bin/protoc
Provides: protoc = %{version}
%description compiler
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.
This package contains Protocol Buffers compiler for all programming
languages
%package -n libprotobuf%{sover}
Summary: Protocol Buffers - Google's data interchange format
Group: System/Libraries
@@ -138,6 +161,8 @@ Requires: libprotobuf-lite%{sover}
Conflicts: protobuf2-devel
Conflicts: protobuf21-devel
Provides: libprotobuf-devel = %{version}
# Not generated automatically without javapackages-local as dependency
Provides: mvn(com.google.protobuf:protoc:exe:linux-%{protoc_arch}:)
%description devel
Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -171,6 +196,23 @@ export CC=gcc-%{with_gcc}
%cmake_install
install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
# create maven metadata for the protoc executable
install -dm 0755 %{buildroot}%{_datadir}/maven-metadata
cat <<__PROTOBUF__ >>%{buildroot}%{_datadir}/maven-metadata/%{name}-protoc.xml
<metadata xmlns="http://fedorahosted.org/xmvn/METADATA/2.3.0">
<artifacts>
<artifact>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<extension>exe</extension>
<classifier>linux-%{protoc_arch}</classifier>
<version>4.%{version}</version>
<path>%{_bindir}/protoc</path>
</artifact>
</artifacts>
</metadata>
__PROTOBUF__
%fdupes %{buildroot}%{_prefix}
# SLE12 does not define this macro
@@ -187,10 +229,6 @@ install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto
%ldconfig_scriptlets -n libprotobuf-lite%{sover}
%endif
%files compiler
%{_bindir}/protoc*
%license LICENSE
%files -n libprotobuf%{sover}
%license LICENSE
%{_libdir}/libprotobuf.so.%{version}.0
@@ -206,6 +244,7 @@ install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto
%files devel
%license LICENSE
%doc CONTRIBUTORS.txt README.md
%{_bindir}/protoc*
%{_includedir}/google
%dir %{_includedir}/java
%dir %{_includedir}/java/core
@@ -229,5 +268,6 @@ install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto
%{_libdir}/libutf8_range.a
%{_libdir}/libutf8_validity.a
%{_datadir}/vim
%{_datadir}/maven-metadata
%changelog

View File

@@ -22,9 +22,6 @@ Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Thu Oct 24 20:56:51 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- C++: split a compiler subpackage from the devel one.
Allows using the protoc compiler without having to install all the
headers and static libraries
- Added patch: static-utf8-ranges.patch
* Build the libutf8_range and libutf8_validity as static library
to avoid installcheck failures
@@ -41,13 +38,6 @@ Mon Oct 21 20:55:21 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Java: mimic the bazel build and build also the protobuf-javalite
artifact
- Java: put the runtime artifacts to a protobuf-java-runtime package
and the protoc metadata into protobuf-java-protoc package.
* allows to make the runtime noarch
* keep the protoc subpackage archful
- Java: Let protobuf-java-runtime provide and obsolete protobuf-java
to render upgrade easier after we changed to the upstream
versioning for java bindings
-------------------------------------------------------------------
Mon Oct 21 13:27:27 UTC 2024 - Dirk Müller <dmueller@suse.com>