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

%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16
%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.1.0
Release: 4%{?dist}
Group: Development/Languages
License: ASL 2.0
URL: https://github.com/aeolus-incubator/bundler_ext
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems) 
Requires: rubygem(bundler) 
BuildRequires: ruby(abi) = %{rubyabi}
%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}
gem install --local --install-dir .%{gem_dir} \
            --force %{SOURCE0}

%build

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

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


%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%doc %{gem_instdir}/COPYING
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

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

%changelog
* 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