%global gem_name time-lord Name: rubygem-%{gem_name} Version: 1.0.1 Release: 1%{?dist} Summary: Managing concepts of time and space in Ruby Group: Development/Libraries License: MIT URL: http://krainboltgreene.github.io/time-lord/ Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem Patch0: %{name}-minitest.patch BuildArch: noarch BuildRequires: rubygem(timecop) rubygem(rake) rubygem(yard) rubygem(pry) rubygem(bundler) rubygem(minitest) rubygems-devel Requires: rubygems %if 0%{?fedora} >= 19 Requires: ruby(release) %else Requires: ruby(abi) >= 1.9.1 %endif %description time-lord is a gem that gives you more human like expressions for time and space math. Underneath the covers time-lord gives you single purpose objects for handling the more complex parts of Time & Space. Specifically conversion, periods between two points, and scaling. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} %patch0 -p1 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # kramdown is marked as a dep, but isn't actually used (and also not packaged) # minitest is used for %%check, however, and not listed. # I filed a bug on this upstream, but this works around it for now. sed -i 's/kramdown/minitest/g' %{gem_name}.gemspec %build mkdir -p .%{gem_dir} gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/ rm %{buildroot}%{gem_instdir}/{Rakefile,.gitignore,.rvmrc,.travis.yml} %check rake test %files %doc %{gem_instdir}/README.md %doc %{gem_instdir}/COPYRIGHT %{gem_instdir} %{gem_docdir} %{gem_cache} %{gem_spec} %changelog * Sun Jun 30 2013 Ricky Elrod 1.0.1-1 - Initial build.