]>
Commit | Line | Data |
---|---|---|
be317396 ER |
1 | %define gemname ohai |
2 | Summary: Profiles your system and emits JSON | |
3 | Name: ruby-%{gemname} | |
ebd314a9 ER |
4 | Version: 6.16.0 |
5 | Release: 0.2 | |
be317396 ER |
6 | License: Apache v2.0 |
7 | Group: Development/Languages | |
be317396 | 8 | Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem |
ebd314a9 | 9 | # Source0-md5: 5193426deeb67ff7560e05000c55d4d3 |
0955027e | 10 | URL: http://docs.opscode.com/ohai.html |
be317396 ER |
11 | BuildRequires: rpm-rubyprov |
12 | BuildRequires: rpmbuild(macros) >= 1.656 | |
13 | Requires: ruby-extlib | |
e442943f | 14 | Requires: ruby-ipaddress |
be317396 ER |
15 | Requires: ruby-json |
16 | Requires: ruby-mixlib-cli | |
17 | Requires: ruby-mixlib-config | |
18 | Requires: ruby-mixlib-log | |
ebd314a9 | 19 | Requires: ruby-mixlib-shellout |
be317396 | 20 | Requires: ruby-systemu |
e442943f | 21 | Requires: ruby-yajl |
be317396 ER |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Ohai detects data about your operating system and prints out a JSON | |
27 | data blob. It can be used standalone, but it's primary purpose is to | |
28 | provide node data to Chef. | |
29 | ||
30 | %package doc | |
31 | Summary: Documentation for %{name} | |
32 | Group: Documentation | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | ||
35 | %description doc | |
36 | This package contains documentation for %{name}. | |
37 | ||
38 | %prep | |
39 | %setup -q | |
40 | ||
41 | %build | |
42 | %if %{with tests} | |
43 | # Occasionally fails with "undefined method `rfc2822' for nil:NilClass" during | |
44 | # mock. Unsure why - disable for now. | |
45 | sed -i 's^Time.should_receive(:now)^^' spec/ohai/plugins/ohai_time_spec.rb | |
46 | rake spec | |
47 | %endif | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}} | |
52 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
53 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
54 | ||
be317396 | 55 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
ebd314a9 | 56 | cp -p docs/man/man1/ohai.1 $RPM_BUILD_ROOT%{_mandir}/man1/ohai.1 |
be317396 ER |
57 | |
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %doc README.rdoc | |
64 | %attr(755,root,root) %{_bindir}/ohai | |
65 | %{_mandir}/man1/ohai.1* | |
66 | %{ruby_vendorlibdir}/ohai.rb | |
67 | %{ruby_vendorlibdir}/ohai | |
68 | ||
69 | %if 0 | |
70 | %files doc | |
71 | %defattr(644,root,root,755) | |
72 | %endif |