]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
5 | Summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure | |
6 | Name: chef | |
7 | Version: 11.4.4 | |
8 | Release: 2 | |
9 | License: Apache v2.0 | |
10 | Group: Development/Languages | |
11 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem | |
12 | # Source0-md5: dc50aa6a4a7d4785a4c82fcaab3f9436 | |
13 | Source1: %{name}.rb | |
14 | Patch0: platform-pld.patch | |
15 | Patch1: FHS.patch | |
16 | Patch2: https://github.com/glensc/chef/compare/poldek.patch | |
17 | # Patch2-md5: df7d8380da401ba9c37faeeb9250ae36 | |
18 | URL: http://wiki.opscode.com/display/chef | |
19 | BuildRequires: rpm-rubyprov | |
20 | BuildRequires: rpmbuild(macros) >= 1.656 | |
21 | BuildRequires: sed >= 4.0 | |
22 | %if %{with tests} | |
23 | BuildRequires: ruby-abstract | |
24 | BuildRequires: ruby-mixlib-authentication >= 1.3.0 | |
25 | BuildRequires: ruby-net-ssh-multi >= 1.1.0 | |
26 | BuildRequires: ruby-rack | |
27 | BuildRequires: ruby-rake | |
28 | #BuildRequires: ruby-rdoc | |
29 | BuildRequires: ruby-rest-client >= 1.0.4 | |
30 | BuildRequires: ruby-rspec-core >= 2.12.0 | |
31 | BuildRequires: ruby-rspec-expectations >= 2.12.0 | |
32 | BuildRequires: ruby-rspec-mocks >= 2.12.0 | |
33 | #BuildRequires: ruby-rspec_junit_formatter | |
34 | #BuildRequires: ruby-sdoc | |
35 | %endif | |
36 | Requires: lsb-release | |
37 | Requires: poldek >= 0.30 | |
38 | Requires: ruby-erubis | |
39 | Requires: ruby-highline >= 1.6.9 | |
40 | Requires: ruby-json >= 1.4.4 | |
41 | Requires: ruby-mixlib-authentication >= 1.3.0 | |
42 | Requires: ruby-mixlib-cli >= 1.3.0 | |
43 | Requires: ruby-mixlib-config >= 1.1.2 | |
44 | Requires: ruby-mixlib-log >= 1.3.0 | |
45 | Requires: ruby-mixlib-shellout | |
46 | Requires: ruby-net-ssh >= 2.6 | |
47 | Requires: ruby-net-ssh-multi >= 1.1.0 | |
48 | Requires: ruby-ohai >= 0.6.0 | |
49 | Requires: ruby-rest-client >= 1.0.4 | |
50 | Requires: ruby-rubygems | |
51 | Requires: ruby-yajl >= 1.1 | |
52 | BuildArch: noarch | |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
54 | ||
55 | %description | |
56 | A systems integration framework, built to bring the benefits of | |
57 | configuration management to your entire infrastructure. | |
58 | ||
59 | %prep | |
60 | %setup -q | |
61 | %patch0 -p1 | |
62 | %patch1 -p1 | |
63 | %patch2 -p1 | |
64 | ||
65 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
66 | ||
67 | %build | |
68 | %if %{with tests} | |
69 | rspec spec | |
70 | %endif | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}} \ | |
75 | $RPM_BUILD_ROOT{%{_sysconfdir},/var/{cache,lib}}/%{name} | |
76 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
77 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
78 | ||
79 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc README.md CONTRIBUTING.md | |
87 | %dir %{_sysconfdir}/%{name} | |
88 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb | |
89 | %attr(755,root,root) %{_bindir}/chef-apply | |
90 | %attr(755,root,root) %{_bindir}/chef-client | |
91 | %attr(755,root,root) %{_bindir}/chef-shell | |
92 | %attr(755,root,root) %{_bindir}/chef-solo | |
93 | %attr(755,root,root) %{_bindir}/knife | |
94 | %attr(755,root,root) %{_bindir}/shef | |
95 | %{ruby_vendorlibdir}/chef.rb | |
96 | %{ruby_vendorlibdir}/chef | |
97 | ||
98 | %dir /var/lib/%{name} | |
99 | %dir /var/cache/%{name} |