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