summaryrefslogtreecommitdiffstats
path: root/SPECS/rubygem-chronic_duration.spec
blob: ecc54ca48797c2b3bc44d9226e93e6b90c018270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Generated from chronic_duration-0.10.6.gem by gem2rpm -*- rpm-spec -*-
%global gem_name chronic_duration

Name: rubygem-%{gem_name}
Version: 0.10.6
Release: 1%{?dist}
Summary: A simple Ruby natural language parser for elapsed time
License: MIT
URL: https://github.com/hpoydar/chronic_duration
Source0: http://gems.rubyforge.orggems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(rspec) >= 2.12.0
# BuildRequires: rubygem(rspec) < 2.13
BuildArch: noarch
Requires: rubygem-numerizer

%description
A simple Ruby natural language parser for elapsed time. (For example, 4 hours
and 30 minutes, 6 minutes 4 seconds, 3 days, etc.) Returns all results in
seconds. Will return an integer unless you get tricky and need a float. (4
minutes and 13.47 seconds, for example.) The reverse can also be performed via
the output method.


%package doc
Summary: Documentation for %{name}
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 compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/



%check
pushd .%{gem_instdir}
# rspec spec
popd

%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.gitignore
%exclude %{gem_instdir}/.travis.yml
%license %{gem_instdir}/LICENSE.txt
%exclude %{gem_instdir}/chronic_duration.gemspec
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/spec

%changelog
* Tue Aug 29 2017 Marcel Haerry <mh+fedora@scrit.ch> - 0.10.6-1
- Initial package