# Generated from hitimes-1.2.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name hitimes Name: rubygem-%{gem_name} Version: 1.2.1 Release: 1%{?dist} Summary: A fast, high resolution timer library for recording performance metrics Group: Development/Languages License: ISC URL: http://github.com/copiousfreetime/hitimes Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: ruby(release) Requires: rubygems BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-devel BuildRequires: rubygem(rspec) Provides: rubygem(%{gem_name}) = %{version} %description Hitimes is a fast, high resolution timer library for recording performance metrics. It uses the appropriate low method calls for each system to get the highest granularity time increments possible. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name} %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{gem_extdir_mri}/lib/%{gem_name}/ mv %{buildroot}%{gem_libdir}/%{gem_name}/2.0/%{gem_name}.so %{buildroot}%{gem_extdir_mri}/lib/%{gem_name}/ rm -rf %{buildroot}/%{gem_instdir}/{ext/,Rakefile} %check pushd ./%{gem_instdir} # Remove simplecov uneeded dependency sed -i '1,5d' spec/spec_helper.rb rspec spec/ popd %files %dir %{gem_instdir} %{gem_libdir} %doc %{gem_instdir}/LICENSE %{gem_extdir_mri} %{gem_spec} %exclude %{gem_cache} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CONTRIBUTING.md %doc %{gem_instdir}/HISTORY.md %doc %{gem_instdir}/Manifest.txt %doc %{gem_instdir}/README.md %{gem_instdir}/spec/ %{gem_instdir}/tasks/ %{gem_instdir}/examples/ %changelog * Mon Jan 20 2014 Achilleas Pipinellis - 1.2.1-1 - Initial package