forked from pool/protobuf
Accepting request 447591 from devel:tools:building
1 OBS-URL: https://build.opensuse.org/request/show/447591 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/protobuf?expand=0&rev=25
This commit is contained in:
commit
d01e280d88
@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 16 03:33:01 UTC 2016 - stefan.bruens@rwth-aachen.de
|
||||||
|
|
||||||
|
- Use py_sitedir for library installation with setup.py install
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 14 07:32:06 UTC 2016 - mpluskal@suse.com
|
||||||
|
|
||||||
|
- Drop protobuf-libs as it is just workaround for rpmlint issue
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
Mon Dec 7 04:17:12 UTC 2015 - lnussel@suse.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package protobuf
|
# 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
|
# 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
|
||||||
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
%define soname 9
|
%define soname 9
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
%bcond_without protobuf_java
|
||||||
|
%bcond_without protobuf_python
|
||||||
Name: protobuf
|
Name: protobuf
|
||||||
Version: 2.6.1
|
Version: 2.6.1
|
||||||
Release: 0
|
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
|
# fix no-return-in-nonvoid-function google/protobuf/extension_set.cc:74
|
||||||
Patch1: protobuf-return-no-nonvoid.patch
|
Patch1: protobuf-return-no-nonvoid.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
BuildRequires: fdupes
|
||||||
%endif
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: pkg-config
|
||||||
%if %{with protobuf_java}
|
%if %{with protobuf_java}
|
||||||
BuildRequires: java-devel >= 1.6.0
|
BuildRequires: java-devel >= 1.6.0
|
||||||
%endif
|
%endif
|
||||||
@ -56,8 +48,6 @@ 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
|
||||||
@ -157,12 +147,7 @@ make %{?_smp_mflags}
|
|||||||
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
|
javac -d classes src/main/java/com/google/protobuf/*.java
|
||||||
# 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
|
|
||||||
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
|
||||||
@ -195,17 +180,17 @@ popd
|
|||||||
|
|
||||||
%if %{with protobuf_python}
|
%if %{with protobuf_python}
|
||||||
pushd python
|
pushd python
|
||||||
|
python setup.py clean
|
||||||
python setup.py install --skip-build \
|
python setup.py install --skip-build \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--install-data=%{_datadir} \
|
|
||||||
--root %{buildroot} \
|
--root %{buildroot} \
|
||||||
|
--install-lib=%{py_sitedir} \
|
||||||
|
--install-data=%{_datadir} \
|
||||||
--record-rpm=INSTALLED_FILES
|
--record-rpm=INSTALLED_FILES
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1010
|
|
||||||
%fdupes -s %{buildroot}%{py_sitedir}
|
%fdupes -s %{buildroot}%{py_sitedir}
|
||||||
%endif
|
|
||||||
|
|
||||||
%post -n libprotobuf%{soname} -p /sbin/ldconfig
|
%post -n libprotobuf%{soname} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user