%bcond_with bootstrap %global gem_name eventmachine %{!?network: %global network 0} Name: rubygem-%{gem_name} Version: 1.2.7 Release: 2 Summary: Ruby/EventMachine library License: GPLv2 or Ruby URL: http://rubyeventmachine.com Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Patch0: rubygem-eventmachine-1.2.7-OpenSSL-1.1.0-test-updates.patch Patch1: rubygem-eventmachine-1.2.7-Update-runtime-files-for-TLS13-no-SSL-OpenSSL-lib-info.patch Patch2: rubygem-eventmachine-1.2.7-Move-console-SSL-Info-code-to-em_test_helper.patch Patch3: rubygem-eventmachine-1.2.7-Openssl-1.1.1-updates.patch BuildRequires: ruby(release) rubygems-devel ruby-devel gcc-c++ openssl-devel BuildRequires: rubygem(test-unit) %description EventMachine implements a fast, single-threaded engine for arbitrary network communications. It's extremely easy to use in Ruby. EventMachine wraps all interactions with IP sockets, allowing programs to concentrate on the implementation of network protocols. It can be used to create both network servers and clients. To create a server or client, a Ruby program only needs to specify the IP address and port, and provide a Module that implements the communications protocol. Implementations of several standard network protocols are provided with the package, primarily to serve as examples. The real goal of EventMachine is to enable programs to easily interface with other programs using TCP/IP, especially if custom protocols are required. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} sed -i '/SSL_CTX_set_cipher_list/ s/".*"/"PROFILE=SYSTEM"/' ext/ssl.cpp %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %build gem build ../%{gem_name}-%{version}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{gem_extdir_mri} cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/ rm -rf %{buildroot}%{gem_instdir}/ext/ %if %{with bootstrap} %check pushd .%{gem_instdir} ruby -Ilib:$(dirs +1)%{gem_extdir_mri}:tests -e "Dir.glob './tests/**/test_*.rb', &method(:require)" -- \ --verbose \ --ignore-name /^test_exception_on_unbind$/ \ --ignore-name /^test_.*v3.*$/ \ --ignore-name /^test_no_ecdh_curve$/ \ --ignore-name=/^test_cookie$/ \ --ignore-name=/^test_http_client$/ \ --ignore-name=/^test_http_client_1$/ \ --ignore-name=/^test_http_client_2$/ \ --ignore-name=/^test_version_1_0$/ \ --ignore-name=/^test_https_get$/ \ --ignore-name=/^test_get$/ \ --ignore-name=/^test_get_pipeline$/ \ --ignore-name=/^test_ipv6_udp_local_server$/ \ %if 0%{network} < 1 --ignore-name=/^test_a$/ \ --ignore-name=/^test_a_pair$/ \ --ignore-name=/^test_bad_host$/ \ --ignore-name=/^test_failure_timer_cleanup$/ \ --ignore-name=/^test_timer_cleanup$/ \ --ignore-name=/^test_nameserver$/ \ %endif popd %endif %files %dir %{gem_instdir} %{gem_extdir_mri} %license %{gem_instdir}/GNU %license %{gem_instdir}/LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %doc %{gem_instdir}/docs %{gem_instdir}/examples %{gem_instdir}/java %{gem_instdir}/rakelib %{gem_instdir}/tests %changelog * Sat Sep 5 2020 liyanan - 1.2.7-2 - fix build fail * Sat Jul 25 2020 wutao - 1.2.7-1 - package init