# Generated from eventmachine-1.2.6.gem by gem2rpm -*- rpm-spec -*- %global gem_name eventmachine Name: rubygem-%{gem_name} Version: 1.2.6 Release: 1%{?dist} Summary: Ruby/EventMachine library License: Ruby and GPL-2.0 URL: http://rubyeventmachine.com Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-devel # Compiler is required for build of gem binary extension. # https://fedoraproject.org/wiki/Packaging:C_and_C++#BuildRequires_and_Requires BuildRequires: gcc # BuildRequires: rubygem(test-unit) >= 2.0 # BuildRequires: rubygem(test-unit) < 3 # BuildRequires: rubygem(rake-compiler) >= 0.9.5 # BuildRequires: rubygem(rake-compiler) < 0.10 # BuildRequires: rubygem(rake-compiler-dock) >= 0.5.1 # BuildRequires: rubygem(rake-compiler-dock) < 0.6 %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 gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %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}/ # Prevent dangling symlink in -debuginfo (rhbz#878863). rm -rf %{buildroot}%{gem_instdir}/ext/ # Prevent dangling symlink in -debuginfo (rhbz#878863). rm -rf %{buildroot}%{gem_instdir}/ext/ %check pushd .%{gem_instdir} # ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd %files %dir %{gem_instdir} %{gem_extdir_mri} %{gem_instdir}/GNU %license %{gem_instdir}/LICENSE %{gem_instdir}/java %{gem_libdir} %{gem_instdir}/rakelib %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}/tests %changelog * Mon Apr 30 2018 mockbuilder - 1.2.6-1 - Initial package