Skip to content

Commit 7c2f353

Browse files
committed
Update timers: new dep hitimes
1 parent 59509ef commit 7c2f353

File tree

2 files changed

+101
-8
lines changed

2 files changed

+101
-8
lines changed

gitlab/SPECS/rubygem-hitimes.spec

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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

gitlab/SPECS/rubygem-timers.spec

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
%global gem_name timers
33

44
Name: rubygem-%{gem_name}
5-
Version: 1.1.0
6-
Release: 2%{?dist}
5+
Version: 2.0.0
6+
Release: %{?dist}
77
Summary: Pure Ruby one-shot and periodic timers
88
Group: Development/Languages
99
License: MIT
1010
URL: https://github.com/celluloid/timers
1111
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
1212
Requires: ruby(release)
13-
Requires: ruby(rubygems)
13+
Requires: rubygems
14+
Requires: rubygem(hitimes)
1415
BuildRequires: ruby(release)
15-
BuildRequires: rubygems-devel
16-
BuildRequires: ruby
17-
BuildRequires: rubygem(rspec)
16+
BuildRequires: rubygems-devel
17+
BuildRequires: ruby
18+
BuildRequires: rubygem(rspec)
1819
BuildArch: noarch
1920
Provides: rubygem(%{gem_name}) = %{version}
2021

@@ -41,8 +42,6 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
4142
# Create the gem as gem install only works on a gem file
4243
gem build %{gem_name}.gemspec
4344

44-
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
45-
# by default, so that we can move it into the buildroot in %%install
4645
%gem_install
4746

4847
%install
@@ -79,6 +78,10 @@ popd
7978
%{gem_instdir}/%{gem_name}.gemspec
8079

8180
%changelog
81+
* Mon Jan 20 2014 Achilleas Pipinellis <axilleaspi@ymail.com> - 2.0.0-1
82+
- Bump version
83+
- Clean up spec
84+
8285
* Mon Jun 03 2013 Axilleas Pipinellis <axilleaspi@ymail.com> - 1.1.0-2
8386
- Fix Summary/Description tags
8487

0 commit comments

Comments
 (0)