forked from pool/protobuf
Accepting request 664445 from home:mrostecki
- Add protobuf-source package - some programs using gRPC and protobuf need protobuf definitions which are included inside the source code, but are not included in the devel package. OBS-URL: https://build.opensuse.org/request/show/664445 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=68
This commit is contained in:
committed by
Git OBS Bridge
parent
34c6e8bb26
commit
4f4d4fffae
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 8 12:35:43 UTC 2019 - Michał Rostecki <mrostecki@suse.de>
|
||||
|
||||
- Add protobuf-source package - some programs using gRPC and
|
||||
protobuf need protobuf definitions which are included inside the
|
||||
source code, but are not included in the devel package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 17 10:28:51 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package protobuf
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 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
|
||||
@@ -19,6 +19,7 @@
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define sover 17
|
||||
%define tarname protobuf
|
||||
%define src_install_dir /usr/src/%{name}
|
||||
# requires gmock, which is not yet in the distribution
|
||||
%bcond_with check
|
||||
%bcond_without java
|
||||
@@ -102,6 +103,18 @@ 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 source
|
||||
Summary: Source code of protobuf
|
||||
Group: Development/Sources
|
||||
BuildArch: noarch
|
||||
|
||||
%description source
|
||||
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 source code for Protocol Buffers.
|
||||
|
||||
%package -n %{name}-java
|
||||
Summary: Java Bindings for Google Protocol Buffers
|
||||
Group: Development/Libraries/Java
|
||||
@@ -190,6 +203,26 @@ pushd python
|
||||
popd
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
mkdir -p %{buildroot}%{src_install_dir}
|
||||
tar -xzf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir}
|
||||
%fdupes %{buildroot}%{src_install_dir}
|
||||
# Fix env-script-interpreter rpmlint error
|
||||
find %{buildroot}%{src_install_dir} -type f -name "*.js" -exec sed -i 's|#!.*/usr/bin/env node|#!/usr/bin/node|' "{}" +
|
||||
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python2.7|#!/usr/bin/python2.7|' "{}" +
|
||||
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python|#!/usr/bin/python|' "{}" +
|
||||
find %{buildroot}%{src_install_dir} -type f -name "*.rb" -exec sed -i 's|#!.*/usr/bin/env ruby|#!/usr/bin/ruby|' "{}" +
|
||||
find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*/usr/bin/env bash|#!/bin/bash|' "{}" +
|
||||
# And stop requiring ridiculously old Python version
|
||||
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!/usr/bin/python2.4|#!/usr/bin/python2.7|' "{}" +
|
||||
# Fix spurious-executable-perm rpmlint error
|
||||
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/arenastring.h
|
||||
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/compiler/js/js_generator.h
|
||||
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/reflection.h
|
||||
# Fix version-control-internal-file rpmlint warning
|
||||
find %{buildroot}%{src_install_dir} -type f -name ".gitignore" -exec rm -f "{}" +
|
||||
|
||||
%fdupes %{buildroot}%{_prefix}
|
||||
|
||||
%post -n libprotobuf%{sover} -p /sbin/ldconfig
|
||||
%postun -n libprotobuf%{sover} -p /sbin/ldconfig
|
||||
%post -n libprotoc%{sover} -p /sbin/ldconfig
|
||||
@@ -215,6 +248,9 @@ popd
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_datadir}/vim
|
||||
|
||||
%files source
|
||||
%{src_install_dir}
|
||||
|
||||
%if %{with java}
|
||||
%files -n %{name}-java
|
||||
%{_javadir}/protobuf*
|
||||
|
Reference in New Issue
Block a user