summaryrefslogtreecommitdiffstats
path: root/rubygem-kgio.spec
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2014-05-12 19:11:58 -0600
committerKen Dreyer <ktdreyer@ktdreyer.com>2014-05-12 19:14:44 -0600
commitafa63132843d384975dfb19dce7738ef9a931765 (patch)
tree10c60a25a7ae19b8e350a881a88fa2543e502d6b /rubygem-kgio.spec
parent5787eedad9d58f6335d06a0aea5f06662687083c (diff)
downloadrubygem-kgio-v2.9.2.tar.gz
rubygem-kgio-v2.9.2.tar.xz
rubygem-kgio-v2.9.2.zip
Update version 2.9.2 (RHBZ #1006808)v2.9.2
- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1 - Simplify %check to "make test" - Make -doc subpackage noarch
Diffstat (limited to 'rubygem-kgio.spec')
-rw-r--r--rubygem-kgio.spec108
1 files changed, 67 insertions, 41 deletions
diff --git a/rubygem-kgio.spec b/rubygem-kgio.spec
index aac0afb..f41589d 100644
--- a/rubygem-kgio.spec
+++ b/rubygem-kgio.spec
@@ -1,41 +1,40 @@
%global gem_name kgio
-%global rubyabi 1.9.1
-
-%if 0%{?fedora} >= 17
- %global rubyabi 1.9.1
-%endif
-
-%if 0%{?fedora} >= 19
- %global rubyabi 2.0.0
-%endif
-
Summary: Kinder, gentler I/O for Ruby
Name: rubygem-%{gem_name}
-Version: 2.8.0
-Release: 3%{?dist}
+Version: 2.9.2
+Release: 1%{?dist}
Group: Development/Tools
License: LGPLv2 or LGPLv3
# LICENSE file defines the licencing aspects of kgiox.
# No license info in source files.
URL: http://bogomips.org/kgio
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+# Minitest 5 support, not yet submitted upstream
+Patch0: rubygem-kgio-2.9.2-minitest.patch
+# Skip tests that fail in mock
+Patch1: rubygem-kgio-2.9.2-skip-tests.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%if 0%{?fedora} >= 19
-Requires: ruby(release)
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
+Requires: ruby(release)
%endif
-
-%if 0%{?fedora} >= 17 && 0%{?fedora} < 19
-Requires: ruby(abi) = %{rubyabi}
-Requires: ruby(rubygems)
+%if 0%{?el5} || 0%{?el6}
+Requires: ruby(abi) = 1.8
+%endif
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el5} || 0%{?el6} || 0%{?el7}
+Requires: rubygem(rack)
+Requires: rubygem(raindrops) >= 0.7
+Requires: rubygem(kgio) >= 2.6
%endif
BuildRequires: ruby-devel
BuildRequires: ruby-irb
BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest)
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el5} || 0%{?el6} || 0%{?el7}
Provides: rubygem(%{gem_name}) = %{version}
+%endif
ExcludeArch: ppc ppc64
%description
@@ -48,27 +47,46 @@ applications (that run on Unix-like platforms).
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
%description doc
Documentation for %{name}
%prep
-%setup -q -c -T
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+# Adjusting minor permissions
+chmod a+r ChangeLog
+chmod a+r NEWS
+
+# Minitest 5 support
+# Not yet submitted upstream
+%patch0 -p1
+# Skip tests that fail in mock
+%patch1 -p1
+
+%build
+gem build %{gem_name}.gemspec
+
+%if 0%{?el6}
mkdir -p .%{gem_dir}
-export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+export CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS"
gem install \
-V \
--local \
--install-dir .%{gem_dir} \
- --force \
- --rdoc \
- %{SOURCE0}
-
-# Adjusting minor permissions
-chmod a+r .%{gem_instdir}/ChangeLog
-chmod a+r .%{gem_instdir}/NEWS
-
-%build
+ --bindir .%{_bindir} \
+ --force \
+ --rdoc \
+ --backtrace \
+ %{gem_name}-%{version}.gem
+%else
+%gem_install
+%endif
%install
rm -rf %{buildroot}
@@ -91,20 +109,22 @@ rm -rf %{buildroot}%{gem_instdir}/.yardoc
rm -rf %{buildroot}%{gem_instdir}/ext
# If there are C extensions, mv them to the extdir.
-# You must replace REQUIRE_PATHS according to your gem specifics.
-%if 0%{?fedora} >= 17 && 0%{?fedora} < 19
-install -d -m0755 %{buildroot}%{gem_extdir}
-mv %{buildroot}%{gem_instdir}/lib/kgio_ext.so %{buildroot}%{gem_extdir}/lib/
-%endif
-
-%if 0%{?fedora} >= 19
-install -d m0755 %{buildroot}%{gem_extdir_mri}/lib
-mv %{buildroot}%{gem_instdir}/lib/kgio_ext.so %{buildroot}%{gem_extdir_mri}/lib/
+%if 0%{?el5} || 0%{?el6} || 0%{?el7}
+ install -d -m0755 %{buildroot}%{gem_extdir}
+ mv %{buildroot}%{gem_instdir}/lib/kgio_ext.so %{buildroot}%{gem_extdir}/lib/
+%else
+ mkdir -p %{buildroot}%{gem_extdir_mri}
+ cp -pa .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
%endif
%check
-cd %{buildroot}%{gem_instdir}
-RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir}/lib -Itest" testrb test/test_*
+pushd .%{gem_instdir}
+ %if 0%{?el6}
+ # TODO: make tests work on EL6.
+ %else
+ make test
+ %endif
+popd
%clean
rm -rf %{buildroot}
@@ -124,7 +144,7 @@ rm -rf %{buildroot}
#%%{gem_extdir_mri} %%{_libdir}/gems/ruby/%%{gem_name}-%%{version}
%endif
-%if 0%{?fedora} >= 17 && 0%{?fedora} < 19
+%if 0%{?el5} || 0%{?el6}
%{gem_extdir}
#%%{gem_extdir} %%{_libdir}/gems/exts/%%{gem_name}-%%{version}
%endif
@@ -140,6 +160,12 @@ rm -rf %{buildroot}
%{gem_instdir}/lib/kgio.rb
%changelog
+* Tue May 13 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.9.2-1
+- Update version 2.9.2 (RHBZ #1006808)
+- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
+- Simplify %%check to "make test"
+- Make -doc subpackage noarch
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild