diff --git a/openresty.spec b/openresty.spec index cec6233..b9736b4 100644 --- a/openresty.spec +++ b/openresty.spec @@ -19,6 +19,7 @@ %global otel_cpp_builddir %{_builddir}/opentelemetry-cpp-%{opentelemetry_cpp_version} %global openresty_builddir %{_builddir}/openresty-%{commitid} %global lib_path /opt/app-root/lib +%global gcc11_path /opt/rh/gcc-toolset-11/root/bin %if 0%{?fedora} >= 27 %undefine _debugsource_packages @@ -29,7 +30,6 @@ Name: openresty Version: %{version_major}.%{version_minor}.%{version_micro} Release: 21%{?dist} Summary: OpenResty, scalable web platform by extending NGINX with Lua -ExcludeArch: s390x Group: System Environment/Daemons # BSD License (two clause) @@ -91,6 +91,7 @@ Source49: opentelemetry-proto-%{opentelemetry_proto_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl-File-Temp, dos2unix, pcre-devel, openssl-devel +BuildRequires: gcc-toolset-11 BuildRequires: gcc, make, perl, systemtap-sdt-devel, git, annobin-annocheck BuildRequires: gcc-c++, cmake BuildRequires: openresty-zlib-devel >= 1.2.11-3 @@ -237,6 +238,24 @@ tar xzfv %{SOURCE45} ls -al %{_builddir} mkdir -p %{grpc_builddir}/cmake/build cd %{grpc_builddir}/cmake/build +%ifarch s390x +cmake -DgRPC_INSTALL=ON \ + -DgRPC_BUILD_TESTS=OFF \ + -DCMAKE_C_COMPILER=%{gcc11_path}/gcc \ + -DCMAKE_CXX_COMPILER=%{gcc11_path}/g++ \ + -DCMAKE_INSTALL_PREFIX=%{otel_install} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF \ + -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF \ + -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF \ + -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF \ + -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF \ + -DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package \ + ../.. +%endif cmake -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX=%{otel_install} \