Blob Blame History Raw
# Generated from bundler_ext-0.1.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name bundler_ext

%if 0%{?fedora:1} && 0%{?fedora} <= 19
%global rubyabi 1.9.1
%endif

%if 0%{?rhel} <= 6
%global rubyabi 1.8
%endif

# Needed as long as the macros are not in RHEL:
# https://bugzilla.redhat.com/show_bug.cgi?id=788001
%if 0%{?rhel:1} && 0%{?rhel} <= 6
%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_docdir %{gem_dir}/doc/%{gem_name}-%{version}
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem 
%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec 
%endif

Summary: Load system gems via Bundler DSL
Name: rubygem-%{gem_name}
Version: 0.3.1
Release: 2%{?dist}
Group: Development/Languages
License: MIT
URL: https://github.com/bundlerext/bundler_ext
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
Requires: ruby(release)
BuildRequires: ruby(release)
%else
Requires: ruby(abi) = %{rubyabi}
BuildRequires: ruby(abi) = %{rubyabi}
%endif
Requires: ruby(rubygems) 
Requires: rubygem(bundler) 
%if 0%{?rhel:1} && 0%{?rhel} <= 6
BuildRequires: rubygems
%else
BuildRequires: rubygems-devel
%endif
BuildRequires: ruby 
BuildRequires: rubygem(rspec)
BuildRequires: rubygem(bundler)
# This is present to satifys spec/fixtures/Gemfile.in
#BuildRequires: rubygem(deltacloud-client)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}

%description
Simple library leveraging the Bundler Gemfile DSL to load gems already on the
system and managed by the systems package manager (like yum/apt)


%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}

%prep
%setup -q -c -T
mkdir -p .%{gem_dir}
%if 0%{?rhel} <= 6
gem install --local --install-dir .%{gem_dir} \
            --force %{SOURCE0}
%else
%gem_install -n %{SOURCE0}
%endif

%build

%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/

%check
pushd .%{gem_instdir}
%if 0%{?rhel:1} && 0%{?rhel} <= 6
spec spec
%else
rspec spec
%endif
popd


%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%doc %{gem_instdir}/MIT-LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/spec/

%changelog
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Jul 30 2013 Vít Ondruch <vondruch@redhat.com> - 0.3.1-1
- Update to bundler_ext 0.3.1.

* Thu Jul 18 2013 Vít Ondruch <vondruch@redhat.com> - 0.3.0-1
- Update to bundler_ext 0.3.0.

* Wed Nov 28 2012 Vít Ondruch <vondruch@redhat.com> - 0.1.0-4
- Yet again RHEL6 and Fedora 16 compatibility fixes.

* Fri Nov 23 2012 Vít Ondruch <vondruch@redhat.com> - 0.1.0-3
- More RHEL6 and Fedora 16 compatibility.

* Thu Nov 22 2012 Vít Ondruch <vondruch@redhat.com> - 0.1.0-2
- Add RHEL6 and Fedora 16 compatibility. 

* Tue Nov 20 2012 Vít Ondruch <vondruch@redhat.com> - 0.1.0-1
- Initial package