|
| 1 | +# Generated from hitimes-1.2.1.gem by gem2rpm -*- rpm-spec -*- |
| 2 | +%global gem_name hitimes |
| 3 | + |
| 4 | +Name: rubygem-%{gem_name} |
| 5 | +Version: 1.2.1 |
| 6 | +Release: 1%{?dist} |
| 7 | +Summary: Hitimes is a fast, high resolution timer library for recording performance metrics. |
| 8 | +Group: Development/Languages |
| 9 | +License: ISC |
| 10 | +URL: http://github.com/copiousfreetime/hitimes |
| 11 | +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem |
| 12 | +Requires: ruby(release) |
| 13 | +Requires: rubygems |
| 14 | +BuildRequires: ruby(release) |
| 15 | +BuildRequires: rubygems-devel |
| 16 | +BuildRequires: ruby-devel |
| 17 | +BuildRequires: rubygem(rspec) |
| 18 | +BuildRequires: rubygem(simplecov) |
| 19 | +Provides: rubygem(%{gem_name}) = %{version} |
| 20 | + |
| 21 | +%description |
| 22 | +Hitimes is a fast, high resolution timer library for recording performance |
| 23 | +metrics. It uses the appropriate low method calls for each system to get the |
| 24 | +highest granularity time increments possible. It currently supports any of |
| 25 | +the following systems: * any system with the POSIX call `clock_gettime()` * |
| 26 | +Mac OS X * Windows * JRuby Using Hitimes can be faster than using a series of |
| 27 | +`Time.new` calls, and it will have a much higher granularity. It is definitely |
| 28 | +faster than using `Process.times`. |
| 29 | + |
| 30 | +%package doc |
| 31 | +Summary: Documentation for %{name} |
| 32 | +Group: Documentation |
| 33 | +Requires: %{name} = %{version}-%{release} |
| 34 | +BuildArch: noarch |
| 35 | + |
| 36 | +%description doc |
| 37 | +Documentation for %{name} |
| 38 | + |
| 39 | +%prep |
| 40 | +gem unpack %{SOURCE0} |
| 41 | + |
| 42 | +%setup -q -D -T -n %{gem_name}-%{version} |
| 43 | + |
| 44 | +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec |
| 45 | + |
| 46 | +%build |
| 47 | +# Create the gem as gem install only works on a gem file |
| 48 | +gem build %{gem_name}.gemspec |
| 49 | + |
| 50 | +%gem_install |
| 51 | + |
| 52 | +%install |
| 53 | +mkdir -p %{buildroot}%{gem_dir} |
| 54 | +cp -pa .%{gem_dir}/* \ |
| 55 | + %{buildroot}%{gem_dir}/ |
| 56 | + |
| 57 | +mkdir -p %{buildroot}%{gem_extdir_mri}/lib |
| 58 | + |
| 59 | +mv %{buildroot}%{gem_instdir}/lib/hitimes/2.0/hitimes.so %{buildroot}%{gem_extdir_mri}/lib/ |
| 60 | + |
| 61 | +rm -rf %{buildroot}/%{gem_instdir}/ext/ |
| 62 | + |
| 63 | +%check |
| 64 | +pushd ./%{gem_instdir} |
| 65 | +rspec spec/ |
| 66 | +popd |
| 67 | + |
| 68 | +%files |
| 69 | +%dir %{gem_instdir} |
| 70 | +%{gem_libdir} |
| 71 | +%doc %{gem_instdir}/LICENSE |
| 72 | +%exclude %{gem_instdir}/ext |
| 73 | +%{gem_extdir_mri} |
| 74 | +%exclude %{gem_cache} |
| 75 | +%{gem_spec} |
| 76 | + |
| 77 | +%files doc |
| 78 | +%doc %{gem_docdir} |
| 79 | +%doc %{gem_instdir}/CONTRIBUTING.md |
| 80 | +%doc %{gem_instdir}/HISTORY.md |
| 81 | +%doc %{gem_instdir}/Manifest.txt |
| 82 | +%doc %{gem_instdir}/README.md |
| 83 | +%{gem_instdir}/spec/ |
| 84 | +%{gem_instdir}/tasks/ |
| 85 | +%{gem_instdir}/examples/ |
| 86 | +%{gem_instdir}/Rakefile |
| 87 | + |
| 88 | +%changelog |
| 89 | +* Mon Jan 20 2014 Achilleas Pipinellis <axilleaspi@ymail.com> - 1.2.1-1 |
| 90 | +- Initial package |
0 commit comments