From d3cc932daf153c4ba14968400c3c18c147eac2e7 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: May 31 2017 08:41:45 +0000 Subject: Add check of libev version correctness. --- diff --git a/rubygem-nio4r.spec b/rubygem-nio4r.spec index e2c66bc..64da39b 100644 --- a/rubygem-nio4r.spec +++ b/rubygem-nio4r.spec @@ -1,9 +1,11 @@ # Generated from nio4r-1.2.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name nio4r +%global libev_version 4.24 + Name: rubygem-%{gem_name} Version: 2.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: New IO for Ruby Group: Development/Languages # The entire source code is MIT, bundled libev is BSD or GPLv2+ @@ -23,7 +25,7 @@ BuildRequires: rubygem(rspec) # https://github.com/socketry/nio4r/commit/6801433 # A more productive message re: GVL # https://github.com/socketry/nio4r/commit/fba5c68 -Provides: bundled(libev) = 4.24 +Provides: bundled(libev) = %{libev_version} %description Cross-platform asynchronous I/O primitives for scalable network clients and @@ -73,6 +75,11 @@ rm -rf %{buildroot}%{gem_instdir}/ext/ # Run the test suite %check pushd .%{gem_instdir} +# Check libev version correctness. +EV_VERSION_MAJOR=$(grep EV_VERSION_MAJOR ext/libev/ev.h | cut -d ' ' -f3) +EV_VERSION_MINOR=$(grep EV_VERSION_MINOR ext/libev/ev.h | cut -d ' ' -f3) +[ "${EV_VERSION_MAJOR}.${EV_VERSION_MINOR}" = '%{libev_version}' ] + # Ignore code coverage and bundler. sed -i '/require "coveralls"/ s/^/#/' spec/spec_helper.rb sed -i '/Coveralls.wear!/ s/^/#/' spec/spec_helper.rb @@ -117,6 +124,9 @@ popd %{gem_instdir}/spec %changelog +* Wed May 31 2017 Jun Aruga - 2.1.0-2 +- Add check of libev version correctness. + * Mon May 29 2017 Jun Aruga - 2.1.0-1 - Update to nio4r 2.1.0.