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