Accepting request 290213 from devel:tools:building

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/290213
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/protobuf?expand=0&rev=21
This commit is contained in:
Dominique Leuenberger 2015-03-30 17:30:52 +00:00 committed by Git OBS Bridge
commit 44cf602bb1
7 changed files with 127 additions and 304 deletions

View File

@ -1,237 +0,0 @@
From d099ec11fc8c2eb97df2bf2fbb6996066eefca46 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Thu, 2 May 2013 10:43:47 +0200
Subject: [PATCH] Add generic GCC support for atomic operations
This is useful for architectures where no specialized code has been
written.
---
src/google/protobuf/stubs/atomicops.h | 2 +-
.../stubs/atomicops_internals_generic_gcc.h | 139 +++++++++++++++++++++
src/google/protobuf/stubs/platform_macros.h | 14 ++-
3 files changed, 153 insertions(+), 2 deletions(-)
create mode 100644 src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
Index: protobuf-2.5.0/src/google/protobuf/stubs/atomicops.h
===================================================================
--- protobuf-2.5.0.orig/src/google/protobuf/stubs/atomicops.h
+++ protobuf-2.5.0/src/google/protobuf/stubs/atomicops.h
@@ -185,7 +185,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#elif defined(__pnacl__)
#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
#else
-GOOGLE_PROTOBUF_ATOMICOPS_ERROR
+#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
#endif
// Unknown.
Index: protobuf-2.5.0/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
===================================================================
--- /dev/null
+++ protobuf-2.5.0/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
@@ -0,0 +1,139 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2013 Red Hat Inc. All rights reserved.
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Red Hat Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file is an internal atomic implementation, use atomicops.h instead.
+
+#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
+#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+ __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ return old_value;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
+ return __atomic_exchange_n(ptr, new_value, __ATOMIC_RELAXED);
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ return __atomic_add_fetch(ptr, increment, __ATOMIC_RELAXED);
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ return __atomic_add_fetch(ptr, increment, __ATOMIC_SEQ_CST);
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ __atomic_compare_exchange(ptr, &old_value, &new_value, true,
+ __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
+ return old_value;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
+ return old_value;
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+ __atomic_store_n(ptr, value, __ATOMIC_RELAXED);
+}
+
+inline void MemoryBarrier() {
+ __sync_synchronize();
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+ __atomic_store_n(ptr, value, __ATOMIC_ACQUIRE);
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+ __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+ return __atomic_load_n(ptr, __ATOMIC_RELAXED);
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+ return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+ return __atomic_load_n(ptr, __ATOMIC_RELEASE);
+}
+
+#ifdef __LP64__
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+ __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+ return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
+}
+
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+ __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
+ return old_value;
+}
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+ __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ return old_value;
+}
+
+#endif // defined(__LP64__)
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
Index: protobuf-2.5.0/src/google/protobuf/stubs/platform_macros.h
===================================================================
--- protobuf-2.5.0.orig/src/google/protobuf/stubs/platform_macros.h
+++ protobuf-2.5.0/src/google/protobuf/stubs/platform_macros.h
@@ -43,6 +43,9 @@
#elif defined(_M_IX86) || defined(__i386__)
#define GOOGLE_PROTOBUF_ARCH_IA32 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#elif defined(__aarch64__)
+#define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#elif defined(__QNX__)
#define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
@@ -54,9 +57,18 @@
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__pnacl__)
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(__ppc__)
+#elif defined(__ppc64__) || defined(__PPC64__)
+#define GOOGLE_PROTOBUF_ARCH_PPC64 1
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+#elif defined(__ppc__) || defined(__PPC__)
#define GOOGLE_PROTOBUF_ARCH_PPC 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#elif defined(__s390x__)
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+#define GOOGLE_PROTOBUF_ARCH_S390X 1
+#elif defined(__s390__)
+#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#define GOOGLE_PROTOBUF_ARCH_S390 1
#else
#error Host architecture was not detected as supported by protobuf
#endif
Index: protobuf-2.5.0/src/Makefile.am
===================================================================
--- protobuf-2.5.0.orig/src/Makefile.am
+++ protobuf-2.5.0/src/Makefile.am
@@ -47,6 +47,7 @@ nobase_include_HEADERS =
google/protobuf/stubs/atomicops_internals_pnacl.h \
google/protobuf/stubs/atomicops_internals_x86_gcc.h \
google/protobuf/stubs/atomicops_internals_x86_msvc.h \
+ google/protobuf/stubs/atomicops_internals_generic_gcc.h \
google/protobuf/stubs/common.h \
google/protobuf/stubs/platform_macros.h \
google/protobuf/stubs/once.h \
Index: protobuf-2.5.0/src/Makefile.in
===================================================================
--- protobuf-2.5.0.orig/src/Makefile.in
+++ protobuf-2.5.0/src/Makefile.in
@@ -314,6 +314,7 @@ am__nobase_include_HEADERS_DIST = google
google/protobuf/stubs/atomicops_internals_pnacl.h \
google/protobuf/stubs/atomicops_internals_x86_gcc.h \
google/protobuf/stubs/atomicops_internals_x86_msvc.h \
+ google/protobuf/stubs/atomicops_internals_generic_gcc.h \
google/protobuf/stubs/common.h \
google/protobuf/stubs/platform_macros.h \
google/protobuf/stubs/once.h \
@@ -523,6 +524,7 @@ nobase_include_HEADERS = \
google/protobuf/stubs/atomicops_internals_pnacl.h \
google/protobuf/stubs/atomicops_internals_x86_gcc.h \
google/protobuf/stubs/atomicops_internals_x86_msvc.h \
+ google/protobuf/stubs/atomicops_internals_generic_gcc.h \
google/protobuf/stubs/common.h \
google/protobuf/stubs/platform_macros.h \
google/protobuf/stubs/once.h \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677
size 1866763

3
protobuf-2.6.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910
size 2021416

View File

@ -0,0 +1,12 @@
Index: protobuf-2.6.1/src/google/protobuf/extension_set.cc
===================================================================
--- protobuf-2.6.1.orig/src/google/protobuf/extension_set.cc
+++ protobuf-2.6.1/src/google/protobuf/extension_set.cc
@@ -71,6 +71,7 @@ inline bool is_packable(WireFormatLite::
// Do not add a default statement. Let the compiler complain when someone
// adds a new wire type.
}
+ return true;
}
// Registry stuff.

View File

@ -1,7 +1,9 @@
python tries to auto download a newer version ... o_O python tries to auto download a newer version ... o_O
--- python/ez_setup.py Index: python/ez_setup.py
===================================================================
--- python/ez_setup.py.orig
+++ python/ez_setup.py +++ python/ez_setup.py
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@ the appropriate options to ``use_setupto
This file can also be run as a script to install or upgrade setuptools. This file can also be run as a script to install or upgrade setuptools.
""" """
import sys import sys

View File

@ -1,3 +1,55 @@
-------------------------------------------------------------------
Sat Feb 28 10:41:07 UTC 2015 - mpluskal@suse.com
- Add protobuf-return-no-nonvoid.patch
- Do not install examples
- Remove 0001-Add-generic-GCC-support-for-atomic-operations.patch
-------------------------------------------------------------------
Fri Feb 27 19:20:16 UTC 2015 - mpluskal@suse.com
- Use current url's
- Update dependencies
* python bindings now require recent python-google-apputils
which are available only in recet (13.1 and higher releases of
openSUSE)
- Update to 2.6.1
* Added atomicops support for Solaris.
* Released memory allocated by InitializeDefaultRepeatedFields()
and GetEmptyString(). Some memory sanitizers reported them
as memory leaks.
* Updated DynamicMessage.setField() to handle repeated enum
values correctly.
* Fixed a bug that caused NullPointerException to be thrown when
converting manually constructed FileDescriptorProto to
FileDescriptor.
- Changes for 2.6.0
* Added oneofs(unions) feature. Fields in the same oneof will
share memory and at most one field can be set at the same time.
* Files, services, enums, messages, methods and enum values
can be marked as deprecated now.
* Added Support for list values, including lists of mesaages,
when parsing text-formatted protos in C++ and Java.
* Enhanced customization on TestFormat printing.
* Added SwapFields() in reflection API to swap a subset of
fields.
* Added SetAllocatedMessage() in reflection API.
* Repeated primitive extensions are now packable. The
[packed=true] option only affects serializers. Therefore,
it is possible to switch a repeated extension field to
packed format without breaking backwards-compatibility.
* Various speed optimizations.
* writeTo() method in ByteString can now write a substring to
an output stream. Added endWith() method for ByteString.
* ByteString and ByteBuffer are now supported in CodedInputStream
and CodedOutputStream.
* java_generate_equals_and_hash can now be used with the
LITE_RUNTIME.
* A new C++-backed extension module (aka "cpp api v2") that
replaces the old ("cpp api v1") one. Much faster than the
pure Python code. This one resolves many bugs and is
recommended for general use over the pure Python when possible.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 5 13:38:45 UTC 2013 - sleep_walker@suse.cz Tue Nov 5 13:38:45 UTC 2013 - sleep_walker@suse.cz

