Fix spec make it build and install on epel7 and older versions of fedora

epel9
Troy Dawson 10 years ago
parent de25687cd4
commit 6557cb833c

@ -1,6 +1,6 @@
%global gem_name httpclient
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 18
%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
@ -15,23 +15,22 @@
Summary: HTTP Client interface for ruby
Name: rubygem-%{gem_name}
Version: 2.4.0
Release: 1%{?dist}
Release: 2%{?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
%if 0%{?fedora} >= 19
Requires: ruby(release)
%else
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 18
Requires: ruby(abi) >= %{rubyabi}
%else
Requires: ruby(release)
%endif
Requires: rubygems
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
BuildRequires: rubygems
%if 0%{?rhel} <= 7 && 0%{?fedora} <= 20
BuildRequires: rubygem(minitest)
%else
BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest4)
%endif
BuildRequires: rubygems-devel
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
@ -61,7 +60,7 @@ gem install -V \
--install-dir ./%{gem_dir} \
--bindir ./%{_bindir} \
--force \
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
%if 0%{?rhel} <= 6 && 0%{?fedora} <= 18
--no-rdoc \
--no-ri \
%else
@ -113,6 +112,9 @@ popd
%changelog
* Wed Oct 15 2014 Troy Dawson <tdawson@redhat.com> - 2.4.0-2
- Fix spec make it build and install on epel7 and older versions of fedora
* Fri Jun 13 2014 Troy Dawson <tdawson@redhat.com> - 2.4.0-1
- Update to latest upstream

Loading…
Cancel
Save