diff --git a/grpc.changes b/grpc.changes index fe60d8c..0c069f8 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jan 7 11:39:15 UTC 2019 - MichaƂ Rostecki + +- Add grpc-source package - some Go programs using gRPC need + protobuf definitions which are included inside the source code, + but are not included in the devel package. + ------------------------------------------------------------------- Sun Nov 11 17:57:35 UTC 2018 - Jan Engelhardt diff --git a/grpc.spec b/grpc.spec index d1397ff..0ca3e43 100644 --- a/grpc.spec +++ b/grpc.spec @@ -1,7 +1,7 @@ # # spec file for package grpc # -# 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 @@ -17,6 +17,7 @@ %define lname libgrpc6 +%define src_install_dir /usr/src/%{name} %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: grpc Version: 1.16 @@ -63,6 +64,14 @@ Requires: %lname = %version This subpackage contains libraries and header files for developing applications that want to make use of the gRPC reference implementation. +%package source +Summary: Source code of gRPC +Group: Development/sources +BuildArch: noarch + +%description -n grpc-source +This subpackage contains source code of the gRPC reference implementation. + %package -n python2-grpcio Summary: Python language bindings for grpc, a HTTP/2 Remote Procedure Call implementation Group: Development/Libraries/Python @@ -110,6 +119,15 @@ fi popd %python_install +# Install sources +mkdir -p %{buildroot}%{src_install_dir} +tar -xzf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir} +# Fix env-script-interpreter rpmlint error +find %{buildroot}%{src_install_dir} -type f -exec sed -i 's|#!/usr/bin/env bash|#!/bin/bash|' "{}" + +find %{buildroot}%{src_install_dir} -type f -exec sed -i 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' "{}" + +find %{buildroot}%{src_install_dir} -type f \( -name "*.bzl" -o -name "*.py" \) -exec sed -i 's|#!/usr/bin/env python2.7|#!/usr/bin/python2.7|' "{}" + +find %{buildroot}%{src_install_dir} -type f \( -name "*.bzl" -o -name "*.py" \) -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/python|' "{}" + + %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig @@ -127,6 +145,9 @@ popd %_libdir/pkgconfig/*.pc %_libdir/*.so +%files source +%{src_install_dir} + %files -n python2-grpcio %python2_sitearch/grpcio-%rver-py*.egg-info %python2_sitearch/grpc