%global gem_name blankslate %global rubyabi 1.9.1 %if 0%{?el6}%{?fc16} %global rubyabi 1.8 %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} %global gem_libdir %{gem_instdir}/lib %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %endif Summary: Ruby gem which provides an abstract base class with no predefined methods Name: rubygem-%{gem_name} Version: 2.1.2.4 Release: 1%{?dist} Group: Development/Languages License: MIT URL: http://github.com/masover/blankslate Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ruby(abi) = 1.8 Requires: rubygems %if 0%{?el6}%{?fc16} BuildRequires: rubygems %else BuildRequires: rubygems-devel %endif %if 0%{?el6} BuildRequires: rubygem(rspec) %else BuildRequires: rubygem(rspec-core) %endif BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} %description BlankSlate provides an abstract base class with no predefined methods. BlankSlate is useful as a base class when writing classes that depend upon method_missing. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} Requires: ruby(rubygems) %description doc This package contains documentation for %{name}. %prep %setup -q -c -T %{__mkdir_p} .%{gem_dir} gem install --local --install-dir .%{gem_dir} \ --force -V %{SOURCE0} rm .%{gem_instdir}/%{gem_name}.gemspec %build %check pushd .%{gem_instdir} rspec spec popd %install %{__mkdir_p} %{buildroot}%{gem_dir} cp -rv .%{gem_dir}/* %{buildroot}%{gem_dir} sed -i -e '/^#!/d' %{buildroot}%{gem_instdir}/lib/blankslate.rb %files %dir %{gem_instdir} %{gem_instdir}/lib/*.rb %{gem_dir}/cache/%{gem_name}-%{version}.gem %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %files doc %{gem_dir}/doc/%{gem_name}-%{version} %doc %{gem_instdir}/README %doc %{gem_instdir}/VERSION %{gem_instdir}/Rakefile %{gem_instdir}/spec %changelog * Fri Apr 27 2012 Matt Wagner - 2.1.2.4-1 - Initial import