Accepting request 445256 from home:StefanBruens:branches:devel:tools:building

preparation for protobuf update to 3.1.0
next steps:
- copy protobuf to protobuf2, to keep provider of libprotobuf.so.9
- update protobuf to 3.1.0, providing libprotobuf.so.11

Also see https://build.opensuse.org/request/show/441283

OBS-URL: https://build.opensuse.org/request/show/445256
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=45
This commit is contained in:
Martin Pluskal 2016-12-12 07:14:04 +00:00 committed by Git OBS Bridge
parent a0cc7759ba
commit 28c9fb95a8
2 changed files with 15 additions and 23 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Dec 10 19:24:18 UTC 2016 - stefan.bruens@rwth-aachen.de
- Cleanup specfile:
* remove any conditionals for versions predating SLES 12/Leap 42.x
* add Provides: protobuf-libs to fix rpmlint warning
-------------------------------------------------------------------
Mon Dec 7 04:17:12 UTC 2015 - lnussel@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package protobuf
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,6 +18,8 @@
%define soname 9
%bcond_without check
%bcond_without protobuf_java
%bcond_without protobuf_python
Name: protobuf
Version: 2.6.1
Release: 0
@ -32,19 +34,9 @@ Patch0: protobuf-setuptools-2.4.1.patch
# fix no-return-in-nonvoid-function google/protobuf/extension_set.cc:74
Patch1: protobuf-return-no-nonvoid.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?fedora_version} > 8 || 0%{?mandriva_version} > 2008 || 0%{?suse_version} > 1030
%bcond_without protobuf_java
%else
%bcond_with protobuf_java
%endif
%if 0%{?suse_version} < 1210
%bcond_with protobuf_python
%else
%bcond_without protobuf_python
%endif
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
BuildRequires: gcc-c++
BuildRequires: pkg-config
%if %{with protobuf_java}
BuildRequires: java-devel >= 1.6.0
%endif
@ -56,8 +48,6 @@ BuildRequires: python-pytz
BuildRequires: python-setuptools
BuildRequires: zlib-devel
%endif
BuildRequires: gcc-c++
BuildRequires: pkg-config
%description
Protocol Buffers are a way of encoding structured data in an efficient yet
@ -67,6 +57,7 @@ RPC protocols and file formats.
%package -n libprotobuf%{soname}
Summary: Protocol Buffers - Google's data interchange format
Group: System/Libraries
Provides: %{name}-libs = %{version}
%description -n libprotobuf%{soname}
Protocol Buffers are a way of encoding structured data in an efficient yet
@ -94,6 +85,7 @@ RPC protocols and file formats.
%package devel
Summary: Header files, libraries and development documentation for %{name}
Group: Development/Libraries/C and C++
Requires: %{name}-libs = %{version}
Requires: gcc-c++
Requires: libprotobuf%{soname} = %{version}
Requires: libprotobuf-lite%{soname}
@ -157,12 +149,7 @@ make %{?_smp_mflags}
pushd java
../src/protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto
mkdir classes
%if 0%{?suse_version} == 1110
# 11.1 only workaround
# http://en.opensuse.org/Java/Packaging/Cookbook#bytecode_version_error
extra_java_flags="-target 1.5 -source 1.5"
%endif
javac $extra_java_flags -d classes src/main/java/com/google/protobuf/*.java
javac -d classes src/main/java/com/google/protobuf/*.java
sed -e 's/@VERSION@/%{version}/' < %{SOURCE1} > manifest.txt
jar cfm %{name}-java-%{version}.jar manifest.txt -C classes com
popd
@ -203,9 +190,7 @@ python setup.py install --skip-build \
popd
%endif
%if 0%{?suse_version} > 1010
%fdupes -s %{buildroot}%{py_sitedir}
%endif
%post -n libprotobuf%{soname} -p /sbin/ldconfig