View File

@ -1,7 +1,7 @@
# #
# spec file for package protobuf # spec file for package protobuf
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,34 +16,32 @@
# #
%define soname 8 %define soname 9
%bcond_without check %bcond_without check
Name: protobuf
Version: 2.6.1
Release: 0
Summary: Protocol Buffers - Google's data interchange format
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: https://github.com/google/protobuf/
Source0: https://github.com/google/protobuf/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Source1: manifest.txt.in
Source2: baselibs.conf
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 %if 0%{?fedora_version} > 8 || 0%{?mandriva_version} > 2008 || 0%{?suse_version} > 1030
%bcond_without protobuf_java %bcond_without protobuf_java
%else %else
%bcond_with protobuf_java %bcond_with protobuf_java
%endif %endif
%if 0%{?suse_version} > 1210 && 0%{?suse_version} != 1315
%if 0%{?suse_version} > 1100
%bcond_without protobuf_python %bcond_without protobuf_python
%else %else
%bcond_with protobuf_python %bcond_with protobuf_python
%endif %endif
Name: protobuf
Summary: Protocol Buffers - Google's data interchange format
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Version: 2.5.0
Release: 0
Url: http://code.google.com/p/protobuf/
Source0: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2
Source1: manifest.txt.in
Patch0: protobuf-setuptools-2.4.1.patch
Patch1: 0001-Add-generic-GCC-support-for-atomic-operations.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1010 %if 0%{?suse_version} > 1010
BuildRequires: fdupes BuildRequires: fdupes
%endif %endif
@ -51,12 +49,16 @@ BuildRequires: fdupes
BuildRequires: java-devel >= 1.6.0 BuildRequires: java-devel >= 1.6.0
%endif %endif
%if %{with protobuf_python} %if %{with protobuf_python}
BuildRequires: gcc-c++ BuildRequires: python-dateutil
BuildRequires: python
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-google-apputils >= 0.4.2
BuildRequires: python-python-gflags
BuildRequires: python-pytz
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: zlib-devel BuildRequires: zlib-devel
%endif %endif
BuildRequires: gcc-c++
BuildRequires: pkg-config
%description %description
Protocol Buffers are a way of encoding structured data in an efficient yet Protocol Buffers are a way of encoding structured data in an efficient yet
@ -94,37 +96,35 @@ RPC protocols and file formats.
Summary: Header files, libraries and development documentation for %{name} Summary: Header files, libraries and development documentation for %{name}
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: gcc-c++ Requires: gcc-c++
Requires: libprotobuf%{soname} = %version Requires: libprotobuf%{soname} = %{version}
Requires: libprotobuf-lite%{soname} Requires: libprotobuf-lite%{soname}
Provides: libprotobuf-devel = %version
Requires: zlib-devel Requires: zlib-devel
BuildRequires: pkg-config Provides: libprotobuf-devel = %{version}
%description devel %description devel
Development files for Google Protocol Buffers 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.
%if %{with protobuf_java} %if %{with protobuf_java}
%package -n %{name}-java %package -n %{name}-java
Requires: java >= 1.6.0
Summary: Java Bindings for Google Protocol Buffers Summary: Java Bindings for Google Protocol Buffers
Group: Development/Libraries/Java Group: Development/Libraries/Java
Requires: java >= 1.6.0
%description -n %{name}-java %description -n %{name}-java
This package contains the Java bindings for Google Protocol Buffers. This package contains the Java bindings for Google Protocol Buffers.
%endif %endif
%if %{with protobuf_python} %if %{with protobuf_python}
%package -n python-%{name} %package -n python-%{name}
Summary: Python Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
%if 0%{?suse_version} %if 0%{?suse_version}
%py_requires %py_requires
%else %else
Requires: python Requires: python
%endif %endif
Summary: Python Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
%description -n python-%{name} %description -n python-%{name}
This package contains the Python bindings for Google Protocol Buffers. This package contains the Python bindings for Google Protocol Buffers.
@ -133,7 +133,7 @@ This package contains the Python bindings for Google Protocol Buffers.
%prep %prep
%setup -q %setup -q
%patch0 -p0 %patch0
%patch1 -p1 %patch1 -p1
%build %build
@ -141,67 +141,65 @@ This package contains the Python bindings for Google Protocol Buffers.
#XXX something wents wrong with detecting this #XXX something wents wrong with detecting this
export PTHREAD_LIBS=-lpthread export PTHREAD_LIBS=-lpthread
%endif %endif
#
%configure --disable-static %configure \
%{__make} %{?jobs:-j%jobs} --disable-static
#
make %{?_smp_mflags}
%if %{with protobuf_java} %if %{with protobuf_java}
pushd java pushd java
../src/protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto ../src/protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto
%__mkdir classes mkdir classes
%if 0%{?suse_version} == 1110 %if 0%{?suse_version} == 1110
# 11.1 only workaround # 11.1 only workaround
# http://en.opensuse.org/Java/Packaging/Cookbook#bytecode_version_error # http://en.opensuse.org/Java/Packaging/Cookbook#bytecode_version_error
extra_java_flags="-target 1.5 -source 1.5" extra_java_flags="-target 1.5 -source 1.5"
%endif %endif
javac $extra_java_flags -d classes src/main/java/com/google/protobuf/*.java javac $extra_java_flags -d classes src/main/java/com/google/protobuf/*.java
sed -e 's/@VERSION@/%version/' < %{SOURCE1} > manifest.txt sed -e 's/@VERSION@/%{version}/' < %{SOURCE1} > manifest.txt
jar cfm %{name}-java-%{version}.jar manifest.txt -C classes com jar cfm %{name}-java-%{version}.jar manifest.txt -C classes com
popd popd
%endif %endif
#
%if %{with protobuf_python} %if %{with protobuf_python}
pushd python pushd python
%__python setup.py build python setup.py build
popd popd
%endif %endif
%if %{with check} %if %{with check}
%check %check
%{__make} check %{?jobs:-j%jobs} make %{?_smp_mflags} check
%endif %endif
%install %install
%makeinstall make DESTDIR=%{buildroot} install %{?_smp_mflags}
%__install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
# no need for that # no need for that
/bin/rm %{buildroot}%{_libdir}/*.la find %{buildroot} -type f -name "*.la" -delete -print
#
%if %{with protobuf_java} %if %{with protobuf_java}
pushd java pushd java
%__install -D -m 0644 %{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}-java-%{version}.jar install -D -m 0644 %{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}-java-%{version}.jar
%__ln_s %{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}-java.jar ln -s %{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}-java.jar
%__ln_s %{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar ln -s %{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
popd popd
%endif %endif
#
%if %{with protobuf_python} %if %{with protobuf_python}
pushd python pushd python
%__python setup.py install --skip-build \ python setup.py install --skip-build \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--install-data=%{_datadir} \ --install-data=%{_datadir} \
--root %{buildroot} \ --root %{buildroot} \
--record-rpm=INSTALLED_FILES --record-rpm=INSTALLED_FILES
popd popd
%endif %endif
#
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}%{py_sitedir}/%{name}-%{version}-py%{py_ver}.egg-info
%endif
%clean %if 0%{?suse_version} > 1010
rm -rf $RPM_BUILD_ROOT; %fdupes -s %{buildroot}%{py_sitedir}
%endif
%post -n libprotobuf%{soname} -p /sbin/ldconfig %post -n libprotobuf%{soname} -p /sbin/ldconfig
@ -229,9 +227,7 @@ rm -rf $RPM_BUILD_ROOT;
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING.txt %doc CHANGES.txt CONTRIBUTORS.txt README.md
%doc CHANGES.txt CONTRIBUTORS.txt README.txt
%doc examples
%{_bindir}/protoc %{_bindir}/protoc
%{_includedir}/google %{_includedir}/google
%{_libdir}/*.so %{_libdir}/*.so
@ -239,14 +235,12 @@ rm -rf $RPM_BUILD_ROOT;
%{_datadir}/vim %{_datadir}/vim
%if %{with protobuf_java} %if %{with protobuf_java}
%files -n %{name}-java %files -n %{name}-java
%defattr(-,root,root) %defattr(-,root,root)
%{_javadir}/protobuf* %{_javadir}/protobuf*
%endif %endif
%if %{with protobuf_python} %if %{with protobuf_python}
%files -n python-%{name} -f python/INSTALLED_FILES %files -n python-%{name} -f python/INSTALLED_FILES
%defattr(-,root,root) %defattr(-,root,root)
%endif %endif