]>
Commit | Line | Data |
---|---|---|
17fe6e10 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # tests. requires RSpec3 | |
4 | ||
5 | %define pkgname hashicorp-checkpoint | |
6 | Summary: Internal HashiCorp service to check version information | |
7 | Name: ruby-%{pkgname} | |
dff182cf | 8 | Version: 0.1.5 |
70ea144a | 9 | Release: 2 |
17fe6e10 ER |
10 | License: MPL v2.0 |
11 | Group: Development/Languages | |
12 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem | |
dff182cf | 13 | # Source0-md5: b0a723177d1485a5d4538270ff77ca09 |
17fe6e10 ER |
14 | URL: http://www.hashicorp.com |
15 | BuildRequires: rpm-rubyprov | |
16 | BuildRequires: rpmbuild(macros) >= 1.656 | |
17 | %if %{with tests} | |
18 | BuildRequires: ruby-bundler < 2 | |
19 | BuildRequires: ruby-bundler >= 1.6 | |
20 | BuildRequires: ruby-rake | |
21 | BuildRequires: ruby-rspec < 3.1 | |
22 | BuildRequires: ruby-rspec >= 3.0.0 | |
23 | BuildRequires: ruby-rspec-its < 1.1 | |
24 | BuildRequires: ruby-rspec-its >= 1.0.0 | |
25 | %endif | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | Internal HashiCorp service to check version information. | |
31 | ||
32 | %prep | |
33 | %setup -q -n %{pkgname}-%{version} | |
34 | ||
35 | %build | |
36 | # write .gemspec | |
37 | %__gem_helper spec | |
38 | ||
39 | %if %{with tests} | |
40 | rspec spec | |
41 | %endif | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} | |
46 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
47 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
48 | ||
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
54 | %doc README.md LICENSE.txt | |
55 | %{ruby_vendorlibdir}/checkpoint.rb | |
56 | %{ruby_vendorlibdir}/checkpoint | |
57 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |