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