fix check so it works on epel6

epel9
Troy Dawson 12 years ago
parent b5e2dfb194
commit 928ea8482e

@ -1,17 +1,13 @@
%global gem_name httpclient %global gem_name httpclient
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 %if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
%global rubyabi 1.8
%if 0%{?rhel}
%global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
%global gem_libdir %{gem_instdir}/lib %global gem_libdir %{gem_instdir}/lib
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
%global gem_spec %{gem_dir}/specifications/%%{gem_name}-%{version}.gemspec %global gem_spec %{gem_dir}/specifications/%%{gem_name}-%{version}.gemspec
%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
%endif %global rubyabi 1.8
%else %else
%global rubyabi 1.9.1 %global rubyabi 1.9.1
%endif %endif
@ -19,18 +15,18 @@
Summary: HTTP Client interface for ruby Summary: HTTP Client interface for ruby
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 2.3.2 Version: 2.3.2
Release: 4%{?dist} Release: 5%{?dist}
Group: Development/Languages Group: Development/Languages
License: (Ruby or BSD) and Public Domain License: (Ruby or BSD) and Public Domain
URL: https://github.com/nahi/httpclient URL: https://github.com/nahi/httpclient
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(abi) >= %{rubyabi} Requires: ruby(abi) >= %{rubyabi}
Requires: rubygems Requires: rubygems
BuildRequires: rubygem(test-unit)
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 %if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
BuildRequires: rubygems BuildRequires: rubygems
%else %else
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest)
%endif %endif
BuildArch: noarch BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version} Provides: rubygem(%{gem_name}) = %{version}
@ -61,7 +57,12 @@ gem install -V \
--install-dir ./%{gem_dir} \ --install-dir ./%{gem_dir} \
--bindir ./%{_bindir} \ --bindir ./%{_bindir} \
--force \ --force \
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
--no-rdoc \
--no-ri \
%else
--rdoc \ --rdoc \
%endif
%{gem_name}-%{version}.gem %{gem_name}-%{version}.gem
%install %install
@ -90,7 +91,7 @@ find %{buildroot}/%{gem_instdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
%check %check
pushd %{buildroot}%{gem_instdir} pushd %{buildroot}%{gem_instdir}
testrb2 -Ilib test testrb -Ilib test
popd popd
%files %files
@ -108,6 +109,9 @@ popd
%changelog %changelog
* Thu Feb 28 2013 Troy Dawson <tdawson@redhat.com> - 2.3.2-5
- Fix check to work on EPEL6
* Wed Feb 27 2013 Troy Dawson <tdawson@redhat.com> - 2.3.2-4 * Wed Feb 27 2013 Troy Dawson <tdawson@redhat.com> - 2.3.2-4
- Set License to (Ruby or BSD) and Public Domain - Set License to (Ruby or BSD) and Public Domain

Loading…
Cancel
Save